Research notes · Quantum error correction

Error corrections in view of algebraic topology

From spaces and quotient maps to syndromes and logical operators.

Huan-Hsin Tseng · October 2026 · Expository note

In reading quantum error correction textbooks, lecture notes, and papers, I often find that the mathematical spaces, map domains, and identifications are left implicit. This can make a compelling physical picture harder to reconstruct precisely. I prefer to begin with the topology and its algebra, then ask which additional choices turn them into a quantum code.

A face is not its boundary; a chain is not a cochain; a homology class is not a quantum state. Keeping these objects distinct makes the connection to physics more direct. The aim of this note is to derive the familiar surface-code operators from explicit maps, and to see exactly what their measurements can—and cannot—tell us about an error.

Conceptual cellular torus comparing a loop that bounds a face with an essential loop that does not bound a two-chain.
Two kinds of cycle on a cellulated torus. The loop \(z_b=\partial_2f\) bounds a face, whereas the essential loop \(z_\ell\) is closed but is not a boundary. Their distinction is measured by homology: \(H_1(T^2;\mathbb F_2)\cong\mathbb F_2^2\). The notation and quotient construction are developed below. This is a schematic conceptual illustration.

1. Spaces, quotients, and homotopy

Definition 1 — Quotient space. Let \(K\) be a topological space and \(\sim\) an equivalence relation. The set \(K/{\sim}\) consists of equivalence classes; the projection \(q:K\to K/{\sim}\), \(u\mapsto[u]\), equips it with the quotient topology:

\[ U\subseteq K/{\sim}\text{ is open}\iff q^{-1}(U)\subseteq K\text{ is open}. \]

For a nonempty subspace \(A\subseteq K\), the notation \(K/A\) means that all points of \(A\) are identified to one point, with every point outside \(A\) remaining distinct.

For example, identifying opposite sides of a square produces a torus. This changes the topological space. Later, a quotient such as \(Z_1/B_1\) will instead identify algebraic chains that differ by a boundary. These are different quotient constructions.

Definition 2 — Based homotopy. Fix a basepoint \(k_0\in K\). Based maps \(f,g:(S^n,*)\to(K,k_0)\) are equivalent when a continuous map \(F:S^n\times[0,1]\to K\) satisfies \(F(\cdot,0)=f\), \(F(\cdot,1)=g\), and \(F(*,t)=k_0\). For \(n\geq1\),

\[ \pi_n(K,k_0):=[(S^n,*),(K,k_0)]_*. \]

For \(n=1\), this is the fundamental group: based loops modulo based homotopy, with multiplication given by concatenation. Higher groups \(\pi_n\), \(n\geq2\), are abelian; \(\pi_1\) need not be.

Homotopy deforms maps continuously. Homology, defined below, compares additive cycles modulo boundaries. They are related, but they do not impose the same equivalence relation. For path-connected CW complexes, the first connection is

\[ H_1(K;\mathbb Z)\cong\pi_1(K,k_0)_{\mathrm{ab}}, \qquad H_1(K;\mathbb F_2)\cong H_1(K;\mathbb Z)\otimes_{\mathbb Z}\mathbb F_2. \]

Here the subscript \(\mathrm{ab}\) denotes quotienting by the commutator subgroup. Thus binary homology retains the additive, parity-valued information relevant to the code considered here; it does not retain the whole fundamental group.

2. Cellular chains and their duals

Definition 3 — Cellular data. Let \(K\) be a finite oriented regular two-dimensional CW complex and \(R\) a commutative ring with unit. Its skeletons satisfy \(K^{(0)}\subseteq K^{(1)}\subseteq K^{(2)}=K\). The \(0\)-cells are points. For \(k\geq1\), a \(k\)-cell is attached by a map \(a_\sigma:S^{k-1}\to K^{(k-1)}\); regularity requires its characteristic map \(D^k\to\overline\sigma\) to be a homeomorphism. Set

\[ C_k(K;R):=\bigoplus_{\sigma\in K_k}R\sigma, \qquad C^k(K;R):=\operatorname{Hom}_R(C_k(K;R),R). \]

The set \(K_k\) indexes the open \(k\)-cells. A chain is a formal linear combination of cells. A cochain is an \(R\)-linear functional on chains; its cellular dual basis satisfies \(\sigma^\vee(\tau)=\delta_{\sigma\tau}\).

