CircuitDAG#
Module: iqm.qrisp_iqm.passes.routing.core.graph_processing_tools
- class iqm.qrisp_iqm.passes.routing.core.graph_processing_tools.CircuitDAG(indptr, indices, instruction_data)#
Bases:
tupleDescribes the quantum circuit as a DAG.
All the items are of the type
np.ndarray[int]. Them * madjacency matrix A of the DAG is stored here in CSR form. The nodes are instructions in the circuit, and the edges correspond to qubits the instructions are acting on. Edge direction represents causality (relative time ordering).indicesis a 1-D array containing column indices of the nonzero elements of A.indptris a 1-D array, whereindptr[k]is the number of nonzero elements in A above rowk.instruction_datais ashape==(m, 3)array describing the instructions:instruction_data[i, 0]: index of the first qubit of the instruction locusinstruction_data[i, 1]: index of the second qubit of the instruction locus (for one-qubit gates the same as first)instruction_data[i, 2]: index that identifies theqrisp.Instructionthe node corresponds to. The list of Instruction objects is kept outside of the jitted code, and is used to reconstruct theqrisp.QuantumCircuitobject once jit-based compilation has concluded.
Attributes
Alias for field number 1
Alias for field number 0
Alias for field number 2
Methods
- indices#
Alias for field number 1
- indptr#
Alias for field number 0
- instruction_data#
Alias for field number 2
Inheritance
