Quantum error correction and logical qubits, explained
How quantum error correction turns many noisy physical qubits into more reliable logical qubits, and why code distance, thresholds, and surface codes matter.
Quantum error correction is the set of methods used to keep fragile quantum information usable despite noise, decoherence, and imperfect operations. The basic idea is to encode one or more logical qubits into a larger collection of physical qubits, repeatedly measure carefully chosen checks that reveal error information but not the protected quantum state, and then apply recovery steps based on the observed syndrome.
Why quantum computers need error correction
Quantum information is unusually delicate. Errors can come from decoherence and other sources of quantum noise, and in practical quantum computing one must also contend with faulty gates, imperfect state preparation, and measurement mistakes. That makes error correction central not just for storing quantum states, but for running long computations.
Classical error correction works by adding redundancy to bits. Quantum error correction aims for something similar, but with a major constraint: direct measurement of a qubit generally disturbs the state. So a quantum code has to extract information about what went wrong without revealing the logical information itself. In many codes, this is done through measurements of commuting operators called stabilizers.
A useful way to think about the promise of quantum error correction is as a simulation layer: given a noisy physical channel that fits some error model, a quantum error-correcting code can be used to approximate a noiseless logical channel well enough to make communication or computation practical.
Physical qubits, logical qubits, and code distance
A standard notation for a quantum code is [[n,k,d]], meaning that the code encodes k logical qubits into n physical qubits with code distance d.
Those three parameters capture most of the trade-offs:
n: how many physical qubits the code usesk: how many logical qubits are protectedd: the code distance, a measure tied to how hard it is for errors to act like a logical operation
Code rate, k/n, is a basic efficiency metric. Higher rate means less overhead per logical qubit. But higher distance and higher rate generally pull in opposite directions, so code design is about balancing reliability against hardware cost.
In broad terms, a quantum error-correction cycle has three stages:
- Encoding logical information into a larger physical system
- Storage or transmission through a noisy channel
- Syndrome extraction and recovery, which identifies likely errors and corrects them
The syndrome is crucial. Stabilizer measurements are chosen so they reveal only error information, not the encoded quantum state. Otherwise the correction process would destroy the superpositions the computer is trying to preserve.
What kinds of errors do codes target?
The dominant errors depend strongly on the hardware platform. Important examples include:
- Amplitude damping, or excitation loss, associated with relaxation toward equilibrium
- Coherent errors, arising from the system’s internal dynamics
- Dephasing, which is one of the dominant noise processes in many qubit implementations
Even so, many quantum codes work with a simplified model in which errors are treated as combinations of Pauli operations:
Xfor bit-flip-like errorsZfor phase-flip-like errorsYfor combined bit-and-phase errors
This Pauli-based picture does not capture every realistic noise process, but it is widely used because it makes analysis and code construction more tractable. Under that model, syndrome extraction and decoding can often be framed in ways that borrow ideas from classical coding theory.
That simplification comes with a caveat: decoding can still be hard. A code with parameters [[n,k,d]] has 2^(n-k) possible syndromes, which quickly becomes too large for simple lookup tables. In practice, efficient classical decoding algorithms are usually required.
Fault tolerance: correcting errors without making things worse
Error correction alone is not enough for scalable computation. In a computer, the correction machinery itself uses gates, measurements, and prepared ancillas that can all fail. This is where fault tolerance enters.
The central idea is to design encoding, syndrome measurement, and recovery so that a small number of physical faults does not spread into an uncorrectable logical failure. Quantum error correction says this is tied to the quantum threshold theorem: arbitrarily long quantum computations are possible by recursively concatenating codes, provided the error rate of individual quantum gates stays below a threshold.
Quantum error correction gives a historical estimate from 2004 that this threshold could be as high as 1–3%, assuming enough qubits are available. It also gives the intuition for why a threshold matters: below it, correction removes more errors than it introduces; above it, the correction process can become net harmful.
This threshold concept is one reason logical qubits are such a useful abstraction. A logical qubit is not a single device element but an encoded object whose effective error rate can, in principle, be pushed lower by adding more physical resources and using better fault-tolerant procedures.
Major code families and what they optimize
Different code families make different trade-offs between overhead, distance, structure, and ease of implementation.
| Code family | Key idea | Notable trade-off or feature |
|---|---|---|
| Shor code | Generalizes to [[d^2,1,d]]; uses inner and outer repetition codes to separately handle bit-flip and phase-flip errors |
Increases distance, but with lower code rate |
| Steane / quantum Hamming codes | Replaces repetition structure with the classical [7,4] Hamming code and treats X and Z errors symmetrically |
Better code rate than Shor-style repetition |
| CSS codes | General framework derived from related constructions by Calderbank, Shor, and Steane | Separates X and Z stabilizers, which is helpful for fault-tolerant syndrome measurement |
| Five-qubit code | Uses four stabilizers mixing X and Z; not a CSS code |
Smallest possible code that protects one logical qubit against arbitrary single-qubit errors |
| Surface code | Topological stabilizer code on a 2D lattice | Local checks and planar layout are experimentally attractive |
The five-qubit code is especially important conceptually. It is the smallest possible code that can protect one logical qubit from arbitrary single-qubit errors, a fact related to the quantum Hamming bound.
Quantum error correction also mentions non-additive codes, which lie beyond the stabilizer formalism used by [[n,k,d]] additive codes. These may achieve higher code rates in some cases, but are considerably harder to construct and analyze, so they remain less explored.
Why surface codes became so important
Among modern code families, surface codes are pivotal for scalable quantum error correction in 2025. The main reason is architectural: they are defined using local stabilizer measurements on a two-dimensional lattice, which is friendlier to many hardware platforms than codes needing long-range interactions.
The surface code is a topological stabilizer code. In the toric version introduced by Alexei Kitaev in 1997, qubits sit on the edges of a 2D lattice, and stabilizers are associated with vertices and plaquettes. Errors show up as violations of these stabilizers.
A useful picture is that an error creates or moves localized defects, described as anyons:
- a
Zerror flips neighboring vertex stabilizers - an
Xerror flips neighboring plaquette stabilizers
Correction amounts to pairing and re-annihilating these defects. If the resulting paths are topologically trivial, the net effect is just a stabilizer and the logical information is unchanged. If a path is topologically non-trivial, the process acts like a logical operator and the encoded information is altered.
That geometric interpretation is one reason surface codes are so intuitive. Code distance becomes the minimum length of a non-trivial path or loop that implements a logical error.
Toric, planar, and rotated planar surface codes
Several related geometries are important.
The toric code uses periodic boundary conditions, topologically equivalent to a torus. For a d × d lattice it has 2d^2 qubits, and its code space is four-dimensional, so it stores two logical qubits.
For hardware, open boundaries are often more practical, which leads to the planar code. But boundary design matters. A surface code with only one boundary type does not encode a logical qubit. To create a non-trivial code space, one needs alternating smooth and rough boundaries. With smooth top and bottom boundaries and rough left and right boundaries, the planar code stores one logical qubit, and the minimum topologically non-trivial paths have length d, giving code distance d.
The rotated planar code is an efficiency improvement. Surface code says a distance-d rotated planar code uses d^2 physical qubits, versus d^2 + (d − 1)^2 for the unrotated planar version, while keeping the same code distance.
Thresholds, decoding, and what “below threshold” means
Surface codes are also notable for relatively high thresholds under standard noise models. For a model where bit and phase errors happen independently on each qubit with probability p, Surface code reports:
- a critical probability of around 11% from a statistical-physics mapping
- around 10.5% when using the widely used minimum weight perfect matching decoder
Those numbers are important, but they need interpretation. First, they depend on the assumed error model. Second, the theoretical limit is only useful if there is a practical decoder that gets close to it. Third, some decoders perform worse when bit and phase errors are correlated, such as under depolarizing noise.
So “below threshold” does not mean a system is error-free. It means that, in principle, increasing code size can reduce the logical error rate rather than making matters worse.
Beyond qubit block codes
Quantum error correction is broader than qubit-to-qubit block codes. Quantum information can be encoded into qudits or into oscillators, which have infinitely many energy levels. Bosonic approaches such as cat, GKP, and binomial-style ideas exploit redundancy within a single oscillator rather than spreading one logical qubit across many two-level systems.
That highlights an important open design question for the field: should redundancy live across many physical qubits, within higher-dimensional systems, or in hybrids of both?
Where the field stands in 2025
Surface codes are especially consequential in 2025. Quantum error correction states that they enable below-threshold logical qubits with improved fidelity in superconducting systems, and separately notes that Google Quantum AI implemented a distance-7 planar code on its Willow superconducting processor, demonstrating a below-threshold physical error rate.
That does not mean the broader challenge is solved. Logical qubits still require substantial overhead, decoding remains a real systems problem, and performance depends on matching code choice to the actual hardware noise. But it does indicate why logical qubits are now a practical engineering target rather than only a theoretical construct.
Key takeaways
- Quantum error correction protects fragile quantum information by encoding logical qubits into larger physical systems and repeatedly extracting error syndromes.
- The standard
[[n,k,d]]notation captures the main trade-off: physical overhead versus protected logical capacity and code distance. - Most widely used codes simplify hardware noise into
X,Y, andZPauli errors, even though real devices also show effects such as amplitude damping and dephasing. - Fault tolerance matters because the correction process itself is noisy; the threshold theorem says scalable computation is possible only below a certain physical error rate.
- The five-qubit code is the smallest code that can protect one logical qubit against arbitrary single-qubit errors.
- CSS codes are valued because they separate
XandZstabilizers, which helps with fault-tolerant syndrome measurement. - Surface codes are prominent because their stabilizers are local on a 2D lattice, making them experimentally attractive.
- In surface codes, logical failure corresponds to topologically non-trivial error paths; code distance is the minimum size of such a path.
- Rotated planar surface codes reduce qubit count relative to unrotated planar codes while preserving distance.
- Reported threshold values and recent demonstrations are encouraging, but practical performance still depends on hardware noise, decoder quality, and large physical-qubit overheads.
Sources
Facts on this page come from the sources below, retrieved by DesignQuantum.
- Quantum error correction en.wikipedia.org
- Surface code en.wikipedia.org