A calculation is built from gates. A one-qubit gate nudges a single qubit; the real work happens in the two-qubit gateA gate that acts on two qubits at once, such as the CNOT. Much harder to perform accurately than a single-qubit gate, and the real test of a machine., where two qubits act on one another and entanglementA quantum link where two qubits' states become tied together, so acting on or measuring one affects the other. It is a key resource for quantum computing. enters. Connectivity is simply which pairs on a chip can run a two-qubit gate directly. If every qubit can reach every other, the machine has all-to-all connectivityWhen every qubit can interact directly with every other qubit, rather than only with its immediate neighbors.. If each can only couple to the qubits beside it, it has nearest-neighbor connectivityWhen a qubit can only interact with the qubits physically next to it, a limitation of some hardware designs..1
In an ordinary chip any bit can reach any other across a bus. Many qubits are locked in place, able to talk only to their neighbours.
That gap is not a detail. In an ordinary computer any bit can reach any other through a shared bus. Many qubits cannot move at all; they sit fixed on the chip and couple only to a handful of neighbours. So an algorithm written as though any qubit may meet any other has to be forced onto hardware where most of them never will.
Figure 1: Two ways to wire a chip. With all-to-all connectivity any pair can act directly; with nearest-neighbor connectivity, reaching a distant qubit costs a chain of SWAP gates.
The cost of distance
When an algorithm needs two qubitsThe basic unit of a quantum computer. Like a 'bit' in a normal computer, but instead of being only 0 or 1 it can be 0, 1, or a blend of both at once. that are not connected, the machine does not give up. It shuffles the information across the chip, step by step, with SWAP gatesAn operation that exchanges the states of two qubits, built from three CNOT gates. Used to shuttle information across a chip when the qubits it needs are not directly connected., until the two values sit side by side. The catch is that a single SWAP gate is itself three CNOT gatesA two-qubit gate that flips a target qubit only when a control qubit is 1. The standard two-qubit building block., and every gate is noisy.1
A SWAP is three gates. Cross a wide chip and the extra gates pile up faster than the answer can survive them.
The penalty is measurable. One group ran the same programs on a fully connected trapped ionA qubit made from a single electrically charged atom held in place by electromagnetic fields and controlled with lasers. machine and on a star-shaped chip of superconducting qubitsA qubit made from tiny electrical circuits chilled to near absolute zero, where they lose all electrical resistance. with near-identical raw gate errors. The gap was stark: a Toffoli gateA three-qubit gate that flips a target qubit only when two control qubits are both 1. Costly to build from simpler gates, so it is a common stress test of a machine. worked 85 percent of the time on the connected machine and only 53 percent on the constrained one, because the latter needed seven extra CNOT gates to route around its layout.2
Li, G., Ding, Y. & Xie, Y. “Tackling the Qubit Mapping Problem for NISQ-Era Quantum Devices.” Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’19), 1001–1014 (2019). DOI: 10.1145/3297858.3304023. Preprint: arXiv:1809.02573.
Linke, N. M., Maslov, D., Roetteler, M., Debnath, S., Figgatt, C., Landsman, K. A., Wright, K. & Monroe, C. “Experimental Comparison of Two Quantum Computing Architectures.” Proceedings of the National Academy of Sciences114, 3305–3310 (2017). DOI: 10.1073/pnas.1618020114. Preprint: arXiv:1702.01852.
Cowtan, A., Dilkes, S., Duncan, R., Krajenbrink, A., Simmons, W. & Sivarajah, S. “On the Qubit Routing Problem.” 14th Conference on the Theory of Quantum Computation, Communication and Cryptography (TQC 2019), LIPIcs135, 5:1–5:32 (2019). DOI: 10.4230/LIPIcs.TQC.2019.5. Preprint: arXiv:1902.08091.
Chamberland, C., Zhu, G., Yoder, T. J., Hertzberg, J. B. & Cross, A. W. “Topological and Subsystem Codes on Low-Degree Graphs with Flag Qubits.” Physical Review X10, 011022 (2020). DOI: 10.1103/PhysRevX.10.011022. Preprint: arXiv:1907.09528.