Skip to main content
KetQat

Appearance

Theorem · intermediate

Parameters of the toric code

The toric code on an L by L square lattice with periodic boundaries encodes two qubits in 2L^2 physical qubits with distance L. Its logical operators are the non-contractible loops of the lattice and of its dual.

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.

For every integer L≥2L \ge 2 the toric code on the L×LL \times L torus is a stabilizer code with parameters

[[ n,k,d ]]=[[ 2L2,  2,  L ]].[[\,n, k, d\,]] = [[\,2L^2,\; 2,\; L\,]] .

More precisely:

  1. the 2L22L^2 vertex and plaquette operators generate a stabilizer group of rank 2L2−22L^2 - 2;
  2. a product of ZZ operators on a set cc of edges commutes with every check exactly when cc meets every vertex in an even number of edges, and it then acts non-trivially on the code space exactly when cc winds an odd number of times around at least one of the two directions of the torus; the same holds for products of XX on the dual lattice;
  3. every Pauli operator that acts non-trivially on the code space has weight at least LL, and the straight loops Zˉ1,Zˉ2,Xˉ1,Xˉ2\bar Z_1, \bar Z_2, \bar X_1, \bar X_2 of weight LL attain the bound.

In homological terms k=dim⁡H1(T2;F2)=2k = \dim H_1(T^2; \F_2) = 2 and dd is the length of the shortest non-contractible loop. The code and these properties are due to Kitaev.

Holds when

  • Square lattice on a torus with L≥2L \ge 2 sites in each direction and one qubit per edge.
  • The distance is the minimum weight of a Pauli operator that commutes with every check and is not, up to a phase, a product of checks.

Proof

Proof of the toric-code parameters by counting and loop intersectionMachine-checked

Notation is that of the toric code record: vertices (i,j)∈ZL2(i,j) \in \Z_L^2, edges hi,jh_{i,j} and vi,jv_{i,j}, checks Ai,jA_{i,j} and Bi,jB_{i,j}.

Number of logical qubits. Let SS be a set of vertices. The product ∏v∈SAv\prod_{v \in S} A_v acts on an edge with XX if exactly one endpoint of the edge is in SS and trivially otherwise. It is the identity exactly when every edge has both endpoints in SS or neither, that is, when SS is a union of connected components of the lattice. The lattice is connected, so S=∅S = \emptyset or SS is all of the vertices. Hence the L2L^2 vertex operators satisfy the single relation ∏vAv=I\prod_v A_v = I and generate a group of rank L2−1L^2 - 1. Every edge lies on exactly two plaquettes, so the same argument on the dual lattice shows that the plaquette operators have rank L2−1L^2 - 1. A product of XX-type operators equals a product of ZZ-type operators only if both are the identity, so the stabilizer group has rank 2L2−22L^2 - 2 and

k=n−(2L2−2)=2.k = n - (2L^2 - 2) = 2 .

A symplectic basis of logical operators. For each i∈ZLi \in \Z_L and j∈ZLj \in \Z_L define

Xˉ1(i)=∏j′Xhi,j′,Xˉ2(j)=∏i′Xvi′,j,Zˉ1=∏i′Zhi′,0,Zˉ2=∏j′Zv0,j′.\bar X_1^{(i)} = \prod_{j'} X_{h_{i,j'}}, \qquad \bar X_2^{(j)} = \prod_{i'} X_{v_{i',j}}, \qquad \bar Z_1 = \prod_{i'} Z_{h_{i',0}}, \qquad \bar Z_2 = \prod_{j'} Z_{v_{0,j'}} .

A plaquette Bi′,j′B_{i',j'} contains the horizontal edges hi′,j′h_{i',j'} and hi′,j′+1h_{i',j'+1}, so it meets the support of Xˉ1(i)\bar X_1^{(i)} in two edges if i′=ii' = i and in none otherwise; likewise for Xˉ2(j)\bar X_2^{(j)} and the vertical edges. So the Xˉ\bar X operators commute with every check. A vertex meets the support of Zˉ1\bar Z_1 (a row of horizontal edges) in two edges or none, and likewise for Zˉ2\bar Z_2, so the Zˉ\bar Z operators commute with every check. The supports of Zˉ1\bar Z_1 and Xˉ1(i)\bar X_1^{(i)} share exactly the edge hi,0h_{i,0}, the supports of Zˉ2\bar Z_2 and Xˉ2(j)\bar X_2^{(j)} share exactly v0,jv_{0,j}, and Zˉ1\bar Z_1, Xˉ2(j)\bar X_2^{(j)} have disjoint supports, as do Zˉ2\bar Z_2, Xˉ1(i)\bar X_1^{(i)}. Therefore

