The Gottesman–Kitaev–Preskill (GKP) code is a quantum error correcting code that encodes logical qubits into the continuous degrees of freedom of a quantum system. It is named after Daniel Gottesman, Alexei Kitaev and John Preskill who published it together in 2001. The code is used in continuous variable (CV) photonic quantum computing, in which logical qubits are encoded into the field quadratures of an optical mode. This modes can be thought of as the quantum harmonic oscillator with conjugate position and momentum operators. By encoding logical qubits into a single optical mode, the GKP code demonstrates greater hardware efficiency than traditional qubit codes. Instead of needing many qubits to act as redundancy for a single qubit, the GKP code instead requires a precisely constructed optical state. GKP codes are able to protect against both small shifts in the quadratures, but also loss channels such as photon loss in a photonic system. Overview. GKP codes protects against random shifts in the quadratures, which can be modeled as a Gaussian random displacement channel. formula_1 This describes a displacement on a state formula_2 by formula_3 with probability formula_4 determined by variance formula_5. formula_6 denotes the displacement operator defined as formula_7 This unitary operator generates displaced vacuum states in phase space, resulting in coherent states. The stabilizer group of the GKP code is the set formula_8, for formula_9. Where formula_10 and formula_11. The logical Pauli operators formula_12 and formula_13 are defined by displacements over complex formula_14 and formula_15 such that formula_12 and formula_13 anticommute. Ideal GKP codewords can be constructed (eigenstates of formula_18 and formula_19) as infinite superpositions of formula_20 functions in the amplitudes of each quadrature, forming a Dirac comb of even spacing in their quasi-probability distributions. The simplest example is the square code, where the spacing of peaks is the same in both quadratures. In this case, each peak is separated by formula_21 and the logical states can be written as formula_22 formula_23 Errors can be corrected by applying the formula_18 and formula_19 operators as in any stabilizer code. Since these operators can be implemented with linear optical components, and the code words can be further concatenated with more traditional qubit codes, GKP codes have been studied extensively in regards to error correction in CV quantum computing. These ideal states, however, are not physical. Not only do they require infinite squeezing in both quadratures, they are also not normalizable. In practice, GKP states must be approximated. These approximate states display finite squeezing, and, in general, an overall Gaussian envelope for normalization. For instance, formula_26 can be approximated as a normalized Gaussian of width formula_27 formula_28 The approximate codeword then becomes a superposition of such Gaussians, with the aforementioned normalization envelope. formula_29 formula_30 Where formula_31 and formula_32 are normalization factors, and formula_33 translates formula_34 by formula_3. This finite squeezing is another source of error, but since the code is designed to protect against small shifts in the quadratures, this error is negligible for modest squeezing. This means that GKP encoding can be easily implemented with the aforementioned optical techniques. Experimental realization. Physically, GKP states are realized in the following way. First, cat states are generated via Gaussian boson sampling (GBS) techniques, then, the cat states are squeezed and interfered at a beam splitter. Homodyne detection is performed at one output of the beam splitter, and depending on the outcome, an approximate GKP state is created. The output can be further interfered to produce better approximations Cat states are superpositions of out of phase coherent states. They can be written as formula_36 Where formula_37 is a normalization factor defined as formula_38. These states can be generated in a variety of ways with varying efficiencies. Photon subtraction is one approach, which uses squeezed vacuum states, beam splitters, and photon number resolving (PNR) detectors. The beam splitters must be tuned with a high transmissivity however, making this process impractical for state preparation. The approach pursued by Xanadu is that of GBS. A GBS device consists of an input of squeezed vacuum states, a universal linear interferometer, which can enact any unitary transformation on a given state, and a PNR detector. An formula_39 input mode GBS device can produce a non Gaussian state of formula_39 peaks. Producing a state with greater number of peaks makes the GKP state production process more efficient, as less iterations must occur to produce approximate states. The input modes are interfered, generating a superposition of Gaussians, which can be further refined into approximate GKP states. A homodyne detector measures one output of the beam splitter (measuring, in general, formula_41 modes), heralding approximate cat states. Transforming these cat states to GKP states is a similar process. A beam splitter combines two squeezed multi-peak states, and performs another homodyne measurement on the second mode. The homodyne measurements yielding greater squeezing correspond to the most likely outcomes of measurement, meaning this procedure produces well approximated GKP states with high probability. Loss channels. GKP codes are primarily designed to protect against small shifts in phase space, but they can also be used to protect against photon loss. Photon loss can be modeled as mixing the GKP state with a vacuum state on a beam splitter with transmittance formula_42. The effect of this loss is the shrinking of the state by a factor of formula_43 in phase space, and shifting the peaks of the state towards the origin. This can result in a shift of magnitude greater than formula_44—an error outside the correctable distance. It has been shown, however, that loss can be corrected without additional overhead if the GKP state is not squeezed to an unrealistic degree. In fact, techniques to correct explicitly for photon losses introduce more errors than they correct, meaning the GKP code is resistant to both small shifts and loss channels.