Skip to main content
KetQat

Appearance

Theorem · intermediate

Parameters and code states of CSS codes

Two nested binary codes C2 ⊆ C1 of length n give an [[n, k1 − k2, d]] quantum code whose basis states are uniform superpositions over the cosets of C2 in C1, with d the smaller of the minimum weights of C1 \ C2 and of the dual difference, hence at least min(d(C1), d(C2⊥)).

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Let C2⊆C1⊆F2nC_2 \subseteq C_1 \subseteq \F_2^n be linear codes of dimensions k2<k1k_2 < k_1, and let Q=CSS(C1,C2)Q = \mathrm{CSS}(C_1, C_2) be the CSS code with stabilizer generated by X(h)X(h), h∈C2h \in C_2, and Z(h)Z(h), h∈C1⊥h \in C_1^\perp.

  1. Code states. For x∈C1x \in C_1 put
∣x+C2⟩=1∣C2∣∑y∈C2∣x+y⟩.\ket{x + C_2} = \frac{1}{\sqrt{\abs{C_2}}} \sum_{y \in C_2} \ket{x + y} .

This depends only on the coset x+C2x + C_2, states for distinct cosets are orthogonal, and the 2k1−k22^{k_1 - k_2} coset states form an orthonormal basis of QQ. Hence QQ encodes k=k1−k2k = k_1 - k_2 qubits. 2. Distance. QQ has distance d=min⁡(dX,dZ)d = \min(d_X, d_Z) with

dX=min⁡u∈C1∖C2∣u∣  ≥  d(C1),dZ=min⁡v∈C2⊥∖C1⊥∣v∣  ≥  d(C2⊥),d_X = \min_{u \in C_1 \setminus C_2} \abs{u} \;\ge\; d(C_1) , \qquad d_Z = \min_{v \in C_2^\perp \setminus C_1^\perp} \abs{v} \;\ge\; d(C_2^\perp) ,

so d≥min⁡{d(C1),d(C2⊥)}d \ge \min\{ d(C_1), d(C_2^\perp) \}, where d(⋅)d(\cdot) is the minimum weight of a nonzero codeword. The bound dX≥d(C1)d_X \ge d(C_1) is strict exactly when every minimum-weight word of C1C_1 lies in C2C_2, so that it is a stabilizer rather than a logical operator; likewise dZ>d(C2⊥)d_Z > d(C_2^\perp) exactly when every minimum-weight word of C2⊥C_2^\perp lies in C1⊥C_1^\perp. 3. Separate decoding. An error X(e1)Z(e2)X(e_1) Z(e_2) is detected through the two classical syndromes HZe1H_Z e_1 and HXe2H_X e_2, so XX and ZZ errors can be corrected independently by decoders for C1C_1 and C2⊥C_2^\perp. In particular QQ corrects any XX error of weight at most ⌊(d(C1)−1)/2⌋\lfloor (d(C_1) - 1)/2 \rfloor together with any ZZ error of weight at most ⌊(d(C2⊥)−1)/2⌋\lfloor (d(C_2^\perp) - 1)/2 \rfloor.

The construction and the bound are due to Calderbank and Shor and Steane; a textbook account is section 10.4.2 of Nielsen and Chuang. Calderbank and Shor also showed, by choosing the classical codes at random, that CSS codes of positive rate and linear distance exist.

Holds when

  • C2⊆C1⊆F2nC_2 \subseteq C_1 \subseteq \F_2^n are binary linear codes of dimensions k2<k1k_2 < k_1.
  • The code is CSS(C1,C2)\mathrm{CSS}(C_1, C_2) with XX checks spanning C2C_2 and ZZ checks spanning C1⊥C_1^\perp.

Proof

Proof of the CSS code parametersMachine-checked

Write SX={X(h):h∈C2}S_X = \{ X(h) : h \in C_2 \} and SZ={Z(h):h∈C1⊥}S_Z = \{ Z(h) : h \in C_1^\perp \}. Since C2⊆C1=(C1⊥)⊥C_2 \subseteq C_1 = (C_1^\perp)^\perp, every h∈C2h \in C_2 is orthogonal to every h′∈C1⊥h' \in C_1^\perp, so the two groups commute and S=SXSZS = S_X S_Z is abelian. Its elements are X(a)Z(b)X(a) Z(b) with a∈C2a \in C_2, b∈C1⊥b \in C_1^\perp, and the only one equal to a multiple of II is II itself, so −I∉S-I \notin S.

Item 1. For x∈C1x \in C_1 and y′∈C2y' \in C_2, ∣x+y′+C2⟩=∣x+C2⟩\ket{x + y' + C_2} = \ket{x + C_2} because y↦y+y′y \mapsto y + y' permutes C2C_2; so the state depends only on the coset. Two distinct cosets are disjoint sets of strings, so their states have disjoint supports in the computational basis and are orthogonal. Each state is fixed by SS:

  • for h∈C2h \in C_2, X(h)∣x+y⟩=∣x+y+h⟩X(h) \ket{x + y} = \ket{x + y + h}, and y↦y+hy \mapsto y + h permutes C2C_2;
  • for h∈C1⊥h \in C_1^\perp, Z(h)∣x+y⟩=(−1)h⋅(x+y)∣x+y⟩=∣x+y⟩Z(h) \ket{x + y} = (-1)^{h \cdot (x + y)} \ket{x + y} = \ket{x + y} because x+y∈C1x + y \in C_1.

