← Back

Code Distance: The Number Behind “Distance-7”

Error-correction results are labeled by one number, the code distance. It sets how many errors a code can survive and roughly how many qubits it needs, but it does not say how well the code worked.

What the distance counts

The code distanceThe fewest errors that can fool the code; a larger code has a larger distance. of a logical qubitA reliable ‘qubit’ built by bundling many error-prone physical qubits together with error correction. These are the units that actually matter for useful computing., written d, is the fewest physical errors that can flip the protected value undetected.1

A code of distance d can correct up to (d − 1)/2 errors, rounded down.1 So distance 3 survives any single error, and the codes used in experiments grow in steps of two: 3, 5, 7.

Why the qubit count grows like d²

In the surface codeAn error-correcting code that spreads one protected qubit over a square grid of physical qubits., the distance is the width of a square patch, because a logical error has to run from one edge to the other. A wider patch means a longer shortest chain, but the qubit count grows with the area. One superconducting team used 17 qubits at distance 3 and 49 at distance 5.2 A neutral-atom team counted 26, 74 and 146 physical qubits for a pair of codes at distances 3, 5 and 7.3

The same distance-3 code can be laid out on 25, 17 or 13 qubits; the smallest reuses its helper qubits and takes longer per round.1 So “distance 7” does not fix a qubit count.

Two hand-drawn panels titled What One Step Up in Distance Bought. Panel A, shortest undetected error: a 3-by-3 and a 5-by-5 surface-code patch of data qubits and check squares, each crossed top to bottom by a red line through a column of crossed-out qubits; labels read d = 3, 3 errors, 17 qubits, and d = 5, 5 errors, 49 qubits. Panel B, error per round, 2023: two bars on an axis from 0 to 4 percent, d = 3 average 3.028% and d = 5 2.914%, with the note about 4% better.
Figure 1: What one step up in distance bought. A: in a surface code, the shortest error chain that no check notices runs edge to edge, so it has d errors, while the qubit count grows with the patch's area. B: in a 2023 superconducting experiment, the distance-5 code made about 4% fewer errors per round than the average distance-3 code. From the original papers.

What each step buys

Below the thresholdThe error rate below which making an error-correcting code bigger starts to help instead of hurt., each step up in distance divides the logical error rateHow often the information protected by error correction fails anyway, per round of checks or per operation. by a roughly fixed factor, the error suppression factorHow many times the logical error rate falls when the code distance grows by one step, usually by two., Λ. The gains compound. One team notes that at distance 7, halving the physical error rate could in theory cut logical errors 16 times.3 Above threshold, the opposite holds: a bigger code adds more ways to fail than it removes.2

What d = 3, 5 and 7 showed

Distance 3. A 17-qubit superconducting code lost about 3% per round of checks, counting only runs in which no leakage was detected.4

Distance 5. In 2023, a distance-5 code beat the average of four distance-3 codes on the same chip: 2.914% against 3.028% error per round, about 4% better.2 With a faster decoderThe classical algorithm that reads the pattern of error-correction alarms and bets on which errors most likely caused them., the gain was about 2%, and the bigger code was slightly worse than two of the four smaller codes on their own.2 The team estimated its parts had to improve by at least 20% to move below threshold.2

Distance 7. In 2025, the same group showed errors falling with each step from 3 to 7 in stored memory; the Λ Note has the figures.5 Separately, a neutral-atom team improved an entangling gate between two codes from distance 3 to 7, but only with a decoder that used correlations between the codes; with standard decoding, results got worse as the distance grew.3 Its preparation was also not fully protected beyond distance 3.3

How to read a “distance-N” claim

  • Which errors? A distance-25 repetition code guards against bit flips only, so its authors call it unsuitable for quantum algorithms.2
  • Did bigger beat smaller? A distance is a design number. Ask whether the larger code actually had fewer errors on the same machine.
  • How many qubits? Layout and helper qubits change the count.
  • Which decoder, and were runs discarded? Both can move the result.
  • Memory or operations? Storing one logical qubit is a different test from computing with it.

Sources

  1. Y. Tomita and K. M. Svore, “Low-distance surface codes under realistic quantum noise,” Physical Review A 90, 062320 (2014). https://doi.org/10.1103/PhysRevA.90.062320 (arXiv:1404.3747) ↩
  2. Google Quantum AI, “Suppressing quantum errors by scaling a surface code logical qubit,” Nature 614, 676 (2023). https://doi.org/10.1038/s41586-022-05434-1 (arXiv:2207.06431) ↩
  3. D. Bluvstein et al., “Logical quantum processor based on reconfigurable atom arrays,” Nature 626, 58 (2024). Fig. 2 and Methods. https://doi.org/10.1038/s41586-023-06927-3 (arXiv:2312.03982) ↩
  4. S. Krinner et al., “Realizing repeated quantum error correction in a distance-three surface code,” Nature 605, 669 (2022). https://doi.org/10.1038/s41586-022-04566-8 (arXiv:2112.03708) ↩
  5. Google Quantum AI and Collaborators, “Quantum error correction below the surface code threshold,” Nature 638, 920 (2025). https://doi.org/10.1038/s41586-024-08449-y (arXiv:2408.13687) ↩