In short: Quantum error correction protects fragile quantum information by spreading one logical qubit across many physical qubits, so that random noise and decoherence can be detected and reversed without ever measuring the data itself. Surface codes are the leading approach, but they demand heavy overhead — often hundreds of physical qubits per logical qubit — which is the central engineering challenge of fault-tolerant quantum computing.
Quantum error correction (QEC) is the set of techniques that let a quantum computer store and process information reliably even though its physical qubits are extraordinarily noisy. A classical bit is either 0 or 1, and you can protect it simply by copying it three times and taking a majority vote. Qubits make this far harder: they hold continuous superpositions, they suffer both bit-flip and phase-flip errors, and the no-cloning theorem forbids making an exact copy of an unknown quantum state. QEC solves this by encoding the information non-locally — the logical state lives in the correlations among many physical qubits, not in any single one.
A qubit is only "quantum" while it keeps a well-defined phase relationship between its basis states. Decoherence is the gradual loss of that coherence as the qubit interacts with its environment — stray electromagnetic fields, thermal vibrations, control-line noise, or nearby qubits. Two timescales dominate:
Today's best superconducting and trapped-ion qubits hold coherence for microseconds to seconds, yet a useful algorithm may need millions of gate operations. Without correction, errors accumulate long before the answer appears. QEC does not stop decoherence — it continuously detects and undoes its effects faster than they pile up.
A physical qubit is the real hardware device — a superconducting transmon, a trapped ion, a spin. A logical qubit is the abstract, protected qubit that the algorithm actually uses, built from many physical qubits working together. The logical state is robust because any single physical error disturbs only part of the pattern and can be diagnosed and reversed.
The diagram below shows the structure. Physical qubits split into two roles: data qubits carry the encoded state, and ancilla (measure) qubits repeatedly probe the parity of their neighbours. The stream of parity measurements is called the syndrome.
The surface code is the most studied QEC scheme because it needs only nearest-neighbour interactions on a 2D grid — a natural fit for superconducting chips — and tolerates a relatively high error rate (around 1% per operation). Data qubits sit on the edges of a checkerboard lattice; ancilla qubits sit on the faces and vertices, each repeatedly measuring a local stabilizer: an X-type parity check that catches phase errors, or a Z-type check that catches bit-flip errors.
When an error strikes a data qubit, the two ancillas flanking it flip their outcomes, lighting up as a pair of "defects." A classical decoder (often a minimum-weight perfect-matching algorithm) reads the syndrome history and infers the most likely chain of errors, then applies the opposite operation. Crucially, the logical information is stored in global properties of the lattice, so no local disturbance can corrupt it undetected.
The animation below shows a single error being born on a data qubit and the two neighbouring stabilizers firing — the signal the decoder matches on.
Protection is not free. Each physical qubit you add to a code must itself be good enough — below the code's threshold error rate — or adding more qubits makes things worse, not better. Once below threshold, the logical error rate falls exponentially as you grow the code distance (the lattice size), which is the whole promise of QEC. But the price is steep:
This is why a machine with thousands of physical qubits may still offer only a handful of logical ones. Reducing overhead — through better qubits, smarter codes (such as qLDPC codes), and faster decoders — is the defining race in building a fault-tolerant quantum computer.
Real projects and industry tool flows, with certification.
Explore CourseTron Courses →The no-cloning theorem proves that an unknown quantum state cannot be copied exactly. QEC sidesteps this by spreading one logical state across many entangled qubits rather than duplicating it, and by measuring parity relationships instead of the data itself.
Detection means spotting that an error happened. Fault tolerance is the stronger guarantee that the whole computation — including the gates, the ancillas, and the measurements used to correct errors — keeps working even when those correction operations are themselves imperfect.
The threshold is the physical error rate below which adding more qubits reduces the logical error rate. Surface codes have a famously forgiving threshold near 1% per operation, which is why they are the current front-runner.
It depends on hardware quality and the target error rate, but practical estimates today range from a few hundred to around a thousand physical qubits per logical qubit for demanding algorithms.
Related: quantum decoherence · Glossary · all courses.