Four-qubit error-detecting code

Essence

The code asks only two questions of four physical qubits:

S_X = XXXX, and S_Z = ZZZZ.

Their overlap contains four qubits, so the four local anticommutation signs cancel and the two operators commute. The simultaneous +1 eigenspace has dimension four: it carries two logical qubits. A convenient exported logical basis is

Xbar_1=XX__, Zbar_1=_Z_Z, Xbar_2=X_X_, Zbar_2=__ZZ.

Each operator commutes with both stabilizers; within each numbered pair the supports meet once and therefore anticommute, while the cross-pairs meet an even number of times. The constructor exports these supports, and the reproduction script at atlas/four_two_two/pedagogy/reproduce.py checks the complete symplectic table.

The key idea is not merely that the distance is two. It is what information the syndrome retains. A single X_i fault flips only S_Z, independent of i; a single Z_i fault flips only S_X; and a single Y_i fault flips both. The syndrome identifies the Pauli type but forgets the position. Thus the code detects every single-qubit Pauli fault, yet cannot repair an unknown-position fault from these two bits alone. If the position arrives as side information—an erasure flag—the same block can correct the fault (Grassl, Beth, and Pellizzari).

One sentence. The [[4,2,2]] code spends two global parities to preserve two logical qubits, obtaining universal single-site detection but no single-site address.

Design problem

Suppose four carriers should hold more than one logical qubit while exposing any fault confined to one carrier. Full unknown-location correction is too ambitious at this length and rate: correction must distinguish alternatives, whereas detection needs only separate the no-error subspace from the union of error spaces.

The two global checks solve exactly the weaker problem. Every nonidentity single-qubit Pauli anticommutes with at least one stabilizer. Therefore its action takes the codespace into an orthogonal syndrome sector. But there are twelve such Pauli faults and only three nonzero two-bit syndromes. The compression is deliberate: the block reports “an X-like, Z-like, or Y-like component occurred,” not “qubit i failed.”

This distinction is operational. A postselected experiment discards every nonzero-syndrome run and never needs a correction location. A known-erasure protocol receives that location from loss, leakage conversion, or another flag. A syndrome-only correction rule must guess; for example, correcting an actual X_j as though it were X_i leaves X_i X_j, a zero-syndrome weight-two logical operator when i != j. The full error-set comparison is worked in detection versus correction.

Derivation chain

  1. Write one all-ones row in each CSS sector: H_X=H_Z=[1 1 1 1]. Their binary inner product is zero, so the CSS checks commute.
  2. The two check rows are independent in the symplectic stabilizer matrix. Four physical qubits minus rank two leaves two encoded qubits.
  3. Every weight-one Pauli has a nonzero syndrome. The explicit syndrome table contains three values, each repeated at all four positions.
  4. Each exported logical has weight two, commutes with the stabilizers, and lies outside their row space. This supplies a weight-two normalizer witness. Since no weight-one Pauli is in the normalizer, the exact distance is two.
  5. The logical computational basis can be chosen as

|00bar>=(|0000>+|1111>)/sqrt(2),

|01bar>=(|1010>+|0101>)/sqrt(2),

|10bar>=(|1100>+|0011>)/sqrt(2),

|11bar>=(|0110>+|1001>)/sqrt(2).

Each pair is exchanged by XXXX, has even parity under ZZZZ, and has the eigenvalues declared by Zbar_1,Zbar_2. Published papers sometimes choose different weight-two representatives; multiplying by a stabilizer or applying a logical symplectic relabeling changes the presentation, not the code.

  1. Rains proves that the optimal length-four, distance-two quantum code is unique up to local equivalence and places it in the even-length [[2m,2m-2,2]] global-parity family (Rains). The Atlas identity is the exact binary CSS stabilizer block above, not every locally equivalent presentation and not every member of that family.

The algebra, syndrome enumeration, codeword eigenvalues, exact distance, and logical Clifford conjugations are rerun in the Level-2 derivation map.

Multiple pictures

Global parity. XXXX asks whether the phase-flip component has odd parity; ZZZZ asks the same of the bit-flip component. This is the shortest route to the syndrome table.

Binary CSS matrix. The two one-row all-ones matrices make rank and commutation transparent. They also reveal that the square in the viewer is only an incidence arrangement: every check touches every qubit, so no two-dimensional locality follows from the drawing.

Four Bell-like branches. The computational codewords are complements paired by XXXX. The two logical bits select which complementary pair is occupied. This picture is useful for preparation and readout, but a protocol must still specify which logical degree of freedom is data and whether the other is protected, fixed, or treated as gauge.

