The GKP code, short for the Gottesman–Kitaev–Preskill code, is a bosonic quantum error correction code that encodes a logical qubit in the continuous position and momentum of a single harmonic oscillator, such as a microwave cavity or an optical mode. In quantum error correction it is the leading example of a code that protects against small displacement errors rather than discrete bit flips.
Daniel Gottesman, Alexei Kitaev and John Preskill proposed the code in 2001. Its codewords are grid states, periodic combs of narrow peaks in phase space, and its appeal lies in turning a hardware-efficient oscillator into a qubit whose errors are small, continuous and diagnosable.
How the GKP code encodes a qubit
The GKP code is defined by two commuting displacement operators that act as stabilizers. In the square code, these shift position q and momentum p by 2√π, so every valid codeword is invariant under those shifts. The logical Pauli operators are half-size displacements of √π, which move a codeword from one logical state to the other.
In position space, the logical |0⟩ is a comb of peaks at even multiples of √π, while the logical |1⟩ has peaks at odd multiples of √π. Any small shift of the state moves the peaks slightly off the grid, and measuring the stabilizers reveals that shift modulo √π, so it can be undone by a correcting displacement.
The table below summarizes the main elements of the square GKP code.
| Element | Definition | Role |
|---|---|---|
| Stabilizers | Displacements of 2√π in q and p | Define the code space |
| Logical X | Position shift of √π | Flips the logical qubit |
| Logical Z | Momentum shift of √π | Applies a logical phase |
| Correctable region | Shifts smaller than √π/2 | Errors decoded without failure |
| Envelope | Gaussian damping of peaks | Makes states physical |
Finite squeezing and realistic GKP states
Ideal GKP codewords have infinitely narrow peaks and infinite energy, so they are not physical states. Real devices prepare approximate GKP states in which each peak has a finite width and the comb sits under a Gaussian envelope. The quality of these states is described by the effective squeezing, usually quoted in decibels.
Higher squeezing means narrower peaks and a lower intrinsic logical error rate. Theoretical studies suggest that roughly 10 dB of squeezing is a common threshold region for fault-tolerant schemes that concatenate GKP qubits with an outer code, although the exact figure depends on the noise model and the decoder.
| Squeezing level | Peak quality | Practical meaning |
|---|---|---|
| Below 7 dB | Broad, overlapping peaks | Frequent logical errors |
| About 9–10 dB | Reasonably resolved | Demonstrated in leading experiments |
| 10–12 dB | Well separated | Near threshold for many schemes |
| Above 15 dB | Very sharp | Target for large-scale fault tolerance |
GKP code compared with other codes
The GKP code belongs to the family of bosonic codes, which use the large Hilbert space of an oscillator instead of many two-level physical qubits. Its natural comparison points are cat codes, binomial codes and qubit-based stabilizer codes such as the surface code.
| Code | Physical carrier | Main error handled | Typical role |
|---|---|---|---|
| GKP code | One oscillator | Small displacements | Inner code under a surface code |
| Cat code | One oscillator | Photon loss or phase flips | Biased-noise qubit |
| Binomial code | One oscillator | Photon loss | Protected memory |
| Surface code | Many qubits | Local Pauli errors | Outer fault-tolerant code |
A key advantage is that photon loss, the dominant error in microwave cavities, appears to the GKP code as a combination of small displacements, which the code handles well. Another is that Gaussian operations such as beam splitters and squeezers implement all Clifford gates, which makes the code attractive for photonic quantum computing.
Error correction cycles and concatenation
A GKP error correction cycle measures the stabilizer phases using an ancilla, either a transmon qubit coupled to a cavity or a second GKP state in an optical circuit. The measured values estimate the displacement, and a feedback displacement shifts the state back toward the grid. Repeated cycles stabilize the code against continuous noise.
A single GKP qubit cannot suppress errors arbitrarily, so practical architectures use concatenation. GKP qubits serve as the physical qubits of an outer surface code, and the decoder uses the analog syndrome information, the actual measured shift, to weight its decisions. This soft information can noticeably improve the overall threshold compared with hard binary outcomes.
- Inner layer: GKP correction removes small displacement noise in every cycle.
- Outer layer: a surface code or quantum LDPC code catches residual logical errors.
- Decoder: uses analog syndromes to rank likely error chains.
- Non-Clifford gates: supplied by magic states, which GKP states can help prepare.
Limitations and engineering challenges
The main obstacle is state preparation. Producing high-quality grid states requires either strong nonlinear control of a cavity or probabilistic optical generation, and both remain slow and resource intensive. In optical platforms, GKP states have only recently been generated with modest squeezing.
Other challenges include ancilla errors that propagate into the oscillator, energy constraints from the finite envelope, and the overhead of fast feedback. Experiments in superconducting cavities have nonetheless shown GKP memories that outlive the best physical component, which marks a break-even point for error correction.
In everyday language
A GKP code stores a qubit in a wobbling wave of light or microwaves. The wave is shaped like a picket fence with evenly spaced posts. Zero sits on even posts, and one sits on odd posts.
Noise nudges the fence a little to one side. A small nudge is easy to spot and push back. Only a nudge of half a gap causes confusion. That is why small errors can be fixed reliably. One device does the work that usually needs many separate qubits.
Seen in the real world
A superconducting quantum computing group builds a logical memory from a three-dimensional microwave cavity coupled to a single transmon ancilla. They prepare an approximate GKP state with about 9 dB of effective squeezing and run a correction cycle every few microseconds, each cycle measuring one stabilizer and applying a feedback displacement.
Without correction, the encoded information decays within roughly the cavity photon lifetime. With continuous GKP correction, the team measures a logical lifetime longer than that of any physical part of the system, including the best uncorrected cavity encoding. The result shows the code reaching break-even, and the group then plans to concatenate several such cavities under a small surface code to suppress errors further.