Lattice. Fix an integer . The vertices are the points of a square lattice with periodic boundary conditions. There are two edges per vertex: the horizontal edge from to and the vertical edge from to . One qubit sits on each edge, so .
Checks. For every vertex and every plaquette (unit square)
There are operators of each type. A vertex and a plaquette share either no edge or two edges, so all checks commute. They satisfy exactly two relations, and , leaving independent generators.
Parameters. , proved in the parameter theorem.
Logical operators. One choice of representatives is
and are strings of along the two non-contractible loops of the lattice. and are strings of on the edges crossed by non-contractible loops of the dual lattice. Each has weight ; anticommutes with and commutes with the other pair. Multiplying a representative by checks deforms the loop without changing its winding.
Properties. The code is a CSS code and the homological code of the square cellulation of the torus. Every check has weight 4 and every qubit is in two checks of each type, so it is a quantum LDPC code with geometrically local checks in two dimensions. Its code space is the ground space of the toric-code Hamiltonian. It was introduced by Kitaev; its use as a memory with repeated syndrome measurement is analysed by Dennis, Kitaev, Landahl and Preskill.