|q⟩ Bad Qubits

advanced · Physics · Quantum Error-Correction Theory

Code Distance

The distance of a quantum code is the single most important number summarising its protective power. It plays the same role as the minimum distance of a classical code, but the quantum version must respect the subtle structure of the Knill–Laflamme conditions.

Math you'll use here: stabilizer essentials

The nn-qubit Pauli group Pn\mathcal{P}_n consists of tensor products of I,X,Y,ZI, X, Y, Z together with phases ±1,±i\pm 1, \pm i. A stabilizer group SPn\mathcal{S} \subset \mathcal{P}_n is an abelian subgroup (all its elements commute pairwise) with IS-I \notin \mathcal{S}; these two conditions guarantee a non-trivial joint +1+1 eigenspace, the code space. We never list all of S\mathcal{S}: a small set of independent generators {g1,,gnk}\{g_1,\dots,g_{n-k}\} produces every element as a product, encoding kk logical qubits in nn physical ones.

The normalizer N(S)N(\mathcal{S}) is the set of Paulis that commute with every stabilizer — equivalently, with every generator gig_i. (For the Pauli group the normalizer equals the centralizer, so "commutes with all of S\mathcal{S}" is the working definition.) Two Paulis either commute or anticommute, so this is just the symplectic condition you will use below.

Stabilizers themselves trivially lie in N(S)N(\mathcal{S}) but act as the identity on code states. The interesting elements are the logical operators: Paulis in N(S)SN(\mathcal{S}) \setminus \mathcal{S}. They commute with the syndrome checks (so they leave the code space invariant and raise no flag) yet act non-trivially on the encoded information. The distance below is exactly the lightest such operator.

Definition

For a stabilizer code with stabilizer group S\mathcal{S} on nn qubits, the distance dd is

d=minPN(S)Swt(P),d = \min_{\,P \,\in\, N(\mathcal{S}) \setminus \mathcal{S}} \mathrm{wt}(P),

the minimum weight of any Pauli operator that lies in the normalizer N(S)N(\mathcal{S}) (the set of Paulis commuting with every stabilizer) but is not itself in S\mathcal{S}. The weight wt(P)\mathrm{wt}(P) counts the qubits on which PP acts non-trivially.

The intuition is direct. A Pauli error EE with low weight is detected if it anticommutes with some stabilizer — then it flips a syndrome bit and we notice. The dangerous errors are those that commute with all stabilizers (so produce no syndrome) yet are not stabilizers (so act non-trivially on logical states). The lightest such error is a logical operator, and its weight is the distance.

Why this is the right notion

Recall the Knill–Laflamme conditions iˉEaEbjˉ=αabδij\langle\bar i| E_a^\dagger E_b|\bar j\rangle = \alpha_{ab} \delta_{ij}. A code corrects all errors of weight t\le t precisely when no product EaEbE_a^\dagger E_b of two such errors is an undetected logical operator. Since wt(EaEb)wt(Ea)+wt(Eb)2t\mathrm{wt}(E_a^\dagger E_b) \le \mathrm{wt}(E_a) + \mathrm{wt}(E_b) \le 2t, the condition is met as long as

d2t+1,equivalentlyt=d12.d \ge 2t + 1, \qquad \text{equivalently}\qquad t = \left\lfloor \frac{d-1}{2} \right\rfloor .

A distance-dd code corrects (d1)/2\lfloor (d-1)/2 \rfloor arbitrary errors and detects up to d1d-1 of them.

Reading [[n,k,d]][[n,k,d]]

A code is summarised by the triple [[n,k,d]][[n, k, d]]: nn physical qubits encode kk logical qubits with distance dd. The double brackets distinguish the quantum case from the classical [n,k,d][n,k,d]. For example the perfect five-qubit code is [[5,1,3]][[5,1,3]]: five qubits, one logical qubit, distance three, so it corrects any single-qubit error.

Try it

Compute the distance of the [[5,1,3]][[5,1,3]] perfect code directly from its four stabilizer generators (cyclic shifts of XZZXIXZZXI). Using the symplectic representation, enumerate the Paulis that commute with every generator but are not in the stabilizer group, and return the minimum weight. You should recover d=3d = 3.

Run your code to see the quantum state.

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