Pricing…Open Lab
Chapter 08 of 12 · ~30 min

Connectivity and Topology

A coupling map is a drawing of which qubit pairs can do a two-qubit gate together. Any pair not on the map must be routed with SWAPs, and each SWAP costs three CX gates. One long-distance CX on a line of five qubits becomes ten two-qubit gates. So the layout, called the topology, directly sets how long a circuit runs and how many errors it collects. It is a real limit, not just a diagram.

What is a coupling map?

A QPU's topology is the pattern of links between its qubits. Written down, it is called a coupling map. It is a graph: a set of dots joined by lines. Each dot (a node) is a physical qubit. Each line (an edge) joins two qubits that can do 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 roads that exist. The example is honest as far as it goes. Here is where it breaks. First, a coupling map can be directed. That means an edge may allow the gate in one direction only, like a one-way street. Second, a map belongs to one version of the device. A hardware update or a new round of calibration (tuning) can add, remove, or re-rate edges. Always check which device version a map describes.

What if your circuit asks for a gate between two qubits with no road between them? The compiler must do routing. It moves where the qubits' data lives, using SWAP gates, until the pair sits on an edge. Routing is not free. The next example puts an exact price on it.

What the rest of this chapter covers
  1. How much does distance cost? A worked example
  2. Run it: routing in miniatureINTERACTIVE
  3. Change one thingINTERACTIVE
  4. How many links do all-to-all, grid, and heavy-hex layouts give you?
  5. On real hardware
Keep learning with Pro

You’ve read the opening of chapter 8. Pro unlocks the other 5 sections — plus every chapter of every course, with circuits you can run right on the page. That’s $11.99 a month, about the price of a coffee, or $99.99 a year (save 30%). The first chapter of every course, and the whole math course, stay free.

Start learning with ProSee plansRead chapter 1 free
Connectivity and Topology · QPU137