Five-qubit perfect code

Essence

The code is four commuting questions about five qubits:

g1=XZZX_, g2=_XZZX, g3=X_XZZ, g4=ZX_XZ.

The underscores mean identity. Each row is a one-site cyclic translate of the same mixed X/Z pattern, with the fifth translate omitted because four independent stabilizers already leave one logical qubit. In the phase-free binary convention its row is the XOR of the four printed rows. The displayed pentagon is therefore an algebraic cycle, not a claim that the checks are nearest-neighbor or that the code is topological.

The central fact is an information budget. Four stabilizers produce four syndrome bits, hence sixteen possible signatures. The no-error case uses the zero signature. The other fifteen signatures are used once each by X, Y, or Z on each of the five physical positions. Syndrome readout therefore identifies both the site and Pauli component of any single-qubit fault. Nothing is wasted, which is why the code is called perfect.

A convention-fixed logical pair is

Xbar=XXXXX, and Zbar=ZZZZZ.

They commute with every generator, lie outside the stabilizer, and anticommute with each other. Multiplying by g1 gives the weight-three representatives _YY_X and Y__YZ; these are the upper witnesses for exact distance three. The complete calculation is in stabilizer, logical basis, and distance.

One sentence. Four mixed cyclic checks encode one logical qubit into five positions so tightly that the four-bit syndrome is a bijective address for every single-qubit Pauli fault.

Design problem

Ask for protection against an arbitrary operation on one unknown physical qubit. After expanding that operation in the Pauli basis, the correctable set is {I} together with fifteen single-qubit X/Y/Z alternatives. Recovery needs to distinguish those alternatives modulo harmless stabilizer degeneracy.

Four syndrome bits provide exactly sixteen labels, so five carriers are the first length at which a nondegenerate one-logical-qubit stabilizer block can meet that demand. The counting identity is

2^k (1 + 3n) = 2 * 16 = 32 = 2^n.

The left side counts the code dimension times the no-error and one-error sectors; the right side is the full five-qubit Hilbert-space dimension. Laflamme and collaborators explicitly present the five-carrier minimum and the sixteen-outcome recovery circuit (primary source). Bennett and collaborators independently obtain a five-bit block inside the equivalence between one-way entanglement purification and QEC (primary source).

The cyclic XZZX seed solves the algebraic part compactly. Every pair of rows has an even number of positions where one contributes X and the other Z, so their local minus signs cancel. Yet the stabilizer cannot be generated by pure-X and pure-Z subgroups: every nonidentity product of the four generators has both binary X and Z components. That is the exact non-CSS statement, not merely the observation that the printed rows look mixed.

Derivation chain

  1. Convert each Pauli row to a binary vector (x|z). Pairwise symplectic products vanish, so the stabilizer is abelian.
  2. GF(2) reduction has pivots in the first four X columns. The row rank is four, hence k=5-4=1.
  3. Enumerate all fifteen nonidentity stabilizer products. None has zero X part or zero Z part, so no CSS generating split exists.
  4. Verify that XXXXX and ZZZZZ commute with the stabilizer, are not in its row space, and have symplectic product one. They form a logical pair.
  5. Enumerate single-site X/Y/Z syndromes. The set is every nonzero four-bit word exactly once.
  6. A weight-one normalizer would have zero syndrome, which the table excludes. A weight-two normalizer would factor into two single-site errors with equal syndromes, which injectivity excludes. Therefore d>=3.
  7. _YY_X = Xbar*g1 and Y__YZ = Zbar*g1, up to Pauli phase. Both have weight three and remain logical, so d<=3.

The executable transcript at atlas/five_one_three/pedagogy/reproduce.py reruns every step and the generic distance enumerator. The information-theoretic version of steps 5–7 is in perfect syndrome packing and decoding.

Multiple pictures

Cyclic Pauli picture. Start with XZZX_ and rotate the physical labels. This picture makes the small presentation memorable and exposes why the fifth translated row is dependent. The viewer uses exactly this incidence data.

Binary symplectic picture. Replace X by (1|0), Z by (0|1), Y by (1|1), and identity by (0|0). Commutation becomes the parity x dot z' + z dot x'. Rank, syndrome, normalizer, and logical commutation are then ordinary GF(2) linear algebra (Gottesman).