There are ∣C1∣/∣C2∣=2k1−k2\abs{C_1} / \abs{C_2} = 2^{k_1 - k_2} cosets. The stabilizer has dim⁡C2+dim⁡C1⊥=k2+(n−k1)\dim C_2 + \dim C_1^\perp = k_2 + (n - k_1) independent generators, so by the dimension theorem the code has dimension 2 n−k2−(n−k1)=2k1−k22^{\,n - k_2 - (n - k_1)} = 2^{k_1 - k_2}, and the orthonormal coset states form a basis.

Item 2. A Pauli operator is, up to phase, X(a)Z(b)X(a) Z(b). It commutes with every Z(h)Z(h), h∈C1⊥h \in C_1^\perp, iff a⋅h=0a \cdot h = 0 for all such hh, i.e. a∈C1a \in C_1; it commutes with every X(h)X(h), h∈C2h \in C_2, iff b∈C2⊥b \in C_2^\perp. So, up to phase,

N(S)={X(a)Z(b):a∈C1, b∈C2⊥},S={X(a)Z(b):a∈C2, b∈C1⊥}.N(S) = \{ X(a) Z(b) : a \in C_1,\ b \in C_2^\perp \} , \qquad S = \{ X(a) Z(b) : a \in C_2,\ b \in C_1^\perp \} .

An element X(a)Z(b)X(a) Z(b) of N(S)N(S) is outside ⟨iI⟩S\langle iI \rangle S iff a∉C2a \notin C_2 or b∉C1⊥b \notin C_1^\perp. Its weight is the size of supp⁡a∪supp⁡b\operatorname{supp} a \cup \operatorname{supp} b, at least max⁡(∣a∣,∣b∣)\max(\abs{a}, \abs{b}). If a∉C2a \notin C_2 the weight is at least ∣a∣≥dX\abs{a} \ge d_X; otherwise b∉C1⊥b \notin C_1^\perp and the weight is at least ∣b∣≥dZ\abs{b} \ge d_Z. The values are attained by X(u)X(u) for a minimum-weight u∈C1∖C2u \in C_1 \setminus C_2 and by Z(v)Z(v) for a minimum-weight v∈C2⊥∖C1⊥v \in C_2^\perp \setminus C_1^\perp. By the stabilizer distance theorem the distance is min⁡(dX,dZ)\min(d_X, d_Z). Since C1∖C2C_1 \setminus C_2 consists of nonzero words of C1C_1, dX≥d(C1)d_X \ge d(C_1), with equality unless every minimum-weight word of C1C_1 lies in C2C_2; likewise for dZd_Z.

Item 3. X(e1)X(e_1) anticommutes with Z(h)Z(h) iff h⋅e1=1h \cdot e_1 = 1, so the ZZ-type checks reveal HZe1H_Z e_1, a syndrome of the classical code C1C_1, and they are blind to e2e_2; symmetrically the XX-type checks reveal HXe2H_X e_2, a syndrome of C2⊥C_2^\perp. A classical decoder for C1C_1 finds e1e_1 whenever ∣e1∣≤⌊(d(C1)−1)/2⌋\abs{e_1} \le \lfloor (d(C_1)-1)/2 \rfloor, since two such vectors with the same syndrome differ by a codeword of weight less than d(C1)d(C_1), hence are equal; likewise for e2e_2 and C2⊥C_2^\perp. Applying X(e1)Z(e2)X(e_1) Z(e_2) undoes the error.

This follows Calderbank and Shor; compare section 10.4.2 of Nielsen and Chuang.

Part of
Stated in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. A. R. Calderbank, Peter W. Shor (1996). Good quantum error-correcting codes exist. Physical Review A 54, 1098-1105. doi:10.1103/PhysRevA.54.1098
  2. Andrew Steane (1996). Multiple Particle Interference and Quantum Error Correction. Proceedings of the Royal Society A 452, 2551. doi:10.1098/rspa.1996.0136arXiv:quant-ph/9601029
  3. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press. doi:10.1017/CBO9780511976667

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Coset-state basis, k = k1 - k2, d = min(d_X, d_Z) with d_X >= d(C1), d_Z >= d(C2^perp) and the strictness criterion, and separate decoding re-proved; compared with Calderbank-Shor, arXiv quant-ph/9512032, Theorem 1 (t-error correction from C1 and C2^perp of distance d) and abstract (asymptotic rate 1 - 2H(2t/n), i.e. positive rate with linear distance); distances checked numerically on Steane and toric codes. Nielsen-Chuang is not openly readable, so its section numbers were not checked.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision d330a621b30460f0. Source file knowledge/records/theorem/css-code-parameters.md in the content repository (readable there once it is public).