GKP Codes and Bosonic Error Correction
Every qubit code in the standard playbook fights errors by repetition: spread one bit of quantum information across many physical two-level systems and let redundancy do the work. Bosonic error correction takes the opposite bet. A single quantized harmonic oscillator — a microwave cavity, an optical mode, the motion of a trapped ion — already carries an infinite-dimensional Hilbert space, so the redundancy needed to hide a qubit is available for free inside one physical system. The question becomes not "how many qubits?" but "how do I carve a robust two-level codespace out of the continuum of phase space, and against which errors?" The Gottesman–Kitaev–Preskill (GKP) code answers with startling directness. It defends against the most natural noise an oscillator suffers — small random displacements in position and momentum — by making the codespace a lattice in phase space. Two commuting displacement operators, each translating the oscillator by a full lattice period, are declared stabilizers; their simultaneous eigenstates form a two-dimensional codespace whose wavefunctions are periodic Dirac combs. Because any error expands in the displacement basis, and a small displacement merely slides the comb by a measurable fraction of a cell, GKP turns the analog problem of correcting continuous shifts into a digital one: measure the shift modulo the lattice, round to the nearest point. That single idea makes GKP the connective tissue of continuous-variable fault tolerance — cheap Gaussian Clifford gates, non-Gaussian magic, and a soft-information handshake with the surface code — and this article rebuilds the structure from the Weyl algebra up.
- Bosonic codes hide a logical qubit in the infinite-dimensional Hilbert space of one oscillator, drawing redundancy from continuous-variable phase space instead of many physical qubits.
- The GKP code stabilizes a qubit with two commuting displacement operators of magnitude that impose a periodic grid in the quadrature plane, protecting against small shifts in and .
- Correction is geometric: measure each quadrature modulo , then displace to the nearest lattice point; any shift with per quadrature is corrected exactly.
- Ideal GKP codewords are Dirac combs with infinite energy; real devices use finite-energy, Gaussian-broadened states whose logical error rate is set by the squeezing (in dB).
- The intrinsic logical error floor falls exponentially, : roughly at and at .
- GKP Clifford gates are Gaussian (symplectic) operations; the non-Clifford gate needs non-Gaussian magic, and GKP concatenated with the surface code is a leading route to fault tolerance.
- Key idea: encode a qubit as the joint eigenstate of two commuting displacement operators that tile phase space with a lattice, so any small error shifts the state by a measurable fraction of a cell and correction is just rounding to the nearest lattice point.
Encode a qubit as the simultaneous eigenstate of two commuting displacement operators that tile phase space with a lattice; then any small error displaces the state by a measurable fraction of a cell, and correction is just rounding to the nearest lattice point.
Where this lives today
GKP has crossed from theory into the front rank of experimental quantum error correction. In superconducting hardware a high-Q microwave cavity holds the mode and a coupled transmon is the ancilla; with sharpened phase-estimation and reservoir engineering, cavity GKP qubits are stabilized in real time, and in 2020 a cavity experiment pushed the encoded lifetime past the best uncorrected component — the first active bosonic QEC to beat break-even against displacement noise. In trapped ions the motional mode is the oscillator, where grid states have been stabilized with full single-qubit Clifford control; in photonics, GKP modes are the nodes of continuous-variable cluster states, teleporting Clifford gates by homodyne measurement with injected magic states supplying non-Gaussianity. The deepest lever is concatenation: encode each physical qubit of a surface code as a GKP mode and feed the analog syndrome — the distance to the nearest lattice point — into the topological decoder. Treating near-threshold shifts as soft information rather than hard bits lifts the combined threshold against Gaussian noise dramatically, and this GKP-plus-surface-code stack, with GKP magic-state distillation for universality, is a leading route to fault tolerance.
The physical picture
Picture the oscillator's phase space as an infinite sheet of graph paper with axes and ; the GKP code lives on a square lattice of that paper. The two logical states are supported on interleaved sublattices whose points are spaced by the full stabilizer period , offset by one half-period . A physical error is a rigid slide of the whole pattern by a vector . As long as the slide is shorter than half a grid step, you can read how far from the nearest grid line you are, modulo the spacing, and undo it — without ever learning which sublattice you started on. Syndrome and logical bit live in complementary parts of the same continuous coordinate.
The magic is that a continuous error is undone by a discrete operation: the code supplies its own metric — Euclidean distance in phase space — so the decoder is literally "snap to grid." Because every channel (loss, dephasing, thermal noise) can be written in the displacement basis, GKP protects against a universal random-displacement model to leading order — photon loss, after a recovery map, looks like a Gaussian random shift that GKP handles. Finite squeezing is the price of admission. Real codewords replace each Dirac peak with a Gaussian of width under a Gaussian envelope, leaving residual tail overlap between neighbouring teeth — the intrinsic error floor, which shrinks exponentially with squeezing. The second figure is what a hardware designer reads off: logical error rate versus squeezing in decibels.
The core equations
The whole code is fixed by choosing two displacement operators as stabilizers. On the square lattice they translate the oscillator by a full period in each quadrature, and — crucially — they commute, so they can be simultaneously diagonalized.
where: — position and momentum quadratures with ; — translations of and by . Reading: the codespace is the joint eigenspace of these two, a two-dimensional subspace holding one logical qubit. The logical Paulis are the smallest displacements that commute with both stabilizers without being stabilizers — half-period shifts, half of and .
where: — logical Paulis, each a displacement of magnitude . Reading: squaring a logical returns a stabilizer, so the logicals act faithfully on a two-dimensional quotient while anticommuting, . In the position representation the ideal codewords are Dirac combs: sits on even multiples of , and is the same comb shifted onto the odd multiples.
where: — position eigenstate at ; — integer indexing the teeth. Reading: the tooth spacing is the stabilizer period; the offset between combs is the logical displacement mapping . A physical error is a Weyl displacement by a real vector . Every completely-positive map on the mode expands in these displacements, which is why controlling displacement errors controls everything to leading order.
where: — displacement in position and momentum; — Weyl displacement operator. Reading: threatens a error, a error. The syndrome diagnoses without collapsing the logical state: each quadrature modulo the half-lattice spacing , equivalently the phases of the two stabilizers.
where: — the fractional part of each quadrature relative to the grid. Reading: the moduli reveal the shift only up to a full lattice step, so the decoder assumes the smallest shift consistent with the syndrome. Ideal combs are non-normalizable, so real states replace each delta by a Gaussian of width under an envelope of width ; the single squeezing parameter controls both peak sharpness and energy.
where: — squeezing parameter, defined throughout as the standard deviation of each peak's probability distribution in units of the vacuum quadrature width, so the amplitude carries (small is high squeezing); — logical value; — mean photon number. Reading: smaller sharpens the peaks and lowers the error, but raises the photon number you must engineer. Finally the logical error rate: a flip happens when the combined intrinsic () plus channel () displacement pushes a quadrature past the boundary , a Gaussian tail over the two quadratures.
where: — channel displacement noise per quadrature (std); — intrinsic peak width; — complementary error function. Reading: the two variances add in convolution, and the factor counts the two ways ( or ) to fail.
The goal is to prove from the Weyl–Heisenberg algebra that the two GKP stabilizers commute, that the half-period logicals commute with both stabilizers while anticommuting with each other, and that squaring a logical returns a stabilizer — so the joint eigenspace is a faithful two-dimensional representation of the Pauli algebra, exactly one logical qubit and not a qudit. Every claim reduces to a single Weyl phase, so we fix conventions once and let the arithmetic decide.
Step 1. Establish the fact every displacement identity rides on. With the commutator is central, so Baker–Campbell–Hausdorff terminates after one term and gives the Weyl braiding relation . Why: reordering two displacements costs only a scalar phase set by the product of shift magnitudes, so commutation reduces to arithmetic.
Step 2. Feed the stabilizers into it. For and the product is , so . Why: the period was chosen so the self-phase is a multiple of , and commuting operators share the joint eigenspace.
Step 3. Test the logicals against the stabilizers. Pairing with gives , a phase , and likewise against ; both logicals commute with both stabilizers. Why: commuting with every stabilizer means act inside the code, not kicking states out of it.
Step 4. Test the logicals against each other and close the algebra. For and , , giving , while and . Why: anticommuting square-roots of a stabilizer are exactly a qubit's ; squaring to stabilizers (not new operators) pins the dimension at two. *The key check: the stabilizer product gives , a trivial Weyl phase, while the logical product gives , the sign flip that makes and anticommute.*
Go deeper · Derivation B · 1 minThe correctable displacement window
The goal is to derive the sharp boundary inside which the square GKP code corrects a displacement perfectly, and to show how correction fails the instant a shift crosses it, turning into a logical Pauli. The argument is geometric — nearest-lattice-point decoding for a lattice whose minimum distance is the logical spacing.
Step 1. Fix the length scale that governs failure. Neighbouring teeth of and are separated in by the logical displacement , so the code's minimum distance is . Why: a shift of half that, , sits equidistant between two codewords — the ambiguity point of any nearest-point decoder.
Step 2. Read what the syndrome tells you. Measuring returns the shift only up to an unknown integer number of half-periods, , so the decoder must guess the integer. Why: the modular measurement reveals the error while hiding the logical bit, but large and small shifts with the same remainder are indistinguishable.
Step 3. Apply the maximum-likelihood guess and see where it breaks. The decoder assumes the smallest shift consistent with ; if that is the true shift and correction is exact, but if the true shift was the larger option and the decoder rounds the wrong way, applying one logical period — a error. Why: this is why GKP failures are logical Paulis, not leakage — the code always returns a codeword, occasionally the wrong one.
Step 4. Repeat in the conjugate quadrature. The identical argument in governs errors, so the correctable set is the open square of side centred on a lattice point, . Why: the square is the Voronoi cell of the code lattice, and correctability is exactly membership in that cell — the geometric heart of GKP.
Go deeper · Derivation C · 1 minThe finite-energy logical error floor
The goal is to estimate the residual logical error of a finite-energy GKP state from the overlap of neighbouring comb teeth, and to show it is exponentially small in the inverse squeezing — the quantitative content of "more squeezing buys more protection." We model each peak as a Gaussian of width and compute the probability it is misread across the boundary at ; this floor survives even a noiseless channel.
Step 1. Write the misidentification probability as a Gaussian tail. A peak of width centred on a lattice point is misassigned when it lands beyond the boundary, . Why: the boundary lies at on both sides of the peak, and either excursion flips the logical, hence the factor of two.
Step 2. Convert to a complementary error function. The substitution gives , the exact per-quadrature floor. Why: is the standard closed form for a Gaussian tail, letting a verifier read off numbers directly.
Step 3. Extract the asymptotic scaling. Using with , the floor decays as . Why: the exponent is linear in , i.e. in the squeezing in nepers, so each few dB multiplies the error by a fixed fraction — the exponential payoff.
Step 4. Combine the two quadratures. A logical error is a flip in () or (), so by a union bound . Why: at low rates the two failure modes are rare and nearly independent, so their probabilities add. *As a numerical check: at (), , giving and ; at (), , , and .*
Limiting cases
GKP performance is controlled by the squeezing / envelope width and by the lattice geometry. The important regimes:
| Case | Result | Meaning |
|---|---|---|
| Ideal GKP limit | Dirac-comb codewords, infinite energy, exact correction of any shift with per quadrature. Unphysical, but the design target. | |
| Finite-energy GKP | Gaussian-broadened peaks under a Gaussian envelope; the photon number grows as squeezing rises and the logical error falls but never reaches zero. | |
| High-squeezing asymptotics | Residual error from comb-tail overlap decays exponentially in , equivalently exponentially in dB. | |
| Pure-displacement threshold | Per-quadrature noise std below half a cell is nominally correctable single-shot; optimal-decoding thresholds are lower (–) and improve sharply under concatenation. |
Worked examples
1 · Syndrome extraction and snap-to-grid (fully worked)
An ideal square GKP qubit suffers a displacement . Show both components are correctable, compute the syndrome, and give the recovery.
Step 1. Compare each component with the boundary . Here and are both below , so both shifts sit inside the correctable Voronoi cell and recovery is exact. Both components lie within , so the error is correctable.
Step 2. Compute the syndrome, the quadratures modulo the half-period . Since each shift is smaller than , the remainders are the shifts themselves. Syndrome , .
Step 3. Decode by maximum likelihood: assume the smallest shift consistent with each syndrome and undo it. The decoder applies , returning the state exactly to the original codeword — the true shift was the minimal one. Recovery restores the codeword; no logical Pauli is applied.
Step 4. See how close this was to failure. Had been , then : the syndrome reads as a small positive shift, the decoder rounds the wrong way, and the net operation is a logical . The margin is in ; beyond it a error results.
2 · Logical error rate versus squeezing (fully worked)
A finite-energy GKP memory is prepared at of squeezing (). Find , the mean photon number, and the intrinsic logical error rate; compare with and add a channel with per-quadrature noise .
Step 1. Convert dB to . At , , so , and the mean photon number is photons — the resource cost of this protection. , .
Step 2. Evaluate the intrinsic floor from equation (7) with . The erfc argument is , so — a GKP qubit has intrinsic logical error near one percent. at .
Step 3. Repeat at for the slope. Now , , , and . Just less squeezing worsens the error nearly tenfold, and pushing to improves it to . Roughly an order of magnitude per .
Step 4. Add channel noise to the state. The variances add: , so and . The channel roughly triples the memory's own floor — the per-mode number an outer code must suppress. Combined .
Physics of the portrait
The GKP code reads, in hindsight, as inevitable — yet it waited until 2001 and took three theorists thinking at once about oscillators, lattices, and fault tolerance.
Origins · 1 minGottesman, Kitaev & Preskill and how this was discovered
"Encoding a qubit in an oscillator" grew from a specific frustration: quantum error correction had been built for finite-dimensional systems, but much of the best hardware — optical modes, microwave cavities, trapped-ion motion — is natively an oscillator with a continuous spectrum. Daniel Gottesman had, in his 1997 thesis, recast codes in the stabilizer language, describing a code by the abelian group of operators that fix it; the leap here was to let that group be generated by displacement operators rather than Pauli strings, so the code became a lattice in phase space. Alexei Kitaev, already known for the toric code, supplied the lattice viewpoint in which correction is nearest-point decoding and code distance is a minimum-distance problem, and John Preskill anchored it in fault tolerance, showing Gaussian operations realize the Clifford group while the missing non-Gaussian element is exactly the magic needed for universality. For two decades the paper was admired and dismissed as impractical, demanding squeezing beyond any device; that verdict reversed only when trapped-ion and superconducting groups reached – and stabilized grid states in real time, turning a theorist's lattice into a laboratory qubit.
Going further
Texts. Gottesman, Kitaev and Preskill, "Encoding a qubit in an oscillator," Phys. Rev. A 64, 012310 (2001) — the source of every equation here. Nielsen and Chuang, Quantum Computation and Quantum Information, Ch. 10 (stabilizer codes) and Ch. 7 (oscillator and displacement conventions). Preskill, Lecture Notes on Quantum Computation, on error correction and fault tolerance. Wilde, Quantum Information Theory, 2nd ed., for the channel background. Terhal, Conrad and Vuillot, "Towards scalable bosonic quantum error correction," Quantum Sci. Technol. 5, 043001 (2020) — the modern review of finite-energy states, thresholds, and concatenation. The standard square-lattice convention used throughout has stabilizer displacement , logicals , and , ; the Weyl braiding relation uses ; the finite-energy mean photon number is ; and the erfc floor evaluates to at and at . Note that the intrinsic floor scales as , matching the erfc argument, not as some secondary summaries state.
Prerequisites. Quantum harmonic oscillator and quadratures · Stabilizer formalism · Displacement operators and phase space · Magic-state distillation. Leads to. Measurement-based quantum computation · Cluster states and graph states · Toric code and topological order · Magic-state distillation.
Ask the tutor: Ask me to walk through the syndrome-and-recovery for a displacement you choose, or to derive why of squeezing lands you at roughly one-percent logical error.
Why encode a qubit in an oscillator instead of just using more qubits?
An oscillator is a single physical object with an infinite-dimensional Hilbert space, so the redundancy error correction needs is already present without wiring many two-level systems. That is hardware-efficient: one cavity or trapped-ion mode plus an ancilla hosts a protected logical qubit, where a qubit surface code needs a large array. The catch is that protection is bought with squeezing and photon number rather than qubit count. GKP is attractive precisely because its natural error model — small displacements — matches the noise these oscillators actually suffer.
What is the difference between GKP and cat or binomial codes?
All three are bosonic codes, but they target different noise. Cat and binomial codes are engineered chiefly against photon loss, encoding the qubit in superpositions of coherent states (cats) or sparse Fock superpositions (binomial), so a lost photon maps the codespace to a detectable error space. GKP instead targets displacement noise directly, tiling phase space so small shifts in any direction are correctable. GKP has the highest correction power once enough squeezing is available and composes with outer codes via soft information, while cat and binomial codes have been easier to realize at modest photon numbers — complementary tools, not competitors.
What does the squeezing in dB actually measure?
It quantifies how far below the vacuum fluctuation each GKP peak has been narrowed. In the convention used here, squeezing in decibels is , so means , a peak variance one-tenth of the reference. Because the floor decays like , each extra few dB multiplies the residual error by a fixed factor — roughly an order of magnitude per . Experiments now reach –.
If the stabilizers are measured, why is the logical qubit not disturbed?
Because the stabilizers commute with the logical operators. Measuring and projects onto a definite syndrome — the displacement modulo the lattice — but returns no information about which logical state you hold, since and commute with both stabilizers. The syndrome lives in the fractional part of the quadratures while the logical bit lives in the integer part, complementary corners of the same continuous variable. This is the continuous-variable form of the general stabilizer-code fact that syndrome extraction reveals errors without measuring the encoded information — the basis of non-destructive, repeatable correction.
How does photon loss fit a code designed for displacements?
Photon loss is not literally a displacement — it is the annihilation operator acting through an amplitude-damping channel — so at first sight GKP looks mismatched to the dominant cavity error. But after an appropriate recovery or frame transformation (for instance a quantum-limited amplifier that restores the mean energy), the residual effect of loss looks, to leading order, like a Gaussian random displacement, which GKP corrects as usual. The mapping degrades at large loss, which is why real analyses track loss explicitly and concatenation handles the residual.
Why does concatenating GKP with the surface code work so well?
Two reasons stack. First, GKP turns an analog error into a nearly digital one, delivering a physical qubit whose residual failures are ordinary logical Paulis — the error model the surface code suppresses. Second, and more powerfully, the GKP layer emits soft information: the syndrome is a continuous distance to the nearest lattice point, a confidence value saying how close the shift came to the boundary. Feeding that confidence into the surface-code decoder, instead of collapsing it to a hard bit, lets it weight ambiguous qubits appropriately, and the combined threshold against Gaussian noise rises far above hard-decision decoding — among the most hardware-efficient fault-tolerance proposals known.