graph_processing_tools

graph_processing_tools#

Full path: iqm.qrisp_iqm.passes.routing.core.graph_processing_tools

Graph processing tools for plasma-sabre routing passes.

This module implements functions that operate on two different graphs:

  1. The hardware topology graph QPUTopology.

  2. The quantum circuit in DAG form CircuitDAG.

Module Attributes

QPUTopology(indptr, indices, dist_matrix, ...)

Describes the QPU topology.

CircuitDAG(indptr, indices, instruction_data)

Describes the quantum circuit as a DAG.

Functions

connectivity_to_topology(connectivity)

Take a connectivity list and compute the QPU topology.

convert_qc_to_sparse_dag(qc[, topo_sort])

Convert a quantum circuit into a DAG.

find_path(a, b, topology)

Reconstruct the shortest path between two qubits.

find_path_length(index_0, index_1, topology)

Return the shortest-path distance between two qubit indices.

gen_swap_candidates(instruction_data, ...)

Generate deduplicated swap candidates for the front layer.

permute_instruction_dag(circuit_dag, permutation)

Apply a qubit layout permutation to an instruction DAG.

prune_dag(circuit_dag, pruning_threshold)

Prune instructions below a threshold from an instruction DAG.

reachability_counts_csr(indptr, indices, ...)

Count how many nodes each node can reach in a CSR-encoded DAG.

reverse_dag(circuit_dag)

Build a backward instruction DAG by reversing the topological order.

Classes

CircuitDAG

Describes the quantum circuit as a DAG.

QPUTopology

Describes the QPU topology.

Inheritance

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