iqm.qrisp_iqm.passes.routing.core.graph_processing_tools.connectivity_to_topology

iqm.qrisp_iqm.passes.routing.core.graph_processing_tools.connectivity_to_topology#

iqm.qrisp_iqm.passes.routing.core.graph_processing_tools.connectivity_to_topology(connectivity: list[tuple[int, int]]) → QPUTopology#

Take a connectivity list and compute the QPU topology.

The topology graph preserves the original qubit indices from connectivity as node labels. Qubits that do not participate in any edge are included as isolated nodes so that the output circuit’s qubit indices correspond directly to the original indices — no renumbering occurs.

Parameters:

connectivity (list[tuple[int, int]]) – Pairs of qubits that are connected to each other.

Returns:

QPU topology description.

Return type:

QPUTopology