Syndrome quotient. The twelve weight-one Pauli labels collapse to three nonzero syndrome classes. Detection succeeds because none collapse onto the zero class. Correction fails because several distinct errors collapse onto one another and their pairwise products can act logically.

Erasure channel. Once a classical flag supplies the faulty position, the relevant error set contains only I,X_i,Y_i,Z_i for one fixed i. Their pairwise products remain supported at that known position and are detected by the distance-two code, so the Knill–Laflamme conditions can be satisfied. The side-information bit is part of the channel contract, not an implementation detail.

Iceberg specialization. The same global X and Z parities define the [[k+2,k,2]] Iceberg family. This block is its smallest nontrivial member. That relation does not license importing family-scale Hamiltonian, connectivity, or experiment claims into this fixed block; those belong to the corresponding protocol and size.

Why these parameters

Length and dimension. The constructor has four Pauli columns and two independent stabilizer rows. Direct GF(2) rank gives k=4-2=2. The verifier recomputes both values from the exported CheckMatrix; neither is accepted from prose.

Distance. Every weight-one X, Y, or Z anticommutes with a global check, giving the lower bound d>=2. The exported XX__ commutes with both checks, is not a stabilizer, and acts as Xbar_1, giving d<=2. Together the bounds prove d=2; exhaustive distance enumeration independently agrees.

Why two syndrome bits are enough for detection. Detection asks only whether the syndrome is zero. The two-bit alphabet has a zero value and three nonzero values, exactly enough to separate the three nonidentity Pauli types when position is discarded.

Why they are not enough for correction. Unknown-location correction would need the error subspaces for alternatives such as X_i and X_j to be distinguishable or logically equivalent. They have the same syndrome, and X_i X_j is generally a nontrivial normalizer element. The collision is therefore logical, not just a limitation of a particular lookup-table implementation.

Failure modes

Operations story

Uniform Clifford layers have unusually dense logical action because both logical qubits occupy one small block. Under H on every physical qubit, Xbar_1 maps to Zbar_2, Xbar_2 maps to Zbar_1, and conversely. The logical action is H on both logical qubits followed by their swap. Under uniform physical S, the X logicals acquire the opposite Z logical while Z logicals stay fixed, which is logical CZ up to tracked phases.

Between two aligned blocks, pairwise physical CNOT preserves the joint stabilizer group and implements CNOT on each corresponding logical pair. This is an algebraic transversal statement. Routing, preparation, syndrome extraction, and correlated faults remain protocol costs.

The block also supports a ten-input/two-output Hadamard-eigenstate magic-state distillation routine (Meier, Eastin, and Knill). That ratio and its error suppression belong to the complete accepted-round protocol, not to the code parameters alone. Later superconducting work prepared an encoded CZ resource here and then moved it through a code transition; the reported beyond-break-even result belongs to the combined preparation, detection, deformation, and teleportation stack (Gupta et al.).

See operations and realizations for the conjugation table and evidence boundaries.

Litmus questions

Q1: What does the syndrome of a single-qubit error reveal? A: Its Pauli component—X-like, Z-like, or both—but not its physical position.

Q2: Why does nonzero syndrome prove detection but not correction? A: Detection only separates the error space from the codespace. Correction must also distinguish or harmlessly identify different errors within the same syndrome, and same-type faults at different positions can differ logically.

Q3: How can a distance-two code correct one erasure? A: The erasure channel supplies the position. For that restricted error set, all pairwise products are supported on one known site and are detected.

Q4: Give both halves of the distance proof. A: Every weight-one Pauli has nonzero syndrome, while XX__ is a weight-two normalizer element outside the stabilizer.

Q5: Does the trapped-ion demonstration protect two arbitrary logical qubits fault tolerantly? A: No. Its protocol protects one chosen logical qubit and treats the other encoded degree of freedom as gauge.

Q6: Is this entry the distance-two rotated Surface code? A: No. The familiar four-data rotated patch encodes one logical qubit and has boundary checks. This entry has only two global checks and encodes two.

Q7: Is a Toric-code threshold cited for a [[4,2,2]]-concatenated construction a threshold of this block? A: No. The outer family, circuit noise model, and decoder create the asymptotic threshold statement.

Q8: What does uniform physical S do logically? A: It preserves both logical Z operators and attaches each to the other logical qubit's Z under X conjugation, which is logical CZ up to phases.