2.3.3 Toric Code#

Prompts

  • What is the toric code, and how is it defined on a lattice?

  • How do bosons and fermions emerge as composite excitations of qubits in the toric code?

  • How does the charge-flux picture explain the emergent statistics?

  • Why is the toric code important for quantum error correction?

Lecture Notes#

Overview#

The toric code demonstrates the most remarkable consequence of 2D topology: particles can emerge from qubits. Starting from a lattice of spin-1/2 qubits with local interactions, the model produces two types of anyonic excitations — charges (\(e\)) and fluxes (\(m\)) — whose composite \(\varepsilon = e \times m\) is a fermion, even though the microscopic ingredients are purely bosonic. This lesson connects the emergent anyon statistics back to the charge-flux composite picture of §2.3.1 and ends with the toric code as a topological quantum error-correcting code.

From Qubits to Particles#

One of the most remarkable facts in modern physics is that particles can emerge from qubits. The toric code, introduced by Alexei Kitaev in 2003, is the simplest exactly solvable model demonstrating this. Starting from a lattice of spin-1/2 qubits with purely local interactions, the model produces emergent excitations that behave as anyons — including objects that are effectively bosons and fermions, even though the microscopic degrees of freedom are just qubits on lattice edges.

Toric Code Model#

Place a qubit on every edge of a square lattice on a torus. The model is built from two local operators: one associated with each vertex and one with each plaquette.

Toric Code Hamiltonian

\[ \hat{H} = -\sum_v \hat{A}_v - \sum_p \hat{B}_p \]
  • \(\hat{A}_v\) (star term): multiplies \(\hat{X}\) on the four edges touching vertex \(v\).

\[ \hat{A}_v = \prod_{e \ni v} \hat{X}_e \]
  • \(\hat{B}_p\) (plaquette term): multiplies \(\hat{Z}\) on the four edges around plaquette \(p\).

\[ \hat{B}_p = \prod_{e \in p} \hat{Z}_e \]

All terms in the Hamiltonian commute: \([\hat{A}_v, \hat{A}_{v'}] = [\hat{B}_p, \hat{B}_{p'}] = [\hat{A}_v, \hat{B}_p] = 0\). Hence the ground state is the simultaneous \(+1\) eigenspace of all stars and plaquettes: \(A_v = +1\), \(B_p = +1\) for every \(v,p\).

Two Types of Excitations#

Excitations are created by violating either the star or plaquette constraint:

Charges and Fluxes

Excitation

Violated constraint

Created by

Name

Charge (\(e\))

\(A_v = -1\) at vertex \(v\)

\(Z\)-string

Electric charge

Flux (\(m\))

\(B_p = -1\) at plaquette \(p\)

\(X\)-string

Magnetic flux

  • Charges are created in pairs at the endpoints of a \({Z}\)-string

  • Fluxes are created in pairs at the endpoints of a \({X}\)-string

The key to understanding the statistics is the anticommutation between crossing strings. A \({Z}\)-string (creating \(e\) charges) and an \({X}\)-loop (detecting \(m\) fluxes) share exactly one edge when they cross, and on that edge \(\hat{X}\hat{Z} = -\hat{Z}\hat{X}\). Therefore:

String Anticommutation

If an open \({Z}\)-string \(\hat{S}_e\) crosses a closed \({X}\)-loop \(\hat{L}_m\) at a single edge:

(58)#\[\hat{S}_e \, \hat{L}_m = -\hat{L}_m \, \hat{S}_e\]

Moving an \(e\) charge around an \(m\) flux picks up a phase of \(-1\): this is the Aharonov-Bohm phase of a unit charge (\(q = 1\)) encircling a \(\pi\)-flux (\(\Phi/\hbar = \pi\)):

\[\mathrm{e}^{\mathrm{i}\, q\, \Phi/\hbar} = \mathrm{e}^{\mathrm{i}\pi} = -1\]

This identifies \(e\) as a unit charge (\(q = 1, \Phi/\hbar = 0\)) and \(m\) as a \(\pi\)-flux (\(q = 0, \Phi/\hbar = \pi\)), connecting the toric code to the charge-flux composite picture of §2.3.1.

Anyon Sectors and Statistics#

The toric code has four anyon sectors: the vacuum \(1\), charge \(e\), flux \(m\), and the composite \(\varepsilon = e \times m\). All their statistics follow from a single fact: the string anticommutation (58).

Self-statistics (exchange phase \(\theta_{\mathrm{ex}}\)):

  • \(e\) is a boson. Exchanging two \(e\) particles involves two \(\hat{Z}\)-strings. Since \(\hat{Z}\)-operators commute with each other, no phase is acquired: \(\theta_{\mathrm{ex}}(e) = 0\).

  • \(m\) is a boson. Exchanging two \(m\) particles involves two \(\hat{X}\)-strings. Since \(\hat{X}\)-operators commute with each other: \(\theta_{\mathrm{ex}}(m) = 0\).

  • \(\varepsilon = e \times m\) is a fermion. Consider the topological spin of \(\varepsilon\): rotating a single \(\varepsilon\) particle by \(2\pi\) is equivalent to moving its \(m\)-component in a full loop around its \(e\)-component. This loop threads an \(\hat{X}\)-string around a \(\hat{Z}\)-string, and they must cross once, giving a phase of \(-1\) by (58). Therefore the spin phase is \(\theta_{\varepsilon} = \pi\). By the spin-statistics relation (\(\theta_{\mathrm{ex}} = \theta_{\varepsilon}\)), \(\varepsilon\) is a fermion.

Mutual braiding (phase \(\theta_{\mathrm{br}}\) for a full loop):

Taking an \(e\) charge around an \(m\) flux means threading a \(\hat{Z}\)-string through an \(\hat{X}\)-loop. By (58), each crossing gives \(-1\).

