GKP Quantum Code
Classical simulation of Gottesman-Kitaev-Preskill code, a continuous variable quantum error correction code encoding qubits into oscillator modes using grid states in phase space. Corrects displacement errors using position and momentum stabilizers on square lattice with spacing 2sqrt(pi).
Properties
| Property |
Value |
| Category |
Error Correction |
| Sub-category |
Continuous Variable Quantum Code |
| Security status |
π§ͺ Experimental |
| Complexity |
Expert |
| Inventor |
Daniel Gottesman, Alexei Kitaev, John Preskill |
| Year |
2001 |
| Origin |
πΊπΈ United States |
| Source |
algorithms/ecc/gkp-code.js |
Security
Status: π§ͺ Experimental
Known vulnerabilities
| Issue |
Description |
Mitigation |
| Dephasing Sensitivity |
GKP codes are very sensitive to dephasing errors. Use in low-dephasing environments or with active error mitigation. |
β |
| Finite Energy Approximation |
Ideal GKP states require infinite energy. Physical implementations use finite-energy approximations with parameter epsilon controlling squeezing quality. |
β |
| Classical Simulation Limits |
Efficient classical simulation requires Gaussian approximations. Non-Gaussian effects make simulation exponentially expensive. |
β |
| Fault Tolerance Threshold |
Requires displacement errors less than sqrt(pi)/6 for fault-tolerant error correction. Above threshold, error rates increase. |
β |
Documentation
References
Test vectors
10 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
| Vector 1 β [Square-lattice GKP: Encode logical |
0> qubit](https://errorcorrectionzoo.org/c/gkp) |
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
latticeSpacing |
2.507 |
input |
00 |
expected |
00000000000000000000000000000000000000000000000000 |
| Vector 2 β [Square-lattice GKP: Encode logical |
1> qubit](https://errorcorrectionzoo.org/c/gkp) |
| Field |
Value |
logicalState |
1 |
gridSize |
5 |
latticeSpacing |
2.507 |
input |
01 |
expected |
00000000000000000000000000010000000000000000000000 |
Vector 3 β Correct small displacement error in position
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
displacementType |
position |
displacementAmount |
0.5 |
input |
00010000000000000000000000000000000000000000000000 |
expected |
00000000000000000000000000000000000000000000000000 |
Vector 4 β Apply Pauli X gate via position displacement sqrt(pi)
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
gateType |
X |
input |
00 |
expected |
00000000000000000000000000010000000000000000000000 |
Vector 5 β Apply Pauli Z gate via momentum displacement sqrt(pi)
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
gateType |
Z |
input |
00 |
expected |
00000000000000000000000000000000000000000000000000 |
Vector 6 β Measure position stabilizer eigenvalue (no error)
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
measureStabilizer |
position |
alpha |
3.545 |
input |
00000000000000000000000000000000000000000000000000 |
expected |
01 |
Vector 7 β Detect displacement error via stabilizer violation
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
measureStabilizer |
position |
alpha |
3.545 |
input |
00010000000000000000000000000000000000000000000000 |
expected |
00 |
Vector 8 β Finite-energy GKP state with epsilon damping
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
epsilon |
0.1 |
input |
00 |
expected |
00000000000000000000000000000000000000000000000000 |
| Vector 9 β [Encode-decode round trip for logical |
0>](https://errorcorrectionzoo.org/c/gkp) |
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
roundTrip |
Yes |
input |
00 |
expected |
00 |
Vector 10 β Round-trip with small displacement error correction
| Field |
Value |
logicalState |
0 |
gridSize |
5 |
roundTrip |
Yes |
injectError |
Yes |
displacementAmount |
0.5 |
input |
00 |
expected |
00 |
β All algorithms