Logical Qubit and Resource Overhead
A logical qubit is the unit of information a quantum algorithm actually manipulates once error correction is switched on. Physically it is not a single two-level system but a two-dimensional subspace — the code space — spanned by encoded basis states and . Every piece of machinery in this chapter — stabilizers, syndrome extraction, decoding — exists to hold an arbitrary encoded state steady against the continuous decoherence of the underlying hardware. The question that decides whether a fault-tolerant machine can ever be built is the resource overhead: how many physical qubits, how many time steps, and how many auxiliary operations must be spent per logical qubit and per logical gate to reach a target logical fidelity. Two numbers govern everything. The code distance — the minimum weight of a logical operator — fixes how many errors are correctable, . The accuracy threshold is the physical error rate below which adding correction resources monotonically helps: when the logical failure rate collapses like a high power of , and can be driven arbitrarily low by enlarging at a cost growing only polylogarithmically in . Overhead is genuinely three-dimensional — space (physical-to-logical ratio , roughly for the surface code), time ( rounds of syndrome extraction per logical cycle), and the dominant hidden cost of fault-tolerant non-Clifford gates, produced by magic-state factories that can swallow most of a machine. The threshold theorem ties these into a single guarantee: any -gate circuit runs to failure in operations once — the price of fault tolerance is paid in overhead, not in complexity.
- A logical qubit is a two-dimensional code subspace of many physical qubits, protected so that an arbitrary single-qubit logical operation runs with a logical error rate far below the physical rate .
- Below the accuracy threshold , a distance- code suppresses logical error as : each two units of distance buy another factor of at fixed hardware quality.
- Space overhead is physical qubits per logical qubit for the surface code, giving overhead ; time overhead is syndrome-extraction rounds per logical cycle.
- The third and usually dominant axis is magic-state distillation for non-Clifford gates: the Eastin–Knill theorem blocks a transversal universal gate set, so the gate is distilled at per round in factories that often outweigh the data block.
- The threshold theorem guarantees an ideal -gate computation is simulable to failure with overhead per gate, provided .
- Concrete scale: factoring a 2048-bit RSA modulus is estimated at physical qubits at — the overhead, not the algorithm, sets feasibility.
- Key idea: A logical qubit is a code subspace whose effective error rate can be driven exponentially below the physical rate by increasing the code distance — but only when , and at a physical-qubit and time cost that grows like a power of .
Where this lives today
Resource overhead is no longer only a theorem; it is the number every hardware roadmap is judged against. In 2023 Google's Quantum AI team ran a surface code at distances 3 and 5 and reported that the distance-5 logical qubit had a lower error rate than the distance-3 one — the first convincing demonstration of the below-threshold signature in a solid-state device, later extended toward distance 7. Neutral-atom and trapped-ion platforms (QuEra, Quantinuum) have since produced dozens of logical qubits and run small encoded algorithms, each result reported in the currency of this article: physical-to-logical ratio, logical error per cycle, and -gate budget. On the estimation side, Gidney and Ekerå's 2019 analysis put a sharp number on the old – folklore: factoring a 2048-bit RSA key would take about 20 million noisy physical qubits and 8 hours at , with the magic-state factories consuming a large share of the footprint — a figure that has driven both the "harvest-now, decrypt-later" urgency in post-quantum cryptography and an intense hunt for cheaper distillation and higher-rate quantum-LDPC codes that could slash the overhead by orders of magnitude.
The physical picture
Think of a logical qubit as a message written redundantly across many sheets of paper, where no single sheet carries the message. To corrupt it an adversary must alter at least sheets at once; if each sheet is independently smudged with probability , an uncorrectable pattern of smudges appears with probability , tiny for small . Adding sheets — increasing — pushes that failure probability down exponentially. The first figure makes the redundancy concrete: a distance-5 surface-code patch, one logical qubit spread across about physical qubits, whose logical operators are error chains that must span the whole patch.
The threshold is a tipping point. Each layer of protection removes errors but also introduces fresh opportunities for error in its own circuitry. If physical components are good enough () each added layer removes more than it adds and protection compounds; if they are too noisy () the correction machinery injects more errors than it fixes and bigger codes are strictly worse. The entire feasibility of scalable quantum computing hinges on living below that line. The second figure is the operational signature: logical error rate versus code distance for several fixed physical error rates. Below threshold the curves fan downward, exponentially in ; above threshold they turn upward — the same picture experimental teams now measure to certify a working logical qubit.
Overhead is the toll for that exponential suppression, and the hardest part of the toll is hidden in the gates. Clifford operations can often be done transversally — bitwise, error-spread-free — but a universal set needs something like the gate, which no useful code implements transversally (Eastin–Knill). Producing fault-tolerant gates means manufacturing and purifying special magic states in dedicated factories, and those factories, not the data qubits, typically set the qubit count and runtime of a real machine.
The core equations
A logical qubit is defined not by hardware but by a subspace. The code space is the two-dimensional protected corner of a many-qubit Hilbert space in which the encoded information lives, and every stabilizer measurement is a check that the state has not left it.
where: — code space, the protected two-dimensional subspace; — physical qubits in the encoding block; — encoded (logical) computational basis states. Reading: the "qubit" the algorithm sees is this subspace, not any single physical device. A code is labelled by its three parameters and the number of errors it is guaranteed to fix. The correctable weight follows directly from the distance: to certainly undo any error you need enough distance that the true error is the closest one to the observed syndrome.
where: — logical qubits encoded (dimension ); — code distance, the minimum weight of a nontrivial logical operator; — number of arbitrary single-qubit errors correctable with certainty. Reading: distance buys correction of errors, so corrects one, corrects two. Below threshold the logical error rate is set by the lightest uncorrectable fault. That fault has weight , so its probability — and hence — scales as raised to that power, normalized by the threshold.
where: — logical error rate per logical operation; — physical error rate; — accuracy threshold; — prefactor counting fault configurations. Reading: the exponent is , so two extra units of distance multiply by another factor . The sign of the distance-derivative is what separates a useful code from a harmful one. It flips exactly at the threshold, which is why is the number that decides whether error correction is worth doing on given hardware.
where: — the marginal change in logical error from one more unit of distance. Reading: below threshold more distance helps; above it, more distance hurts; at distance is neutral. Turning distance into a hardware bill needs a geometry. For the planar surface code the patch is roughly square, so its qubit count grows as the area , and inverting equation (3) makes the required distance grow only logarithmically in .
where: — physical qubits per logical qubit (data plus ancilla) in the planar surface code. Reading: the space overhead is polylogarithmic in the target error rate — cheap asymptotically, but a factor of for the distances of a real machine. Fault tolerance costs time as well as qubits. A single logical operation is not one round of measurement but rounds, so that a measurement error occurring partway through decoding is itself outvoted by the majority.
where: — wall-clock duration of one fault-tolerant logical operation; — duration of one syndrome-extraction round; — rounds needed so measurement errors are themselves correctable. Reading: the logical clock is slower than the physical clock by a factor that itself grows with the distance. The threshold theorem packages all of this into a single asymptotic statement. It says the per-gate overhead grows only polylogarithmically with the size of the computation, so fault tolerance never changes an algorithm's complexity class.
where: — total physical operations to simulate the ideal circuit; — ideal circuit size (gate count); — tolerated total failure probability. Reading: correcting errors multiplies the work by a mere polylogarithm — the mathematical content of "fault tolerance is affordable." The universal gate that no code hands you for free is manufactured by distillation. The 15-to-1 protocol consumes fifteen noisy magic states and outputs one that is cubically cleaner, because its code needs three simultaneous input faults to fail undetectably.
where: — error rate of input (noisy) magic states; — error rate of the single distilled output. Reading: each round cubes the error (with a factor 35 counting the weight-3 failure patterns), so two rounds take . Finally, the honest measure of cost is neither pure space nor pure time but their product — the spacetime volume, the resource that a compiler for a fault-tolerant machine actually minimizes.
where: — physical qubits per logical qubit; — syndrome rounds per logical operation. Reading: a logical operation costs physical qubit-rounds, and it is this product — dominated in practice by magic-state factories — that sizes a machine.
The goal is to explain the single most important scaling in this article — that a distance- code suppresses logical error as rather than — by tracing it to the weight of the lightest fault the decoder cannot undo, and to show why the exponent is governed by correction (half the distance) and not by detection (the full distance). We count fault configurations combinatorially, keep only the dominant power of , and fold the rest into the prefactor and the threshold .
Step 1. A distance- code corrects every error whose weight is at most , because any two such errors produce distinguishable syndromes and the true error is the unique lightest one consistent with what is measured. The lightest error the decoder can misidentify therefore has weight . Why: correction, unlike mere detection, must pin the error uniquely, and unique decoding fails first at half the distance — this is where the factor of two between and the exponent is born.
Step 2. With independent fault locations each failing with probability , the chance of a specific weight- fault is , so the probability of an uncorrectable event is dominated by its lightest term, , giving . Why: for small the sum over uncorrectable weights is controlled by its lowest power of ; heavier faults are suppressed by additional factors of and can be neglected to leading order.
Step 3. Absorb the binomial and gadget-dependent constants into a prefactor and define the crossover scale where the geometric series stops converging, so the estimate takes the universal form with . Why: writing the ratio rather than alone exposes the threshold structure directly — the suppression is exponential in if and only if the base is below one. *Verified: gives exponents for ; matches equation (3) and Preskill Ch. 7.*
Go deeper · Derivation B · 2 minThreshold from one level of concatenation
The goal is to derive the accuracy threshold and the doubly-exponential suppression of concatenated codes from a single recursion, showing that a distance-3 gadget used inside itself renormalizes the physical error to , that this contracts precisely when , and that iterating levels squares the error ratio each time while costing only a polylogarithmic number of physical qubits per logical qubit. This is the original route (Aharonov–Ben-Or, Knill–Laflamme–Zurek) by which the threshold theorem was first proven.
Step 1. Encode each qubit and gate of a circuit into a distance-3 code that corrects one fault; a level-1 logical location fails only if at least two of its constituent physical locations fail, so with malignant pairs the level-1 error is . Why: single faults are corrected by construction, so the leading failure is a coincidence of two faults — the that makes recursion contract.
Step 2. Define the threshold as the fixed point of the recursion by writing with ; then exactly when , so below threshold one level of encoding already reduces the error. Why: the map has an unstable fixed point at ; starting below it flows to zero, starting above it flows to one — the sharp all-or-nothing character of fault tolerance.
Step 3. Concatenate levels, encoding the logical qubits of one level into the next; the ratio squares at every level, so — the error falls doubly-exponentially in the number of levels. Why: squaring a number below one times drives it to zero with breathtaking speed, which is why only a handful of levels reach any realistic target.
Step 4. A block of physical qubits per encoded qubit costs physical qubits per logical qubit after levels; inverting the boxed suppression for a target gives , only doubly-logarithmic in , so . Why: because the required level count grows so slowly, the exponential-looking collapses to a mere polylogarithm — the overhead heart of the threshold theorem.
Verified: reproduces Aharonov–Ben-Or / Preskill Ch. 7 — contraction at , doubly-exponential suppression, and overhead.
Go deeper · Derivation C · 2 minSizing a fault-tolerant computer from an algorithm
The goal is to convert an algorithm's abstract demand — some number of logical gates, all of which must succeed — into a concrete surface-code distance and physical-qubit budget, and to expose in the process why the magic-state factories rather than the data qubits set the size of a useful machine. We union-bound the failure probability, invert the surface-code error formula for the required distance, multiply by the per-qubit footprint, and add the distillation overhead.
Step 1. For the whole computation to succeed with probability at least one half, a union bound over its logical operations requires each to fail with probability , so a computation with operations needs per logical gate. Why: errors add to leading order, so the per-operation budget shrinks in proportion to the circuit size — deeper algorithms demand exponentially reliable logical qubits.
Step 2. Invert the surface-code error law to get ; at and the denominator is , so hitting takes of order –. Why: the required distance grows only logarithmically in the target error, which is why even trillion-operation algorithms need distances of a few dozen, not a few thousand.
Step 3. Each logical data qubit then occupies , on the order of physical qubits for ; a machine holding a few thousand logical qubits already needs several million physical qubits for data alone. Why: the quadratic area cost turns a modest distance into a thousand-fold qubit multiplier — the price of a two-dimensional layout.
Step 4. Sustaining the algorithm's -rate requires magic-state factories, each itself many logical qubits, running in parallel to feed the data block; these typically multiply the data footprint by an order of magnitude, yielding the widely-quoted physical qubits for cryptographically relevant factoring at . Why: because non-Clifford gates cannot be transversal, the factories are unavoidable and dominant — the overhead, not the circuit, is the bottleneck.
Verified: consistent with Fowler et al. (2012) surface-code estimates and Gidney–Ekerå (2019) factoring figures; numbers are order-of-magnitude and depend on , layout, and distillation choice.
Limiting cases
How the logical error rate and overhead behave in the characteristic regimes:
| Case | Result | Meaning |
|---|---|---|
| Deep sub-threshold | Logical error falls super-exponentially in ; modest distances suffice and overhead is dominated by gate (magic-state) cost, not memory. | |
| Near threshold | nearly -independent | Adding distance barely helps; the needed for a target diverges, so overhead blows up. Hardware must be pushed well below . |
| Above threshold | Larger codes make things worse: the correction machinery injects more error than it removes. No overhead yields a usable logical qubit. | |
| Asymptotic guarantee | overhead/gate | For a size- circuit and target failure , total cost is when ; overhead grows only polylogarithmically in problem size. |
Worked examples
1 · Sizing a logical qubit for a target error rate (fully worked)
Hardware runs at physical error with a surface-code threshold and prefactor . What distance is needed for a logical error per cycle, and how many physical qubits does that logical qubit cost?
Step 1. Write the suppression law with the given numbers: , since . The base is one-tenth, so every two units of distance gain one decade.
Step 2. Solve for the distance: gives , hence and . A distance-21 patch corrects physical errors.
Step 3. Convert to qubits with the surface-code area law: physical qubits, of which are data and are syndrome ancilla. So a single logical qubit at costs roughly 900 physical qubits — and that is memory only, before any factory. d = 21, t = 10, n ≈ 882 physical qubits per logical qubit.
2 · Purifying magic states by distillation (fully worked)
A device produces raw magic states at error . How clean is the output after one round of 15-to-1 distillation, and after two? What is the raw-state cost of a twice-distilled output?
Step 1. One round applies . A single round already carries to below — a cubic gain.
Step 2. Feed those outputs into a second round: , deep below anything an algorithm needs. Each round cubes the exponent, so the error plummets triple-exponentially in rounds.
Step 3. Count the raw states: one round needs 15 inputs per output, so a twice-distilled state needs raw magic states (before accounting for discarded rejected batches). This is the qubit-time the factory spends per usable gate — the reason distillation dominates the resource budget. One round: 3.5×10⁻⁸; two rounds: 1.5×10⁻²¹; cost 225 raw states per output.
3 · Does adding distance help this hardware? (decision)
One team runs at , another at ; both use a code with . For each, does going from to lower the logical error?
Step 1. Team A has , so . By equation (4) the derivative : raising from 5 to 7 raises (from to times the prefactor-threshold scale). No — more distance makes it worse.
Step 2. Team B has , so ; going changes the exponent from 3 to 4, multiplying by , a five-fold improvement. Yes — each two units of distance cut by a factor of 5. The lesson: error correction is a threshold phenomenon, and Team A must first improve its hardware before any code can help.
Physics of the portrait
Fault-tolerant quantum computing has many parents, but one figure turned "qubits are hopelessly fragile" into "qubits are an engineering problem with a known price." Peter Shor built the first logical qubit and then proved that its overhead could be kept under control.
Origins · 1 minPeter Shor and how this was discovered
Peter Williston Shor is the applied mathematician whose 1994 factoring algorithm made quantum computers matter — and who, one year later, made them possible. The immediate objection to his algorithm was decoherence: a quantum state cannot be copied (no-cloning), so the classical trick of triplicating a bit seemed forbidden, and it was widely believed error correction was impossible in principle. In 1995 Shor demolished that belief with the first quantum error-correcting code, a nine-qubit encoding that protects one logical qubit against an arbitrary single-qubit error by digitizing continuous noise into discrete Pauli flips and correcting bit and phase errors separately. In 1996 he went further, showing in "Fault-Tolerant Quantum Computation" how to perform encoded gates and syndrome extraction without letting a single component failure cascade — the birth of fault-tolerant gadgets and transversal gates. Together with the threshold work of Aharonov and Ben-Or, Knill, Laflamme and Zurek, and Kitaev, this established the accuracy threshold theorem: below a critical physical error rate, arbitrarily long computations run at only polylogarithmic overhead. Shor, long at MIT, thereby converted the resource question from "can it be done?" to "how many qubits does it cost?" — the question this article answers. His codes and his threshold are the reason the phrase "logical qubit" means something buildable rather than a theorist's fiction.
Going further
Texts. Nielsen & Chuang, Quantum Computation and Quantum Information, Ch. 10 (quantum error correction and fault tolerance) · Preskill, Lecture Notes on Quantum Computation, Ch. 7 (fault tolerance and the threshold) · Kitaev, Shen & Vyalyi, Classical and Quantum Computation, Ch. 15 · Aharonov & Ben-Or, Fault-Tolerant Quantum Computation with Constant Error (1997) · Fowler, Mariantoni, Martinis & Cleland, Surface codes, Phys. Rev. A 86, 032324 (2012) · Bravyi & Kitaev, Universal quantum computation with ideal Clifford gates and noisy ancillas, Phys. Rev. A 71, 022316 (2005) · Gidney & Ekerå, How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits (2019).
Provenance. The logical-error scaling and concatenation threshold follow Preskill Ch. 7 and Aharonov–Ben-Or (1997); the surface-code count and -round logical cycle follow Fowler et al. (2012); the result is Bravyi–Kitaev (2005). A verifier should recompute: the exponent from (giving for ); the concatenation recursion ; the inversion yielding ; the sizing arithmetic ; and the distillation chain , . The -qubit factoring figure is order-of-magnitude and architecture-dependent (Gidney–Ekerå 2019).
Prerequisites. Quantum Error Model and Decoherence Channels · Code Distance and Logical Operators · Stabilizer Formalism · Syndrome Measurement and Decoding. Leads to. CSS Codes · Quantum Hamming and Singleton Bounds · Pauli Group and Clifford Group.
Ask the tutor: Want to work through the distance-and-qubit budget for a specific algorithm, or see why the magic-state factory usually outweighs the data block?
What exactly makes a logical qubit different from a physical qubit?
A physical qubit is a single two-level device; a logical qubit is a two-dimensional subspace carved out of many physical qubits. The distinction matters because information stored in a subspace can be protected: an error must have weight at least (the code distance) to move an encoded state to another valid encoded state undetectably, whereas a single physical qubit is corrupted by any single fault. All the machinery of stabilizer codes exists to detect when a state has drifted out of and to push it back without ever learning — and thereby collapsing — the encoded superposition itself.
Why does the logical error scale as p^⌊(d+1)/2⌋ and not p^d?
Because correction is harder than detection. A distance- code can detect up to errors, but to correct it must uniquely identify the fault, and unique decoding first fails at weight — roughly half the distance. The probability of that lightest uncorrectable event scales as , so that is the exponent that governs . The full distance would appear only if you merely wanted to notice errors (as in a detection or post-selection scheme), not to fix them on the fly. This factor of two is why a distance-5 code corrects two errors, not four.
What is the accuracy threshold, physically?
It is the physical error rate at which error correction breaks even. Every layer of correction both removes errors from the data and adds new error opportunities in its own syndrome-extraction and decoding circuitry. Below the removal wins, so bigger codes are better and can be driven to zero; above the added errors win, so bigger codes are worse. Mathematically it is the unstable fixed point of the error-renormalization map : start below and you flow to zero, start above and you flow to one. Realistic surface-code thresholds are around , which is why hardware aims for .
Why do magic states dominate the resource cost?
Because a universal gate set needs a non-Clifford gate such as , and the Eastin–Knill theorem forbids any code from implementing a universal set transversally — the one safe, error-spread-free way to apply gates. Clifford gates (which alone are not universal and are efficiently simulable classically) can often be transversal, but the gate cannot. The workaround is to prepare special "magic states" offline and consume them to teleport a into the data, and preparing them cleanly enough requires distillation factories running many rounds of protocols like 15-to-1. Those factories are large fault-tolerant circuits in their own right, and in full resource estimates they typically occupy more qubits and time than the data they serve.
If overhead is only polylogarithmic, why are the qubit counts so enormous?
Polylogarithmic is an asymptotic statement about how the cost grows, not a claim that the constant is small. The threshold theorem promises overhead , but for a real algorithm must be around , and with – is already physical qubits per logical qubit. Multiply by thousands of logical qubits and by an order-of-magnitude factory overhead and you reach the millions. The theorem guarantees the cost does not blow up worse than polylogarithmically with problem size — it does not make the prefactor small. Reducing that prefactor, via better codes and cheaper distillation, is the central engineering effort today.
How is time overhead different from space overhead, and does it matter?
Space overhead is how many physical qubits one logical qubit occupies (); time overhead is how many physical time steps one logical operation takes ( rounds of syndrome extraction). They are genuinely separate axes, and the honest cost is their product — the spacetime volume of equation (9). Time overhead matters because a logical clock cycle needs measurement rounds so that a measurement error occurring mid-decoding is itself outvoted; a distance-25 code therefore runs its logical gates roughly 25 times slower than its physical clock. When compilers optimize a fault-tolerant circuit they trade space against time — more factories run gates faster but cost qubits — minimizing volume, not either axis alone.
Could a different code make the overhead much smaller?
Possibly, and this is an active frontier. The surface code has a vanishing rate : each logical qubit needs its own -qubit patch. Quantum low-density parity-check (qLDPC) codes achieve constant rate , packing many logical qubits into a shared block, which could cut memory overhead by one to two orders of magnitude. The catches are connectivity (good qLDPC codes need non-local qubit couplings) and gates (performing fault-tolerant logic and distillation on them is harder than on the geometrically clean surface code). The overhead framework of this article — space, time, and gate cost weighed against threshold and decoding complexity — is exactly what makes such code comparisons quantitative rather than a matter of taste.