qbraid.transforms.qasm2

Module for appyling transformations to OpenQASM 2 programs.

Functions

remove_qasm_barriers(qasm_str)

Returns a copy of the input QASM with all barriers removed.

unfold_qasm_gate_defs(qasm_string)

Recursively expands gate definitions in the input OpenQASM string.

flatten_qasm_program(qasm_str)

Returns a copy of the input QASM compatible with the QasmParser.

decompose_qasm_qelib1(qasm_str)

Replace edge-case qelib1 gates with equivalent decomposition.