qbraid.programs.circuits.GateModelProgram

class GateModelProgram(program)[source]

Abstract class for qbraid program wrapper objects.

__init__(program)

Methods

__init__(program)

get_spec(program)

Return the program spec.

remove_idle_qubits()

Remove empty registers of circuit.

reverse_qubit_order()

Rerverse qubit ordering of circuit.

transform(device)

Transform program to according to device target profile.

unitary()

Calculate unitary of circuit.

unitary_little_endian()

Converts unitary calculated using big-endian system to its equivalent form in a little-endian system.

unitary_rev_qubits()

Peforms Kronecker (tensor) product factor permutation of given matrix.

Attributes

depth

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

num_clbits

Return the number of classical bits in the circuit.

num_qubits

Return the number of qubits in the circuit.

program

Return the quantum program.

qubits

Return the qubits acted upon by the operations in this circuit