GKP Codes
A Gottesman–Kitaev–Preskill (GKP) code stores a qubit in an oscillator using a periodic grid in phase space. Small shifts of position and momentum can be measured modulo a lattice spacing without reading out the logical state. Correcting the measured residue leaves a discrete logical Pauli error only when the decoder chooses the wrong lattice class.
The ideal code makes this geometry exact but has infinite energy. Physical grid states have finite peaks and an envelope, and their recovery adds noise. We will first derive the ideal qubit, then calculate its displacement errors and analog likelihoods, before explaining what changes at finite energy and during gates.
Required background. Bosonic Codes introduces oscillator encodings and recovery. Stabilizer Formalism explains commuting checks and logical operators. Coherent States in Phase Space supplies displacement operators, while Continuous-Variable Systems develops quadratures and Gaussian transformations.
Commuting translations define the square GKP qubit
Section titled “Commuting translations define the square GKP qubit”Use dimensionless quadratures with vacuum variance :
A displacement shifts the means of by . With vectors and , define their signed area . The Weyl relation is
Reversing the order changes the phase by . Thus translations commute when the enclosed area is an integer multiple of . This allows two commuting modular checks even though and themselves do not commute.
Write . The square qubit has stabilizers
Their area is , so they commute. The code is their simultaneous generalized eigenspace. In position space,
where . Logical zero occupies even sites and logical one odd sites. The momentum-space combs of and have the corresponding even and odd structure. These are distributions, not normalizable oscillator vectors. Their exact translation symmetry is a mathematical reference for finite-energy states, as in the original construction of Gottesman, Kitaev, and Preskill (2001).
Half translations give the logical Paulis:
multiplies a position-comb site by , while exchanges even and odd sites. They commute with the stabilizers and anticommute with each other because their enclosed area is . Their squares are stabilizers. The stabilizer length is ; the logical translation length is . Neither is the half-cell correction radius .
Conventions using or the complex amplitude assign different numerical lengths to the same geometry. Quadrature normalization must accompany any quoted spacing or squeezing.
Modular syndromes and residual logical errors
Section titled “Modular syndromes and residual logical errors”After an error , the stabilizer eigenvalues become
These phases reveal modulo . They do not reveal whether the logical comb occupied even or odd sites. Choose centered residues and apply . The remaining translation, up to overall phase, is
Its logical action depends only on the parities of those integers:
| parity | parity | Residual Pauli |
|---|---|---|
| Even | Even | |
| Odd | Even | |
| Even | Odd | |
| Odd | Odd | , up to phase |
Every shift strictly inside the centered square is corrected by this ideal procedure. Shifts outside it can also be harmless: a remaining translation by is a stabilizer. A boundary is ambiguous for a symmetric prior, and a different prior or further measurements may change the preferred correction.
For instance, has residue . Canceling that residue leaves and hence logical . The syndrome can be measured perfectly while the recovery still makes a logical error.
Stabilizer lattice and commuting displacement lattice
Section titled “Stabilizer lattice and commuting displacement lattice”The stabilizer lattice is . All displacements commuting with it form the symplectic dual . Their quotient has four classes, corresponding to . This lattice description generalizes to multiple modes; Conrad, Eisert, and Arzani (2022) develop the construction.
The shortest nontrivial logical translation has Euclidean length . This displacement distance is not a qubit Hamming weight. For isotropic Gaussian shifts, the centered square is the nearest-lattice cell. Anisotropic or correlated noise changes the relevant likelihood metric, and more general lattices have different correction cells.
Gaussian errors and the value of an analog outcome
Section titled “Gaussian errors and the value of an analog outcome”Assume, for this section only, an ideal code and ideal syndrome measurement with a classical Gaussian displacement prior. If the position shift has mean zero and variance , write its density as . Nearest-lattice correction leaves odd position parity with probability
For a narrow distribution, the nearest wrong cells dominate:
The complementary-error-function expression counts all probability outside the central interval. It is an upper bound on the exact odd-cell sum, with excellent agreement when farther cells are negligible. At larger noise it includes even cells that yield stabilizers and must not be treated as the exact logical error probability.
| Exact | Central-interval tail | |
|---|---|---|
| 0.2 | 0.01242 | 0.01242 |
| 0.4 | 0.21112 | 0.21130 |
| 0.8 | 0.47294 | 0.53197 |
For independent position and momentum shifts, with odd probabilities , the resulting Pauli probabilities are
Thus is the probability of an component, including , rather than the probability of an exclusively error. This distinction matters when combining the two quadratures.
Sum all compatible shifts in each logical class
Section titled “Sum all compatible shifts in each logical class”A measured residue is compatible with every shift . Bayes’ rule gives the unnormalized class likelihoods
for . The conditional odd probability is , and the log-likelihood ratio is . A residue near zero strongly favors an even hidden index under a narrow prior; near the two classes compete. Fukui, Tomita, and Okamoto (2017) show how retaining analog information can improve decoding beyond a hard binary decision.
For , residues and have conditional odd probabilities about and . The same nearest-cell decision therefore carries very different confidence.
Top: lattice points represent residual translations, labeled by their logical Pauli class. The central shaded square is the nearest-lattice correction cell. This is displacement space, not a Wigner function. Bottom: exact odd-class likelihoods retain how close a residue is to an ambiguous boundary; the prior width changes that confidence.
Closest-point decoding and most-likely-class decoding are different problems. A closest-point decoder selects the single most likely displacement under an isotropic Gaussian prior. A class decoder sums over every displacement differing by a stabilizer before comparing logical outcomes. Closest-point decoding is often a useful small-noise approximation for general multimode GKP codes, but is not the general maximum-likelihood rule. Lin, Chamberland, and Noh (2023) explicitly make this distinction in their lattice-decoding analysis.
With noisy extraction, a decoder must also model ancilla shifts, correlations, and the history of repeated outcomes. Decoders explains the broader use of logical-class likelihoods. The simple Gaussian formulas above do not automatically describe coherent finite-energy effects or a full gate circuit.
Finite peaks, finite envelopes, and physical encoding
Section titled “Finite peaks, finite envelopes, and physical encoding”A useful finite-energy position wavefunction is
with . Each isolated peak has probability variance when overlaps are negligible. The envelope scale is set by ; it controls how many distant peaks contribute. Narrowing peaks without a finite envelope does not yield a normalizable state. Fourier transformation relates the envelope in one quadrature to the peak structure in the other.
Another common regularization is , followed by normalization. It yields normalizable states for and approaches the ideal comb only as the energy diverges. Royer, Singh, and Girvin (2020) treat finite-energy stabilization directly. Different regularizations need not assign the same numerical width or envelope to a quoted squeezing value.
Two separately normalized states need not be a qubit basis
Section titled “Two separately normalized states need not be a qubit basis”Finite-width versions of the even and odd combs generally overlap. Simply mapping to is then not an isometric encoding: its norm depends on the logical amplitudes. It is not valid to repair this by renormalizing each unknown input, which would make the map nonlinear.
One possible mathematical encoding uses the two columns of and their positive Gram matrix :
This preserves their two-dimensional span and defines an orthonormal logical basis. It is a choice of encoding, not an assertion that experimental preparation automatically implements that map. Alternatively, a stabilizer-subsystem description separates logical information from continuous syndrome degrees of freedom; Shaw, Doherty, and Grimsmo (2024) connect such a decomposition to ideal decoding.
Finite energy changes intrinsic syndrome distributions, state overlap, the action of logical displacements, and gate-induced envelope deformation. A pure broadened comb is not exactly the same state as an ideal comb subjected to classical random displacements. Treating finite preparation noise as independent Gaussian shifts can be useful, but it is a modeling approximation.
Squeezing and recovery noise
Section titled “Squeezing and recovery noise”With the isolated-peak convention above, one definition is
It gives dB for . Stabilizer-based width estimates and optical input squeezing need not be equal to this number. The envelope and quadrature convention are needed to interpret it.
GKP-ancilla extraction uses Gaussian couplings and homodyne outcomes; two-level-ancilla methods use controlled displacements and readout. Teleportation can move the logical state into a fresh prepared mode while extracting syndromes. Dissipative or reset-based stabilization can remove entropy without recording a classical outcome each round. In each case, finite ancilla quality, backaction and control faults contribute to the logical channel. See Bosonic Qubits for physical implementations.
Loss, amplification, and rotations
Section titled “Loss, amplification, and rotations”Pure loss with transmissivity sends
with a vacuum environment of variance , and similarly for . It contracts the grid as well as adding noise. It is not simply a random displacement of the original lattice.
A quantum-limited phase-insensitive amplifier of gain restores the mean scale. The order matters:
| Physical order | Added variance per quadrature |
|---|---|
| Loss, then amplification | |
| Amplification, then loss |
These composite channels are exactly additive Gaussian displacement channels under the stated vacuum and quantum-limited assumptions, for arbitrary input states, including finite-energy grids. The amplifier adds physical noise; it is not a noiseless inverse of loss. Pre-amplification raises the transmitted energy, and is unavailable if the loss has already occurred. Noh, Albert, and Jiang (2019) analyze these channel decompositions.
Number dephasing instead produces random rotations . A point at radius moves a distance . Distant peaks are therefore more sensitive to the same small angle. Increasing energy can narrow intrinsic grid peaks while increasing exposure to other noise mechanisms. There is no single displacement variance that exactly represents every combination of loss, rotations and ancilla faults.
Gates and other lattice shapes
Section titled “Gates and other lattice shapes”Suitable Gaussian transformations implement ideal logical Clifford gates. A quarter rotation implements Hadamard up to convention; the shear implements a phase gate; and implements SUM, with
These transformations preserve the appropriate ideal stabilizer algebra, including phases. An arbitrary Gaussian transformation need not preserve a chosen code: generic squeezing changes its lattice shape. Even a valid ideal Clifford can deform a finite envelope or correlate displacement errors. SUM, for instance, copies a control position shift into the target and a target momentum shift into the control. Correcting both outputs as if their errors were independent discards that correlation.
Universality requires a non-Clifford resource, such as logical magic-state injection or suitable nonlinear control. A projected gate acting correctly on an ideal code is insufficient to establish a protected operation on finite-energy states. Bosonic and Encoded Computation Models explains how the complete physical program determines the recovered logical channel.
A rectangular lattice trades position and momentum correction widths at fixed cell area. A hexagonal lattice has a larger Euclidean packing radius than a square at fixed area, which can help isotropic displacement correction; preparation and gate noise can alter the comparison. Multimode lattices and concatenation with a Surface Code use additional modes and joint decoding to suppress residual logical errors.
For a square logical qudit of dimension , the stabilizer and logical spacings are
Define and . The position comb is , with , and . Increasing increases the stabilizer cell area but decreases the logical spacing. One mode encoding a larger logical system does not supply independently controlled physical modes. Thresholds for concatenated architectures depend on their finite-energy states, extraction circuits, loss, gates and decoder; they are not constants specified by the one-mode lattice alone.
Exercises
Section titled “Exercises”1. Check the area and the comb phases
Section titled “1. Check the area and the comb phases”Verify stabilizer commutation and logical anticommutation. Show how acts on both position combs.
Solution
Stabilizer vectors and enclose , giving commutation phase one. Half vectors enclose , giving phase minus one. On , the phase of is . Translation by exchanges the two site parities. These are the Pauli actions without treating the Dirac comb as a normalized state.
2. Decode small and large shifts
Section titled “2. Decode small and large shifts”Decode , , and by centered residues.
Solution
The first residue is the shift itself, leaving . The second residue is , leaving , or up to phase. The third has the same residue as the first but leaves , which also acts as identity. Crossing the central cell boundary is therefore not identical to a logical error for every possible shift.
3. Separate a one-axis error from a Pauli probability
Section titled “3. Separate a one-axis error from a Pauli probability”For independent equal Gaussian shifts with , use to calculate . Why is the central tail only an approximation to ?
Solution
The probabilities are approximately , , and . Their sum is one. The position odd probability includes both and . The central tail also counts far even cells, although their net translations are stabilizers. As grows without bound, each one-axis parity becomes equally likely and the four Pauli probabilities tend to ; the central tail instead tends to one.
4. Use all hypotheses behind an analog result
Section titled “4. Use all hypotheses behind an analog result”At and , estimate the odd-class probability from the two dominant hypotheses. Explain what changes in the full class sum.
Solution
The dominant even shift is , and the dominant odd shift is . Their log-likelihood ratio is
Thus the odd probability is . The full expression adds every even or odd lattice alias; these additions are tiny here, but need not be negligible for broad noise or higher-dimensional lattices. A toy syndrome with one identity-class candidate of probability and two equivalent candidates of probabilities each would favor by class probability despite favoring identity by its single largest candidate.
5. Normalize an encoding, not each unknown input
Section titled “5. Normalize an encoding, not each unknown input”Suppose two normalized approximate grid states have real overlap . Find the squared norm of their equal superposition and verify the Gram-matrix encoding.
Solution
The nominal state has squared norm , while the relative-minus state has norm squared . Separate normalization of the two basis columns is therefore insufficient. When they are linearly independent, is positive definite and
This one linear map preserves the norm and inner product of every logical input. Input-dependent renormalization does not define a deterministic quantum encoding channel.
6. Derive both amplifier-order variances
Section titled “6. Derive both amplifier-order variances”Use the covariance maps for loss and for a quantum-limited amplifier. Set and compare the two orders at .
Solution
Loss followed by amplification gives two equal vacuum contributions, each , for total variance per quadrature. Amplification followed by loss gives contributions and , for total . Both maps restore unit gain on the input covariance and mean, but their added noises differ. Before transmission, the amplifier changes the mean occupation to , so the smaller-noise ordering has an energy cost.
7. Follow correlations through SUM
Section titled “7. Follow correlations through SUM”Let the four input shift variables be independent, each of variance . Find their output variances and the nonzero cross-mode covariances after SUM.
Solution
The output shifts are
Their variances are . The cross-mode covariances are and ; all other cross-mode pairs have zero covariance. Thus an ideal Gaussian gate preserves the code algebra while creating correlations relevant to decoding.
8. Count a square qudit’s lattice cells
Section titled “8. Count a square qudit’s lattice cells”Show that , derive the generalized Pauli phase, and compare with .
Solution
The ratio is . Logical translations enclose area , so their Weyl relation gives . For , the spacings are and ; for , they are and . There are logical displacement classes modulo stabilizers, corresponding to with exponents modulo . The reduced logical spacing means less tolerance to a fixed quadrature shift under nearest-lattice decoding.
References
Section titled “References”- J. Conrad, J. Eisert, and F. Arzani, “Gottesman–Kitaev–Preskill codes: A lattice perspective,” Quantum 6, 648 (2022), doi:10.22331/q-2022-02-10-648, arXiv:2109.14645.
- K. Fukui, A. Tomita, and A. Okamoto, “Analog quantum error correction with encoding a qubit into an oscillator,” Physical Review Letters 119, 180507 (2017), doi:10.1103/PhysRevLett.119.180507, arXiv:1706.03011.
- D. Gottesman, A. Kitaev, and J. Preskill, “Encoding a qubit in an oscillator,” Physical Review A 64, 012310 (2001), doi:10.1103/PhysRevA.64.012310, arXiv:quant-ph/0008040.
- M. Lin, C. Chamberland, and K. Noh, “Closest lattice point decoding for multimode Gottesman–Kitaev–Preskill codes,” PRX Quantum 4, 040334 (2023), doi:10.1103/PRXQuantum.4.040334, arXiv:2303.04702.
- K. Noh, V. V. Albert, and L. Jiang, “Quantum capacity bounds of Gaussian thermal loss channels and achievable rates with Gottesman–Kitaev–Preskill codes,” IEEE Transactions on Information Theory 65, 2563–2582 (2019), doi:10.1109/TIT.2018.2873764, arXiv:1801.07271.
- B. Royer, S. Singh, and S. M. Girvin, “Stabilization of finite-energy Gottesman–Kitaev–Preskill states,” Physical Review Letters 125, 260509 (2020), doi:10.1103/PhysRevLett.125.260509, arXiv:2009.07941.
- M. H. Shaw, A. C. Doherty, and A. L. Grimsmo, “Stabilizer subsystem decompositions for single- and multimode Gottesman–Kitaev–Preskill codes,” PRX Quantum 5, 010331 (2024), doi:10.1103/PRXQuantum.5.010331, arXiv:2210.14919.
Further reading
Section titled “Further reading”A. L. Grimsmo and S. Puri, “Quantum error correction with the Gottesman–Kitaev–Preskill code,” PRX Quantum 2, 020101 (2021), doi:10.1103/PRXQuantum.2.020101, arXiv:2106.12989, connects the code geometry to preparation and fault-tolerant architectures.