Notation relative to Hatcher. Throughout this note \(C_n(K;R)\) denotes cellular chains. The chosen cell orientations identify it with Hatcher’s skeletal group \(H_n(K^{(n)},K^{(n-1)};R)\), where \(K^{(-1)}=\varnothing\). Hatcher denotes the cellular differential by \(d_n\); here it is written \(\partial_n\). The cellular homology theorem identifies its homology with singular homology. The symbols are fixed here to keep the chain and cochain domains explicit.

Write \(v,e,f\) for vertices, oriented edges, and faces. The cellular boundary maps and their dual coboundaries are

\[ C_2\xrightarrow{\partial_2}C_1\xrightarrow{\partial_1}C_0, \qquad \partial_1\partial_2=0, \]
\[ C^0\xrightarrow{\delta^0}C^1\xrightarrow{\delta^1}C^2, \qquad (\delta^k\phi)(c)=\phi(\partial_{k+1}c). \]

Here \(\phi\in C^k\), \(c\in C_{k+1}\), and \(\delta^1\delta^0=0\). The notation suppresses \((K;R)\) only within this fixed complex.

Definition 4 — Incidence coefficients. For an oriented face \(f\), let \(a_f:S^1\to K^{(1)}\) be its attaching map. For an open edge \(e\), let \(q_e:K^{(1)}\to K^{(1)}/(K^{(1)}\setminus e)\cong S^1\) collapse its complement. With \(\iota:\mathbb Z\to R\), \(m\mapsto m1_R\), put

\[ [f:e]:=\iota\bigl(\deg(q_e\circ a_f)\bigr), \qquad \partial_2f=\sum_e[f:e]e. \]

An edge oriented from \(s(e)\) to \(t(e)\) has \(\partial_1e=t(e)-s(e)\). Consequently,

\[ \delta^0v^\vee=\sum_e[e:v]e^\vee, \qquad [e:v]:=v^\vee(\partial_1e). \]

The second identity follows by evaluation on each edge. It takes a vertex cochain as input; \(\partial_1\) takes an edge chain as input. A vertex and its dual basis functional cannot be substituted for one another without specifying an identification.

\[ \langle\cdot,\cdot\rangle:C^1\times C_1\longrightarrow R, \qquad \langle x,z\rangle=x(z). \]

This evaluation is canonical. Writing both modules as \(R^n\), or writing \([\delta^0]=[\partial_1]^{\mathsf T}\), uses the chosen cellular bases.

3. Homology, exactness, and chain maps

Definition 5 — Cycles, boundaries, and homology. For a chain complex \((C_*,\partial_*)\), set

\[ Z_k:=\ker\partial_k,\qquad B_k:=\operatorname{im}\partial_{k+1}, \qquad H_k:=Z_k/B_k. \]