XˉaZˉb=(−1)δab ZˉbXˉa,\bar X_a \bar Z_b = (-1)^{\delta_{ab}}\, \bar Z_b \bar X_a ,

for any choice of the superscripts. No non-trivial product of these four operators commutes with all four, so none is in the stabilizer group, and they represent the 424^2 cosets of logical Pauli operators of a code with k=2k = 2: every Pauli operator commuting with all checks equals, up to a phase, s Xˉ1a1Xˉ2a2Zˉ1b1Zˉ2b2s\, \bar X_1^{a_1} \bar X_2^{a_2} \bar Z_1^{b_1} \bar Z_2^{b_2} with ss a product of checks.

Translated loops are equivalent. Multiply the vertex operators of column i+1i+1:

∏jAi+1,j=∏jXhi+1,jXhi,j⋅∏jXvi+1,jXvi+1,j−1=Xˉ1(i) Xˉ1(i+1),\prod_{j} A_{i+1,j} = \prod_j X_{h_{i+1,j}} X_{h_{i,j}} \cdot \prod_j X_{v_{i+1,j}} X_{v_{i+1,j-1}} = \bar X_1^{(i)}\, \bar X_1^{(i+1)} ,

because each vertical edge of that column appears twice. Hence all Xˉ1(i)\bar X_1^{(i)}, i∈ZLi \in \Z_L, differ by stabilizers, and their supports (the horizontal edges with first coordinate ii) are pairwise disjoint. The same holds for the Xˉ2(j)\bar X_2^{(j)}.

Distance. Let Q=Z(c)Q = Z(c) be a product of ZZ operators that commutes with all checks and is not a product of checks. Write QQ in the form above. Since QQ commutes with Zˉ1\bar Z_1 and Zˉ2\bar Z_2, a1=a2=0a_1 = a_2 = 0; then ss is of ZZ type, and since QQ is not a product of checks, (b1,b2)≠(0,0)(b_1, b_2) \ne (0,0). If b1=1b_1 = 1, QQ anticommutes with Xˉ1(0)\bar X_1^{(0)} and therefore with every Xˉ1(i)\bar X_1^{(i)}, since these differ from it by stabilizers, with which QQ commutes. Anticommuting with Xˉ1(i)\bar X_1^{(i)} requires cc to contain an odd number, so at least one, of the edges hi,jh_{i,j}, j∈ZLj \in \Z_L. These LL sets of edges are disjoint, so ∣c∣≥L\abs{c} \ge L. If b2=1b_2 = 1 the same argument with Xˉ2(j)\bar X_2^{(j)} applies. By the symmetry of the construction under exchanging the lattice with its dual, every non-trivial XX-type logical operator also has weight at least LL.

A general Pauli operator is, up to a phase, X(a)Z(b)X(a) Z(b). It commutes with the ZZ-type checks exactly when X(a)X(a) does and with the XX-type checks exactly when Z(b)Z(b) does. If it is not a product of checks, at least one of X(a)X(a), Z(b)Z(b) is not either, and that factor has weight at least LL, so the whole operator does. The operator Zˉ1\bar Z_1 has weight exactly LL. Hence d=Ld = L.

Homological reading. The first step computes dim⁡ker⁡∂1−rank⁡∂2=dim⁡H1(T2;F2)=2\dim \ker \partial_1 - \operatorname{rank} \partial_2 = \dim H_1(T^2; \F_2) = 2 for the chain complex of the homological code. The exponents (b1,b2)(b_1, b_2) are the homology class of the cycle cc, detected by its intersection numbers with the two dual loops. This is the argument indicated by Kitaev, written out with explicit coordinates.

Builds on
Stated in
Mentioned 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. Yu. Kitaev (2003). Fault-tolerant quantum computation by anyons. Annals of Physics 303, 2-30. doi:10.1016/S0003-4916(02)00018-0arXiv:quant-ph/9707021
  2. Eric Dennis, Alexei Kitaev, Andrew Landahl, John Preskill (2002). Topological quantum memory. Journal of Mathematical Physics 43, 4452-4505. doi:10.1063/1.1499754arXiv:quant-ph/0110143

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)

    Items 1-3 re-derived (relations, cycle/cocycle condition and homology, distance as shortest non-contractible loop) and checked by own GF(2) computation for L = 2..5 (rank 2L^2 - 2, k = 2, minimum logical Z weight L). Compared with Kitaev, arXiv:quant-ph/9707021, Sec. 2 (two relations, m = 2k^2 - 2, dim L = 4, logical algebra generated by non-contractible loops and cuts, 1-homology description); the distance value is not stated explicitly there and was confirmed by the derivation and computation. Metadata matched Crossref.

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 bc0002d992e4e810. Source file knowledge/records/theorem/toric-code-parameters.md in the content repository (readable there once it is public).