qbraid.transpiler.QuantumProgramWrapper
- class QuantumProgramWrapper(program)[source]
Abstract class for qbraid program wrapper objects.
Note: The program wrapper object keeps track of abstract parameters and qubits using an intermediate representation. Qubits are stored simplhy as integers. All other objects are transpiled directly when the
transpile()
method is called.Methods
__init__
(program)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