qbraid.transpiler.QasmCircuitWrapper

class QasmCircuitWrapper(qasm_str)[source]

Wrapper class for OpenQASM 2 strings.

Create a QasmCircuitWrapper

Parameters

circuit – the OpenQASM 2 string to be wrapped

__init__(qasm_str)[source]

Create a QasmCircuitWrapper

Parameters

circuit – the OpenQASM 2 string to be wrapped

Methods

__init__(qasm_str)

Create a QasmCircuitWrapper

draw([package, output])

draw circuit

transpile(conversion_type)

Transpile a qbraid quantum program wrapper object to quantum program object of type specified by conversion_type.

Attributes

depth

Return the circuit depth (i.e., length of critical path).

input_param_mapping

Return the input parameter mapping.

num_clbits

Return the number of classical bits in the circuit.

num_qubits

Return the number of qubits in the circuit.

package

Return the original package of the wrapped circuit.

params

Return the circuit parameters.

program

Return the underlying quantum program that has been wrapped.

qubits

Return the qubits acted upon by the operations in this circuit