QPUTopology#
Module: iqm.qrisp_iqm.passes.routing.core.graph_processing_tools
- class iqm.qrisp_iqm.passes.routing.core.graph_processing_tools.QPUTopology(indptr, indices, dist_matrix, predecessors)#
Bases:
tupleDescribes the QPU topology.
All the items are of the type
np.ndarray[int]. The adjacency matrix A of the QPU coupling graph is stored here in CSR form. The nodes are qubits, and the edges correspond to available native two-qubit gates.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.dist_matrixis a dense matrix wheredist_matrix[a, b]is the length of the shortest path between nodesaandb.predecessorsis a dense matrix wherepredecessors[a, b]is the index of the next node to take when traversing the shortest path from nodeato nodeb.
dist_matrixandpredecessorscould be computed on demand, but since we care for performance and they are required A LOT, we precompute them and pass them around along the CSR matrix.Attributes
Alias for field number 2
Alias for field number 1
Alias for field number 0
Alias for field number 3
Methods
- dist_matrix#
Alias for field number 2
- indices#
Alias for field number 1
- indptr#
Alias for field number 0
- predecessors#
Alias for field number 3
Inheritance
