Surface codes
Surface codes are topological stabilizer codes with local checks on a two-dimensional arrangement, where nontrivial logical operators follow paths determined by boundaries or topology.
On this page
Explanation and significance
The attraction is the compatibility between local interactions and scalable error correction. Check outcomes reveal endpoints of error chains, while a logical failure occurs when an error plus recovery forms a nontrivial path. The code is a family, not one fixed circuit: rotated and unrotated layouts, boundary choices, gate schedules and decoders change resources and failure mechanisms. It is therefore misleading to attach one universal threshold or qubit overhead to the phrase surface code.
Mechanism and mathematical structure
In a planar CSS construction, X- and Z-type checks have even overlap so they commute. A logical Z path connects one pair of appropriate boundaries, while a logical X path connects the complementary pair and crosses it an odd number of times. Code distance is the shortest nontrivial logical path in the ideal geometry. For the standard rotated distance-d patch with odd d, n_data=d² and n_check=d²-1, giving 2d²-1 physical qubits if one ancilla is assigned per check and no extra leakage-removal or routing hardware is counted.
Fully worked reference example
For d=3 the rotated patch has 9 data qubits and 8 check ancillas, for 17 counted components. For d=5 it has 25 data qubits and 24 ancillas, or 49. For d=7 it has 49+48=97. These are layout counts, not predictions of measured performance. A phenomenological low-error fit often uses p_L≈A(p/p_th)^((d+1)/2), with model-dependent A and p_th. If illustrative values are A=0.1, p/p_th=0.1 and d=5, the estimate is 10^-4 per chosen logical unit. Raising d to 7 gives 10^-5 under the same assumptions. That extrapolation is synthetic and must never be presented as data from a device.
Limits and misconceptions
Local checks can still propagate correlated hook errors through ancillas. Boundaries, schedule ordering and measurement errors matter. A memory below threshold does not establish reliable non-Clifford gates or useful application runtime. Current experimental results belong in dated milestone records; stable reference text should explain the task, code and error model so it remains valid when records change.
Scientific relationships
Is a CSS topological code. Depends on syndrome decoding and local circuit design. Is used in lattice surgery and logical resource estimates. Is an alternative to color and quantum LDPC codes, with different connectivity and overhead tradeoffs.
Why topological error chains can be locally invisible
In a surface-code picture, a short error string changes checks near its endpoints because interior contributions cancel in pairs. A longer string with the same endpoints can produce the same syndrome. Recovery supplies another path connecting those endpoints. The combined error-and-recovery path is harmless if it is equivalent to stabilizers, but can act logically if it connects the relevant boundaries or wraps nontrivially through the topology.
Consider two candidate Z paths between the same defects. Their product forms a closed loop. A contractible loop is generated by local stabilizers in the appropriate ideal geometry, so both recoveries have the same logical effect. A loop crossing a nontrivial boundary relation can differ by logical Z. The decoder therefore needs enough evidence to choose a likely homology class, not merely any path that removes visible defects. This is the geometric version of the normalizer-versus-stabilizer distinction.
Measurement errors add a time dimension. A wrong check outcome in one round can create two neighboring detection events along the temporal direction. Data faults create spatial or mixed space-time patterns depending on the extraction circuit. The decoding object is therefore a space-time fault graph, not simply a two-dimensional snapshot of one lattice. Boundaries at initialization and final measurement encode assumptions about the logical state being prepared and read.
Space-time accounting for a protected memory
For a rotated patch with distance d=9, the basic count is 81 data qubits and 80 check ancillas, or 161 components. If each round takes1 microsecond and a logical operation requires nine rounds in a chosen protocol, the corresponding patch-time block is 161×9=1,449 qubit-microseconds. This is a space-time accounting unit, not an error probability. A different syndrome schedule, readout duration or additional leakage-removal ancilla changes the number.
Suppose a synthetic subthreshold model predicts p_L=10^-6 per round. A memory lasting1,000 rounds has a union-bound failure probability at most0.001. Under an independent logical-flip model, the odd-flip probability is[1-(1-2×10^-6)^1000]/2≈0.000999002. These estimates answer slightly different questions and both depend on the model. The experiment must specify whether the measured logical observable detects all relevant error types and how final readout error is separated.
Increasing distance from 9 to 11 raises the basic count from 161 to 241, about 49.7%. Increasing operation duration from 9 to 11 rounds raises the space-time cost by (241×11)/(161×9) ≈ 1.829, even if the logical error falls by an order of magnitude. The patch topology provides protection structure. The qubit count, extraction rounds, and error assumptions determine the operational cost.
A logical memory has more than one decay channel
Even when a decoded surface-code memory is well approximated by a stochastic logical Pauli channel, one fitted lifetime does not determine the whole channel. Let p_X, p_Y, and p_Z be the probabilities of the three nonidentity logical Paulis per round. Logical Z expectation is multiplied by lambda_Z=1-2(p_X+p_Y), because X and Y reverse its sign. Similarly lambda_X=1-2(p_Y+p_Z), and lambda_Y=1-2(p_X+p_Z).
If independent stationary rounds are assumed, the corresponding expectation after T rounds is its initial value times lambda_A^T. Measuring all three decay constants permits p_X=(1-lambda_Y-lambda_Z+lambda_X)/4, with cyclic expressions for p_Y and p_Z. A fitted negative probability signals statistical uncertainty or failure of the simple stationary Pauli model; it should not be silently clipped without discussing the fit and its constraints.
For synthetic probabilities p_X=0.00010, p_Y=0.00002, and p_Z=0.00030, the logical-Z sign-flip probability per round is 0.00012, while logical-X sign flips occur with probability 0.00032. Total nonidentity probability is 0.00042. Reporting the Z-basis figure as the complete logical error rate would miss the stronger phase channel. Coherent logical rotations, drift, and correlations across rounds require a more general model than these three probabilities.
Temporal protection must match the operation being performed
Repeated extraction supplies a time direction in addition to the spatial code lattice. If a parity operation is inferred from only a few noisy rounds, a chain of measurement faults can connect its temporal boundaries even when spatial data-error paths remain long. The relevant minimum fault weight therefore depends on the duration and boundary conditions of the operation, not only on the distance of a static patch.
For a memory experiment initialized and measured in a known logical basis, boundary information can change which temporal paths are dangerous. For a lattice-surgery parity measurement, the newly introduced checks have different initialization relationships, and the measured parity may need repeated temporal evidence. A rule such as running d rounds is a design choice associated with a particular protocol and its target distance; it is not a universal definition of one logical gate. The extraction circuit and detector graph are the objects that determine the actual fault paths.
This is also why a distance inferred from data-only errors can overestimate the protection of an implemented schedule. A hook fault propagating from an ancilla can cover two neighboring data locations. If such hooks align along the short logical direction, fewer elementary faults can form a damaging path. Ordering the check interactions can orient hooks differently, but the correction must be verified against both check types and the chosen boundaries.
Measurement duration enters the noise budget
Consider an illustrative syndrome schedule with four sequential entangling layers of 30 nanoseconds each, followed by 600 nanoseconds of readout and 200 nanoseconds of reset. Assume none of these intervals overlaps. The round takes 920 nanoseconds. Reducing each entangling layer to 20 nanoseconds lowers the round to 880 nanoseconds, only a 4.35 percent reduction, because readout and reset dominate. The gate-speed improvement is therefore smaller at the protocol level than the isolated gate numbers suggest.
If a data qubit experiences pure dephasing with T_phi=100 microseconds during the combined 800-nanosecond measurement and reset interval, its phase-flip probability under the equivalent dephasing Pauli channel is [1-exp(-0.8/100)]/2, approximately 0.003984. This number belongs to the stated idle channel and is not an estimate of the full round's error. Dynamical decoupling, measurement crosstalk, residual interactions, and nonexponential noise can change the actual result.
A faster measurement can reduce idle exposure but may reduce discrimination fidelity or increase unwanted drive effects. Reset can remove persistent leakage but introduce additional transitions or timing overhead. Surface-code design therefore balances several physical channels inside the same repeated schedule. Comparing only native two-qubit gate infidelity omits errors that occur while the processor waits for classical information or prepares its ancillas for another round.
Missing data positions alter the check geometry
If a data qubit is known to be unavailable, neighboring checks can sometimes be combined so that their product omits that position. This creates a larger effective check or a deformed boundary. The resulting code may retain useful information, but the shortest logical path can move and the extraction weight can increase. A vacancy is not automatically a harmless erasure forever: maintaining a deformed code requires a compatible schedule, a revised decoder, and an assessment of changing distance.
Media reference: Error chains and logical boundaries
In a schematic planar surface code, an error chain can create syndrome changes at its endpoints. A short chain and a recovery chain may combine into a contractible pattern, leaving the logical information intact. A chain connecting appropriate boundaries can instead act as a logical operator without the same detectable endpoint pattern. The geometry depends on which Pauli error and boundary types are represented. The drawing must label this choice and distinguish data qubits from checks. Code distance describes the minimum weight of an undetectable logical action in the ideal code; the illustration does not assign a measured hardware error rate.
Sources
Verification scope
Citation identity checked ·
Architecture and surface-code tutorial; numerical thresholds remain model-specific.
Verification scope
Citation identity checked ·
Online publication in 2024; journal volume 638 in 2025. Memory demonstration scope must be preserved.