PricingOpen Lab
Chapter 08 of 12 · ~30 min

Connectivity and Topology

A coupling map is the graph of qubit pairs that can host a two-qubit gate; any pair off the graph must be routed with SWAPs, and each SWAP costs three CX gates. A single long-range CX on a five-qubit line becomes ten two-qubit gates, so topology directly sets circuit depth and error — it is an executable constraint, not a diagram.

What is a coupling map?

A QPU's topology, written down as a coupling map, is a graph: each node is a physical qubit, and each edge joins a pair of qubits that can take part in a two-qubit gate together. If there is no edge between two qubits, no gate can act directly on that pair — full stop.

Think of it as a road map: two-qubit gates can only travel along existing roads. The analogy is honest as far as it goes. Where it breaks: a coupling map can be directed — an edge may support the gate in one orientation only, like a one-way street — and it is version-specific, because a hardware revision or recalibration can add, remove, or re-rate edges. Always check which device version a map describes.

When your circuit asks for a gate between two unconnected qubits, the compiler must do routing: rearranging where the logical qubits live, using SWAP gates, until the required pair sits on an edge. Routing is not free, and the next example prices it exactly.

Continue this chapter

You’ve read the opening of chapter 85 more sections follow, with worked examples and circuits you can run on the page. A free account unlocks every chapter of every course (paid plans aren’t live yet — early readers get everything free).

Create a free accountAll chaptersStart with the free chapters
Connectivity and Topology · QPU137