Perfect-packing picture. Regard the syndrome as an address space. The zero address means no error; all fifteen nonzero addresses name one weight-one Pauli. This picture explains both exact lookup decoding and the absence of a weight-two logical operator.

GF(4) picture. Combine (x_i,z_i) into one symbol per site. The cyclic row space becomes an additive code over GF(4), useful for classification. It does not change the physical alphabet or make this entry the q-ary family.

Graph and encoder picture. A graph-code construction uses a pentagonal output graph plus an input interface; CWS and encoder-respecting forms add their own dictionaries (Schlingemann–Werner, Cross et al., Khesin et al.). A graph state alone is a state, not the one-logical-qubit subspace. The full boundary map is in representations and neighboring families.

Why these parameters

The four independent stabilizers reduce a thirty-two-dimensional physical space to a two-dimensional logical space. Distance three means every weight-one Pauli is detected and correctable, while some weight-three Pauli is logical. Perfection is stronger than merely having distance three: the single-error sectors already exhaust the ambient space.

This explains why increasing any one resource changes the problem. Six or more carriers could leave unused syndromes or encode more logical qubits. Qudit carriers change the local error alphabet. Degenerate codes can reuse syndromes when error products are stabilizers. Approximate amplitude-damping codes optimize a restricted channel instead of the full single-qubit Pauli span. None of those objects is an alternate name for this binary block.

The code also saturates the quantum Singleton equality n-k=2(d-1). That makes it one quantum-MDS example. Dutta and Kurur place the same cyclic block inside a Frobenius family (primary source). The three class edges— perfect, MDS, and Frobenius—are therefore useful, but their direction matters: this entry is a special case of each broader class.

Failure modes

Operations story

The exported logical Paulis are transversal in the literal tensor-product sense: apply X or Z to each physical qubit. The reproduction script verifies their normalizer action. More general Clifford circuits can be synthesized from local Clifford actions and code automorphisms, but their logical action and Pauli-frame correction must be computed for the selected physical permutation (Sayginel et al.).

Universality needs another mechanism. Yoder, Takagi, and Chuang interrupt nontransversal circuits with intermediate correction, giving pieceable fault-tolerant gates on the small block (primary source). Ryan-Anderson and collaborators implement that distinction in a logical CNOT between two five-qubit blocks; the operation is not transversal merely because it is fault tolerant (primary source).

The five-qubit stabilizer also appears in five-to-one magic-state distillation. That is a measurement-and-acceptance protocol over five noisy resource states, not a native logical T gate (Bravyi–Kitaev, Souza et al.). Hardware evidence spans NMR, superconducting, diamond-spin, and trapped-ion registers, with different protocol boundaries. See operations and realizations.

Litmus questions

Q1: Why do XZZX_ and _XZZX commute? A: Their X-versus-Z disagreements occur an even number of times, so the binary symplectic inner product is zero.

Q2: Why is the code non-CSS rather than merely printed in a non-CSS basis? A: No nonidentity element of the stabilizer row space is pure X or pure Z, so no pure-sector generating split can span the group.

Q3: What fixes the one-logical-qubit count? A: Four independent stabilizer rows acting on five qubits leave k=5-4=1.

Q4: Why do the fifteen single faults prove d>=3? A: They occupy all nonzero syndromes distinctly. A zero-syndrome weight-one error is absent, and a zero-syndrome weight-two product would require two equal syndromes.

Q5: What is the explicit upper witness for distance? A: _YY_X, which equals XXXXX times the first stabilizer up to phase, is a weight-three logical operator.

Q6: Does “perfect” mean every fault process is corrected? A: No. It means the nondegenerate radius-one Pauli syndrome packing is exact. Circuit faults, correlated errors, leakage, and measurement noise need extra models.

Q7: Is the graph pentagon the code? A: No. It is part of a graph-code or encoder dictionary. The exact identity remains the binary stabilizer row space and its logical quotient.

Q8: Is the trapped-ion logical CNOT transversal? A: No. The cited implementation uses flagging and pieceable fault tolerance for a nontransversal circuit.