|q⟩ Bad Qubits

advanced · Physics · Quantum Error-Correction Theory

Checkpoint: Analyze a Code

This checkpoint pulls the module together: given only a code's stabilizer generators, you will read off its parameters and compute its distance directly — the core analytical skill of error-correction theory.

The code under study: [[4,2,2]][[4,2,2]]

The [[4,2,2]][[4,2,2]] code is the smallest CSS code and the smallest code that can detect an arbitrary single-qubit error. It has just two stabilizer generators on four qubits,

g1=X1X2X3X4,g2=Z1Z2Z3Z4,g_1 = X_1 X_2 X_3 X_4, \qquad g_2 = Z_1 Z_2 Z_3 Z_4 ,

which commute because they overlap on all four qubits (an even number). With n=4n=4 physical qubits and nk=2n - k = 2 generators, it encodes

k=n(# generators)=42=2logical qubits.k = n - (\text{\# generators}) = 4 - 2 = 2 \quad\text{logical qubits.}

Reading off logical operators

We need 2k=42k = 4 logical operators obeying the qubit algebra and commuting with both generators. A standard choice is

Xˉ1=X1X2,Zˉ1=Z1Z3,Xˉ2=X1X3,Zˉ2=Z1Z2,\bar X_1 = X_1X_2, \quad \bar Z_1 = Z_1 Z_3, \qquad \bar X_2 = X_1X_3, \quad \bar Z_2 = Z_1 Z_2 ,

each of weight 2. Verify that every one commutes with XXXXXXXX and ZZZZZZZZ (even overlaps) and that the intended pairs anticommute — Xˉ1\bar X_1 and Zˉ1\bar Z_1 share only qubit 1, Xˉ2\bar X_2 and Zˉ2\bar Z_2 share only qubit 1 — while different-index pairs commute (each shares an even number of qubits) — exactly the constraints from the logical-operators lesson.

Computing the distance

The distance is the minimum weight of any operator in N(S)SN(\mathcal S)\setminus\mathcal S. The lightest logical operators above have weight 2, and no weight-1 Pauli both commutes with XXXXXXXX and ZZZZZZZZ and lies outside S\mathcal S — so

d=2.d = 2 .

The code is therefore [[4,2,2]][[4,2,2]]: it detects any single error (distance 2 means d1=1d-1 = 1 detectable) but corrects (d1)/2=0\lfloor (d-1)/2\rfloor = 0 of them. It is a detection code, the entry point to the CSS and surface-code constructions of the next module.

Try it

Compute the distance of the [[4,2,2]][[4,2,2]] code from its two generators XXXXXXXX and ZZZZZZZZ using the symplectic formalism: enumerate the Paulis in N(S)SN(\mathcal S)\setminus\mathcal S and return the minimum weight. You should obtain d=2d = 2.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.