The identity \(\partial_k\partial_{k+1}=0\) gives \(B_k\subseteq Z_k\). A class is \([z]=z+B_k\); two cycles represent the same class precisely when \(z'-z=\partial_{k+1}b\) for some \(b\in C_{k+1}\). Dually,

\[ Z^k:=\ker\delta^k,\qquad B^k:=\operatorname{im}\delta^{k-1}, \qquad H^k:=Z^k/B^k. \]

A sequence \(M\xrightarrow{a}N\xrightarrow{b}P\) is exact at \(N\) when \(\operatorname{im}a=\ker b\). A chain complex requires only containment. Its homology measures the failure of exactness. The following are genuine short exact sequences:

\[ 0\longrightarrow Z_k\xrightarrow{\;i\;}C_k \xrightarrow{\;\partial_k\;}B_{k-1}\longrightarrow0, \]
\[ 0\longrightarrow B_k\xrightarrow{\;j\;}Z_k \xrightarrow{\;q\;}H_k\longrightarrow0. \]

Here \(i,j\) are inclusions, \(q(z)=z+B_k\), and \(\partial_k\) in the first sequence is corestricted to its image. The cellular complex itself is generally not exact.

Definition 6 — Chain map. A family of \(R\)-linear maps \(F_k:C_k(K;R)\to C_k(L;R)\) is a chain map when \(\partial_k^L F_k=F_{k-1}\partial_k^K\). Thus both squares commute:

\[ \begin{array}{ccccc} C_2(K;R)&\xrightarrow{\partial_2^K}&C_1(K;R)&\xrightarrow{\partial_1^K}&C_0(K;R)\\[2pt] {\scriptstyle F_2}\downarrow&&{\scriptstyle F_1}\downarrow&&{\scriptstyle F_0}\downarrow\\[2pt] C_2(L;R)&\xrightarrow{\partial_2^L}&C_1(L;R)&\xrightarrow{\partial_1^L}&C_0(L;R) \end{array} \]

It induces \(H_k(F_*):H_k(K;R)\to H_k(L;R)\), \([z]\mapsto[F_kz]\): cycles map to cycles and boundaries to boundaries.

For a continuous cellular map \(f:K\to L\), write \(f_\sharp\) for its induced cellular chain map and \(f_*\) for the induced homology map, following the distinction between chain and homology maps in Hatcher. This describes compatibility with topology; implementing a physical operation on a quantum device requires additional data.

4. Relative chains and two different boundary maps

Definition 7 — Relative complex. Let \(A\subseteq K\) be a subcomplex. Since \(\partial_kC_k(A;R)\subseteq C_{k-1}(A;R)\), the quotient modules carry an induced differential:

\[ C_k(K,A;R):=C_k(K;R)/C_k(A;R), \]
\[ \partial_k^{\mathrm{rel}}:C_k(K,A;R)\longrightarrow C_{k-1}(K,A;R), \qquad \overline c\longmapsto\overline{\partial_kc}. \]

Here \(\overline c=c+C_k(A;R)\). Replacing \(c\) by \(c+a\), \(a\in C_k(A;R)\), changes \(\partial_kc\) by \(\partial_ka\in C_{k-1}(A;R)\); hence the formula is well-defined. Also \((\partial^{\mathrm{rel}})^2=0\).

\[ H_k(K,A;R):=\ker\partial_k^{\mathrm{rel}}/\operatorname{im}\partial_{k+1}^{\mathrm{rel}}. \]

The relative cochains are the dual of this quotient, equivalently the ordinary cochains that vanish on chains in \(A\):

\[ C^k(K,A;R):=\operatorname{Hom}_R(C_k(K,A;R),R) \cong\{\phi\in C^k(K;R):\phi|_{C_k(A;R)}=0\}. \]

A relative cycle need not be closed as an ordinary chain: its boundary need only lie in \(A\). For example, a path with both endpoints in \(A\) has zero relative boundary. For a nonempty CW subcomplex, \(H_k(K,A;R)\cong\widetilde H_k(K/A;R)\); the tilde denotes reduced homology. This relates the topological quotient to the algebraic construction without identifying them.

Topological spaces and their algebraic descriptions: a cellulated surface, a quotient space, cycles modulo boundaries, and a relative chain whose endpoints lie in the selected subcomplex.
An annulus \(K\) with \(A=\partial K\), comprising both boundary circles. A bridging chain \(c\) has ordinary boundary \(b-a\in C_0(A;R)\), so it is a relative cycle; \(\partial\) retains the endpoint class in \(H_0(A;R)\). The quotient \(K/A\) identifies all of \(A\) to one point. This illustrates the relative construction; the planar code below instead selects two rough boundary arcs of a disk.

The inclusions \(i\) and quotient projections \(j\) form a degreewise short exact sequence of chain complexes:

\[ 0\longrightarrow C_*(A;R)\xrightarrow{\;i\;}C_*(K;R) \xrightarrow{\;j\;}C_*(K,A;R)\longrightarrow0. \]

It produces the long exact sequence of the pair; coefficient \(R\) is suppressed here:

\[ \cdots\longrightarrow H_k(A)\xrightarrow{i_*}H_k(K) \xrightarrow{j_*}H_k(K,A)\xrightarrow{\partial}H_{k-1}(A) \xrightarrow{i_*}H_{k-1}(K)\longrightarrow\cdots. \]

Proposition 1 — Connecting homomorphism. The map

\[ \partial:H_k(K,A;R)\longrightarrow H_{k-1}(A;R), \qquad [\overline c]\longmapsto[\partial_kc]_A \]

is defined by lifting a relative cycle to \(c\in C_k(K;R)\), taking its ordinary boundary, and viewing that boundary in \(A\).

Verification. The relative-cycle condition places \(\partial_kc\) in \(C_{k-1}(A;R)\), and \(\partial^2=0\) makes it a cycle there. Any equivalent representative has a lift \(c'=c+a+\partial_{k+1}b\), with \(a\in C_k(A;R)\). Then \(\partial_kc'-\partial_kc=\partial_ka\), a boundary in \(A\). Thus the class is independent of both choices. \(\square\)

Following Hatcher, the symbol \(\partial\) also denotes the connecting homomorphism. The relative differential \(\partial_k^{\mathrm{rel}}\) acts on relative chains; the connecting map \(\partial\) acts on relative homology classes and lands in the homology of \(A\). Its domain and codomain distinguish it from the chain differential. Neither is a homotopy-group boundary map. Relative homotopy is a separate construction using homotopy classes of maps of based pairs; it is not the quotient defining \(H_k(K,A;R)\). These distinctions will specify which error endpoints a boundary is allowed to absorb.

5. The physical problem: which error occurred?

Suppose a quantum state is encoded in many physical qubits. Noise changes individual qubits, while measurements must reveal enough information to correct the error without measuring the encoded state. A surface code addresses this with local commuting checks. The mathematical question is: which parts of an error are visible to those checks, and which undetectable changes remain physically distinct?

Choose a cellulated surface and work over \(\mathbb F_2\). For a closed surface use \(D_*=C_*(K;\mathbb F_2)\). For a patch with a selected rough boundary subcomplex \(A\), use \(D_*=C_*(K,A;\mathbb F_2)\). Write \(d_k:D_k\to D_{k-1}\) for the corresponding differential and \(d^k:D^k\to D^{k+1}\) for its dual. In the relative case, the cellular basis consists of cells not contained in \(A\).

\[ D^k:=\operatorname{Hom}_{\mathbb F_2}(D_k,\mathbb F_2), \qquad (d^kx)(c):=x(d_{k+1}c), \quad x\in D^k,\ c\in D_{k+1}. \]
The mathematical data and their physical roles
Mathematical objectPhysical interpretation
Basis edge of \(D_1\)One data qubit
\(z\in D_1\), \(x\in D^1\)Supports of \(Z\)- and \(X\)-type Pauli errors
\(d_2f\in D_1\)Label of a \(Z\)-plaquette check
\(d^0v^\vee\in D^1\)Label of an \(X\)-star check
\(d_1z\in D_0\), \(d^1x\in D^2\)Measured error syndromes
\(H_1(D_*)\), \(H^1(D_*)\)Undetectable pure-type errors modulo stabilizers
Local surface-code supports derived from a face boundary and a vertex coboundary, with edge qubits, incidence coefficients, and their evaluation pairing.
Local supports and the maps that generate them. The face \(f\in C_2\) yields \(z=\partial_2f\in C_1\); the vertex functional \(v^\vee\in C^0\) yields \(x=\delta^0v^\vee\in C^1\). Their common edges contribute to the evaluation \(x(z)\). At an incident corner there are two such edges, so the binary pairing is zero. The figure shows an interior patch; global logical classes depend on the complete surface and its boundary conditions.

The picture describes labels and incidences. The next step supplies a Hilbert space and an operator realization; only then do the chains become quantum operations.

6. Derive the checks and their commutation

Return briefly to the general \(R\)-valued cellular complex. Choose homomorphisms of additive groups

\[ \rho:(C_1,+)\longrightarrow\operatorname{GL}(\mathcal H), \qquad \Pi:(C^1,+)\longrightarrow\operatorname{GL}(\mathcal H). \]

These are not \(R\)-linear maps into \(\operatorname{GL}(\mathcal H)\). Define \(W_e(r)=\rho(re)\) and \(U_e(r)=\Pi(re^\vee)\). The cellular maps give the compositions

\[ C_2\xrightarrow{\partial_2}C_1\xrightarrow{\rho}\operatorname{GL}(\mathcal H), \]
\[ C^0\xrightarrow{\delta^0}C^1\xrightarrow{\Pi}\operatorname{GL}(\mathcal H). \]

Proposition 2 — Incidence determines the products. Applying the homomorphisms to the incidence expansions gives

\[ B_f:=\rho(\partial_2f)=\prod_e W_e([f:e]), \qquad A_v:=\Pi(\delta^0v^\vee)=\prod_e U_e([e:v]). \]

Factors commute within each family because its source group is abelian. A negative incidence yields an inverse, for example \(W_e(-r)=W_e(r)^{-1}\).

Thus the products follow from boundaries and coboundaries. Locality requires each \(W_e,U_e\) to act only on the Hilbert-space factor assigned to \(e\). A nonzero coefficient produces nontrivial support only when its label acts nontrivially. These group homomorphisms alone impose neither unitarity nor cross-commutation.

For the qubit code, use the binary complex \(D_*\) above, with \(n=\dim D_1\), and choose

\[ \mathcal H=(\mathbb C^2)^{\otimes n}, \qquad \rho(z)=\bigotimes_e Z^{z_e}, \qquad \Pi(x)=\bigotimes_e X^{x_e}. \]

The Pauli matrices supply the compatibility relation

\[ \Pi(x)\rho(z)=(-1)^{\langle x,z\rangle}\rho(z)\Pi(x), \qquad \langle x,z\rangle=x(z)\in\mathbb F_2. \]

Proposition 3 — Commutation from a typed composition. Let \(B_f=\rho(d_2f)\) and \(A_v=\Pi(d^0v^\vee)\). Then

\[ \langle d^0v^\vee,d_2f\rangle =v^\vee(d_1d_2f)=0 \quad\Longrightarrow\quad A_vB_f=B_fA_v. \]

Both checks are Hermitian involutions. The code space \(\mathcal C\subseteq\mathcal H\) is their simultaneous \(+1\) eigenspace.

The topology supplies \(d_1d_2=0\); the Pauli realization converts its evaluation into a commutation phase. For prime-dimensional qudits, replace qubits by \(\mathbb C^p\) and use compatible Weyl operators over \(\mathbb F_p\). A general coefficient ring requires additional representation data.

Invariant subspaces and correctable errors

Proposition 4 — The code projector is a group average. Let \(S=\langle A_v,B_f\rangle\subset U(\mathcal H)\) be the finite abelian Pauli stabilizer group, with \(-I\notin S\). Its common \(+1\) eigenspace is the invariant subspace

\[ \mathcal C=\mathcal H^S:=\{\psi\in\mathcal H:g\psi=\psi\text{ for every }g\in S\}, \qquad P_{\mathcal C}=\frac1{|S|}\sum_{g\in S}g. \]

Proof. Closure under inverses gives \(P_{\mathcal C}^{\dagger}=P_{\mathcal C}\). Each element occurs \(|S|\) times in the double sum, so \(P_{\mathcal C}^2=P_{\mathcal C}\). Left multiplication permutes \(S\), hence \(gP_{\mathcal C}=P_{\mathcal C}\); conversely every invariant vector is fixed by the average. Thus \(\operatorname{im}P_{\mathcal C}=\mathcal H^S\). The Pauli trace identity gives \(\dim\mathcal C=2^n/|S|>0\).

More generally, for a finite group \(G\), a unitary representation \(U:G\to U(\mathcal H)\), and an irreducible character \(\chi:G\to\mathbb C\) of dimension \(d_\chi=\chi(e)\), the orthogonal isotypic projector is

\[ P_\chi=\frac{d_\chi}{|G|}\sum_{g\in G}\overline{\chi(g)}\,U(g). \]

Its image is the sum of all irreducible subrepresentations with character \(\chi\). Taking \(G=S\), \(U\) the inclusion, and \(\chi=1\) recovers the code projector. Cellular incidence therefore constructs the stabilizer group; group averaging selects its invariant quantum states.

An isotypic subspace is not automatically an error-correcting code. For a noise channel with Kraus operators \(E_a\in\operatorname{End}(\mathcal H)\), exact recovery on \(\mathcal C\) is equivalent to the Knill–Laflamme condition

\[ P_{\mathcal C}E_a^{\dagger}E_bP_{\mathcal C}=c_{ab}P_{\mathcal C} \qquad\text{for every }a,b, \]

where \(c_{ab}\in\mathbb C\) is independent of the encoded state. This additional condition concerns the specified errors, not symmetry alone. The next section identifies the logical error classes left unresolved by the surface-code checks.

7. Decode a syndrome; preserve a logical class

A \(Z\)-error \(\rho(z)\), \(z\in D_1\), changes the star eigenvalues according to

\[ A_v\rho(z)=(-1)^{v^\vee(d_1z)}\rho(z)A_v. \]

Thus \(s_Z=d_1z\in D_0\) is the syndrome: for an interior error path, its endpoints are detected. Similarly an \(X\)-error \(\Pi(x)\), \(x\in D^1\), has syndrome \(s_X=d^1x\in D^2\). A cycle or cocycle has no syndrome. A boundary or coboundary is a product of stabilizers and acts trivially on the code. Therefore

\[ \mathcal L_Z\cong H_1(D_*)=\frac{\ker d_1}{\operatorname{im}d_2}, \qquad \mathcal L_X\cong H^1(D_*)=\frac{\ker d^1}{\operatorname{im}d^0}. \]

Here \(\mathcal L_Z,\mathcal L_X\) are pure-type logical Pauli classes modulo stabilizers and global phases. Evaluation descends to \(H^1(D_*)\times H_1(D_*)\to\mathbb F_2\): a cocycle vanishes on boundaries, and a coboundary vanishes on cycles. A pair with evaluation \(1\) gives anticommuting logical \(X\) and \(Z\) operators. In cellular coordinates,

\[ H_X=[d_1],\qquad H_Z=[d_2]^{\mathsf T}, \qquad H_XH_Z^{\mathsf T}=0. \]

The encoded-qubit count is \(k=n-\operatorname{rank}H_X-\operatorname{rank}H_Z=\dim_{\mathbb F_2}H_1(D_*)\). For a closed torus it is two. The transpose notation records the chosen dual bases, not an equality of chains and cochains.

Given a measured syndrome \(s_Z\), a decoder chooses \(\widehat z\in D_1\) with \(d_1\widehat z=s_Z\). The residual error is a cycle:

\[ r=z+\widehat z\in\ker d_1, \qquad \text{successful correction}\iff[r]=0\text{ in }H_1(D_*). \]

Equal syndromes do not determine equal logical classes. A learned decoder may improve how \(\widehat z\) is chosen; the complex and its quotient determine what counts as success.

The same syndrome can leave different logical classes. The following finite planar example makes every map and boundary convention explicit.

8. A worked planar patch: boundaries, matrices, and recovery

Take a square disk \(K=[0,2]\times[0,2]\), divided into four unit-square faces. Let \(A=A_L\sqcup A_R\) be the union of its left and right sides, including their vertices and edges. These are the rough boundary arcs. The complementary top and bottom boundary arcs are smooth; their corner points belong to \(A\). We use the convention that \(Z\)-error paths may end on rough boundaries; dual-lattice \(X\)-error paths may end on smooth boundaries.

A four-face planar surface-code patch with left and right rough boundaries, top and bottom smooth boundaries, eight edge qubits, an error and recovery sharing one syndrome, and intersecting relative logical Z and dual logical X paths.
One patch, two quotients, and one encoded qubit. Geometric labels name cells of \(K\); bars denote their classes in the relative chain groups. The error \(z=\bar h_{1L}\) and proposed recovery \(\widehat z=\bar h_{1R}\) both have syndrome \(\bar v_1\). Their sum \(\ell_Z=z+\widehat z\) joins the rough arcs and represents a nonzero class in \(H_1(K,A;\mathbb F_2)\). The dashed dual path depicts a cocycle \(x\), with \(x(\ell_Z)=1\); it is an element of the dual cochain group, rather than another primal edge chain.

8.1 Fix the pair and the cellular bases

All coefficients below lie in \(\mathbb F_2\). Set \(C_n=C_n(K,A;\mathbb F_2)\), and write \(\partial_n:C_n\to C_{n-1}\) for the induced relative differential. Thus \(\bar e=e+C_1(A;\mathbb F_2)\) is a relative chain, while \([\bar e]\) is a homology class only when \(\bar e\) is a relative cycle. These are successive quotient operations.

Index rows from top to bottom by \(i=0,1,2\). The horizontal edges \(h_{iL}\), \(h_{iR}\) join the left, middle, and right columns; the middle-column vertical edges are \(m_0,m_1\). The surviving vertices are \(v_0,v_1,v_2\). The face \(f_{iL}\), respectively \(f_{iR}\), lies between rows \(i,i+1\) on the left, respectively right, for \(i=0,1\). Use the ordered bases

\[ \mathcal B_2=(\bar f_{0L},\bar f_{0R},\bar f_{1L},\bar f_{1R}), \]
\[ \mathcal B_1=(\bar h_{0L},\bar h_{0R},\bar h_{1L},\bar h_{1R},\bar h_{2L},\bar h_{2R},\bar m_0,\bar m_1), \]
\[ \mathcal B_0=(\bar v_0,\bar v_1,\bar v_2), \qquad C_2\cong\mathbb F_2^4,\quad C_1\cong\mathbb F_2^8,\quad C_0\cong\mathbb F_2^3. \]

The four vertical boundary edges and their six vertices belong to \(A\), so their relative classes vanish. There are eight data qubits, one for each edge in \(\mathcal B_1\).

8.2 Compute the boundary maps, then the checks

The relative boundary of a horizontal edge retains only its middle-column endpoint. The boundary of a face loses the edge contained in \(A\). Explicitly,

\[ \partial_1\bar h_{iL}=\partial_1\bar h_{iR}=\bar v_i, \qquad \partial_1\bar m_i=\bar v_i+\bar v_{i+1}, \]
\[ \partial_2\bar f_{iL}=\bar h_{iL}+\bar h_{i+1,L}+\bar m_i, \qquad \partial_2\bar f_{iR}=\bar h_{iR}+\bar h_{i+1,R}+\bar m_i. \]

The first formula for horizontal edges holds for \(i=0,1,2\); the formulas involving \(m_i\) or \(f_{iL/R}\) hold for \(i=0,1\). With coordinate columns in the stated bases, the complete matrices are

\[ [\partial_1]_{\mathcal B_0\leftarrow\mathcal B_1} =\begin{pmatrix} 1&1&0&0&0&0&1&0\\ 0&0&1&1&0&0&1&1\\ 0&0&0&0&1&1&0&1 \end{pmatrix}, \]
\[ [\partial_2]_{\mathcal B_1\leftarrow\mathcal B_2} =\begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 1&0&1&0\\ 0&1&0&1\\ 0&0&1&0\\ 0&0&0&1\\ 1&1&0&0\\ 0&0&1&1 \end{pmatrix}. \]

Every column of \([\partial_2]\) has zero image under \([\partial_1]\):

\[ [\partial_1][\partial_2]=0_{3\times4}, \quad \operatorname{rank}[\partial_1]=3, \quad \operatorname{rank}[\partial_2]=4. \]

Consequently \(\dim\ker\partial_1=5\), \(\dim\operatorname{im}\partial_2=4\), and \(\dim H_1(K,A;\mathbb F_2)=1\). The matrices give three independent \(X\)-checks and four independent \(Z\)-checks on eight qubits. For example, with \(X_e,Z_e\) denoting the Pauli matrices on the qubit labelled by \(e\),

\[ A_{v_1}=\Pi(\delta^0\bar v_1^\vee) =X_{h_{1L}}X_{h_{1R}}X_{m_0}X_{m_1}, \]
\[ B_{f_{0L}}=\rho(\partial_2\bar f_{0L}) =Z_{h_{0L}}Z_{h_{1L}}Z_{m_0}. \]

Thus the boundary check has three factors because its fourth edge vanishes in the relative quotient. Its support follows from the map, with no separate boundary rule added to the operator product.

8.3 The same syndrome can conceal a logical error

Suppose \(z=\bar h_{1L}\) is the actual \(Z\)-error support. A decoder might instead propose \(\widehat z=\bar h_{1R}\). The star measurements cannot distinguish them:

\[ s_Z=\partial_1z=\partial_1\widehat z=\bar v_1, \qquad [s_Z]_{\mathcal B_0}=\begin{pmatrix}0\\1\\0\end{pmatrix}. \]

Applying the proposed recovery leaves the relative cycle

\[ \ell_Z=z+\widehat z=\bar h_{1L}+\bar h_{1R}, \qquad \partial_1\ell_Z=0. \]

Its ordinary lift has one endpoint on each component of \(A\). Since \(K\) is contractible and \(A\) has two contractible components, the pair sequence reduces to

\[ 0\longrightarrow H_1(K,A;\mathbb F_2) \xrightarrow{\ \partial\ }H_0(A;\mathbb F_2) \xrightarrow{i_*}H_0(K;\mathbb F_2)\longrightarrow0. \]

Here \(H_0(A;\mathbb F_2)\cong\mathbb F_2^2\), \(i_*(a,b)=a+b\), and the connecting homomorphism sends

\[ \partial[\ell_Z]=[a_L]+[a_R]\ne0, \qquad a_L\in A_L,\quad a_R\in A_R. \]

The endpoint classes belong to \(H_0(A;\mathbb F_2)\). Exactness proves \([\ell_Z]\ne0\): the residual error has zero syndrome but changes the encoded qubit. In this equation \(\partial\) acts on homology classes; \(\partial_1\ell_Z=0\) above is a statement about the relative chain differential. The domains make the distinction explicit.

A successful recovery for the same actual error is \(\widehat z_{\mathrm{good}}=\bar h_{0L}+\bar m_0\). It has the measured syndrome, and its residual is a relative boundary:

\[ \partial_1\widehat z_{\mathrm{good}}=\bar v_1, \qquad z+\widehat z_{\mathrm{good}}=\partial_2\bar f_{0L}. \]

Thus \(\rho(z+\widehat z_{\mathrm{good}})=B_{f_{0L}}\) acts as the identity on the code space. Recovery need not retrace the actual error; its residual must lie in \(\operatorname{im}\partial_2\). The proposed one-edge recovery \(\widehat z=\bar h_{1R}\) instead leaves the nonzero logical class proved above.

8.4 Boundary deformations and the conjugate logical operator

A top-edge path \(\ell'_Z=\bar h_{0L}+\bar h_{0R}\) is another representative of the same logical class, because

\[ \ell'_Z+\ell_Z=\partial_2(\bar f_{0L}+\bar f_{0R}), \qquad [\ell'_Z]=[\ell_Z]\in H_1(K,A;\mathbb F_2). \]

Physically, \(\rho(\ell'_Z)\rho(\ell_Z)=B_{f_{0L}}B_{f_{0R}}\). Multiplying by those two plaquette checks moves the path without changing its action on the code. This is the second quotient: relative cycles modulo relative boundaries.

For the conjugate logical operator take the cochain

\[ x=\bar h_{0L}^{\vee}+\bar h_{1L}^{\vee}+\bar h_{2L}^{\vee} \in C^1(K,A;\mathbb F_2). \]

Each left face boundary crosses its support twice; each right face boundary crosses it zero times. Hence \(\delta^1x=x\circ\partial_2=0\), while

\[ x(\ell_Z)=1, \qquad \overline X:=\Pi(x),\quad \overline Z:=\rho(\ell_Z), \qquad \overline X\,\overline Z=-\overline Z\,\overline X. \]

The nonzero evaluation proves both \([x]\ne0\) in \(H^1(K,A;\mathbb F_2)\) and \([\ell_Z]\ne0\) in relative homology. The dual-lattice picture of \(x\) joins the smooth top and bottom boundaries, crossing each left horizontal edge once. It depicts the support of a functional; the algebraic object is the cocycle above. The primal rough-boundary path and the dual smooth-boundary path meet once, exactly accounting for the logical Pauli anticommutation.

This deliberately small patch encodes one qubit, with minimum nontrivial support weights \(d_Z=2\) and \(d_X=3\), hence code distance \(d=2\). The equal-weight one-edge errors \(\bar h_{1L}\) and \(\bar h_{1R}\) have the same syndrome and differ by a logical operator; this patch therefore cannot correct every single-qubit error. The example makes the role of the pair, the boundary matrices, and the evaluation pairing explicit in both successful recovery and logical failure.

References and scope

Adapted from my working notes on CSS notation and generalized plaquette/star operators. The constructions are established; this exposition emphasizes their domains, quotient maps, and physical realization. The LaTeX source for the chain and operator diagrams is also available.

  1. Allen Hatcher, Algebraic Topology, Chapters 0–3 and §4.1: quotient spaces, homotopy, cellular and relative homology, and dual constructions. See Chapter 2, pp. 115–118 for relative chains and the connecting homomorphism, and Theorem 2.35 (p. 139) for cellular homology.
  2. A. Yu. Kitaev, Fault-tolerant quantum computation by anyons, Annals of Physics 303 (2003): the toric-code realization.
  3. E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, Journal of Mathematical Physics 43 (2002): error chains, syndromes, and homological decoding.
  4. N. Delfosse, P. Iyer, and D. Poulin, Generalized surface codes and packing of logical qubits (2016): relative homology and mixed surface boundaries.
  5. E. Knill and R. Laflamme, A Theory of Quantum Error-Correcting Codes, Physical Review A 55, 900 (1997): the exact subspace-code recovery criterion.

← Back to research notes