Anyon Statistics Summary

Self-statistics (exchange phase):

Sector

\(\theta_{\mathrm{ex}}\)

Type

\(1\) (vacuum)

\(0\)

trivial

\(e\) (charge)

\(0\)

boson

\(m\) (flux)

\(0\)

boson

\(\varepsilon = e \times m\)

\(\pi\)

fermion

Mutual braiding statistics (\(\theta_{\mathrm{br}}\) for a full loop):

\(\theta_{\mathrm{br}}\)

\(1\)

\(e\)

\(m\)

\(\varepsilon\)

\(1\)

\(0\)

\(0\)

\(0\)

\(0\)

\(e\)

\(0\)

\(0\)

\(\pi\)

\(\pi\)

\(m\)

\(0\)

\(\pi\)

\(0\)

\(\pi\)

\(\varepsilon\)

\(0\)

\(\pi\)

\(\pi\)

\(0\)

All entries follow from the \(e\)-\(m\) braiding phase \(\theta_{\mathrm{br}}(e,m) = \pi\) and the composition \(\varepsilon = e \times m\). For example, braiding \(\varepsilon\) around \(e\) picks up the \(m\)-component’s phase (\(\pi\)), and braiding two \(\varepsilon\) particles gives \(\pi + \pi = 2\pi \equiv 0\).

The remarkable conclusion: fermions are not fundamental in the toric code. They emerge as composite objects from a system of qubits that has no fermions in its microscopic description.

Quantum Error Correction#

Toric Code as a Quantum Error-Correcting Code

The toric code is not just a physics toy model — it is one of the most important quantum error-correcting codes:

  • Logical qubits are encoded in the degenerate ground-state space (4-fold degenerate on a torus)

  • Errors (bit flips \(\hat{X}\) or phase flips \(\hat{Z}\)) create pairs of excitations

  • Error detection: measure all \(\hat{A}_v\) and \(\hat{B}_p\) to locate excitation pairs

  • Error correction: connect the excitation pairs with minimal strings to annihilate them

  • Topological protection: a logical error requires a string of errors spanning the entire torus — exponentially unlikely for small error rates

The toric code demonstrates the principle of topological quantum error correction: information is stored nonlocally in the topology of the ground state, making it immune to any local perturbation. This is the foundation of modern approaches to building fault-tolerant quantum computers using surface codes (the planar version of the toric code).

Summary#

  • The toric code places qubits on edges of a square lattice with star operators \(\hat{A}_v = \prod \hat{X}_e\) and plaquette operators \(\hat{B}_p = \prod \hat{Z}_e\).

  • Excitations come in two types: charges \(e\) (\(A_v = -1\), created by \(\hat{Z}\)-strings) and fluxes \(m\) (\(B_p = -1\), created by \(\hat{X}\)-strings).

  • The \(\hat{Z}\)-string and \(\hat{X}\)-loop anticommute when they cross ((58)), giving an \(e\)-\(m\) braiding phase of \(\pi\): this identifies \(e\) as unit charge and \(m\) as \(\pi\)-flux.

  • The composite \(\varepsilon = e \times m\) is a fermion — fermionic statistics emerges from bosonic qubits.

  • The four anyon sectors \(\{1, e, m, \varepsilon\}\) form a \(\mathbb{Z}_2 \times \mathbb{Z}_2\) fusion algebra; all mutual statistics follow from the charge-flux composite picture.

  • The toric code is a topological quantum error-correcting code: logical errors require system-spanning strings, providing exponential protection.

Homework#

1. In the toric code, qubits live on edges of a square lattice. For a lattice with \(L \times L\) plaquettes on a torus, how many qubits are there? How many star operators \(\hat{A}_v\) and plaquette operators \(\hat{B}_p\) are there?

2. Verify that \([\hat{A}_v, \hat{B}_p] = 0\) for any vertex \(v\) and plaquette \(p\). (Hint: a vertex and a plaquette either share 0 or 2 edges. What happens when two \(\hat{X}\) and two \(\hat{Z}\) operators act on the same qubits?)

3. A charge excitation (\(A_v = -1\)) is created by applying a \(\hat{Z}\)-string. Explain why charges are always created in pairs. What happens to the string connecting them — is it physically observable?

4. Verify the string anticommutation (58): if a \(\hat{Z}\)-string and an \(\hat{X}\)-loop cross at exactly one edge, show that \(\hat{S}_e \hat{L}_m = -\hat{L}_m \hat{S}_e\) using \(\hat{X}\hat{Z} = -\hat{Z}\hat{X}\).

5. Using the charge-flux composite picture with \(q_e = 1\), \(\Phi_m/\hbar = \pi\): compute the braiding phase \(\theta_{\mathrm{br}}\) and exchange phase \(\theta_{\mathrm{ex}}\) for (a) \(e\) around \(e\), (b) \(e\) around \(m\), (c) \(\varepsilon\) around \(\varepsilon\). Verify your answers against the mutual statistics table.

6. Explain in one or two sentences why the composite \(\varepsilon = e \times m\) has fermionic self-statistics (\(\theta_{\mathrm{ex}} = \pi\)), even though both \(e\) and \(m\) are individually bosons.

7. The toric code on a torus has a 4-fold degenerate ground state. A logical error requires a string of single-qubit errors that wraps around the torus. If the torus has linear size \(L\) and each qubit has independent error probability \(p\), argue qualitatively that the logical error rate scales as \(p^L\).

8. True or false (explain briefly): (a) The toric code Hamiltonian contains fermion operators. (b) The fermion \(\varepsilon\) in the toric code is a fundamental particle. (c) The surface code used in Google’s quantum error correction experiments is a version of the toric code. (d) Topological protection means errors are literally impossible.