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: tuple

Describes 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.

  • indices is a 1-D array containing column indices of the nonzero elements of A.

  • indptr is a 1-D array, where indptr[k] is the number of nonzero elements in A above row k.

  • dist_matrix is a dense matrix where dist_matrix[a, b] is the length of the shortest path between nodes a and b.

  • predecessors is a dense matrix where predecessors[a, b] is the index of the next node to take when traversing the shortest path from node a to node b.

dist_matrix and predecessors could 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

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

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

Inheritance diagram of iqm.qrisp_iqm.passes.routing.core.graph_processing_tools.QPUTopology