PricingOpen Lab
Chapter 04 of 12 · ~15 min

Connectivity Constraints

The coupling map is the graph of qubit pairs that can interact directly; a two-qubit gate between unconnected qubits cannot run as written. Routing moves states until the operands are adjacent, and every unit of distance costs extra entangling gates, so distance translates directly into error.

What is a coupling map?

A coupling map is a graph: one node per physical qubit, one edge per pair that can execute a two-qubit gate directly. If two qubits share no edge, no gate between them can run as written — full stop.

Some maps are directed: an edge may support CX with the control on one particular side only. Reversing the direction is possible but costs four extra Hadamard gates around the CX — one on each of the two qubits before the gate and one on each after it, 2 qubits × 2 sides = 4 — using the identity that this H sandwich swaps the roles of control and target (the same H-sandwich trick that turned CZ into CX in the basis and native gates lesson). Single-qubit gates are typically an order of magnitude less error-prone than two-qubit ones, so this is a mild penalty — but it is not free.

When your circuit asks for an interaction with no edge, the compiler routes: it inserts operations that move qubit states across the graph until the two operands sit on a shared edge.

Continue this chapter

You’ve read the opening of chapter 46 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 Constraints · QPU137