ToricCode — Kitaev 2003 Z₂ Surface Code
ToricCode is the canonical topological-order benchmark model: Kitaev's (2003) Z₂ surface code on the square lattice. All physical observables exposed here are closed-form / purely topological — no numerical solver is involved.
Hamiltonian
S = 1/2 on every edge of a square lattice. For each vertex v and each plaquette p define the stabilizer operators
A_v = ∏_{i ∈ star(v)} σˣ_i (vertex / "electric" stabilizer, 4-body)
B_p = ∏_{i ∈ ∂p} σᶻ_i (plaquette / "magnetic" stabilizer, 4-body)H = − J_e Σ_v A_v − J_m Σ_p B_p, J_e, J_m ≥ 0.Each pair of stabilizers shares 0 or 2 edges, hence anti-commutes by an even number of factors and so commutes. The full set {A_v} ∪ {B_p} is mutually commuting, and H is exactly diagonal in their joint eigenbasis. The ground state has every A_v = +1 and every B_p = +1.
Closed-Form Quantities
| Quantity | Value | Boundary | Reference |
|---|---|---|---|
GroundStateEnergyDensity | −(J_e + J_m) | Infinite | Kitaev 2003 |
MassGap | 2·min(J_e, J_m) | Infinite | Kitaev 2003 |
GroundStateDegeneracy (genus g) | 4^g | PBC | Kitaev 2003 §5 |
TopologicalEntanglementEntropy | log 2 | Infinite | Kitaev–Preskill 2006 / Levin–Wen 2006 |
AnyonStatistics(:em) mutual phase | π | (any) | Kitaev 2003 |
Anyon Content
Four Abelian anyons with quantum dimension d_a = 1:
| Label | Origin | Self-statistics | Notes |
|---|---|---|---|
1 | vacuum | boson (0) | identity sector |
e | vertex defect A_v = −1 | boson (0) | "electric" charge |
m | plaquette defect B_p = −1 | boson (0) | "magnetic" flux |
ε | e × m | fermion (π) | bound state, statistics from mutual braid |
Fusion rules: e×e = m×m = ε×ε = 1, e×m = ε. The mutual phase from braiding e once fully around m is π (Z₂ mutual semion); this phase is responsible for the ε self-statistics.
Total quantum dimension 𝒟 = √(Σ_a d_a²) = √4 = 2, matching the Kitaev–Preskill / Levin–Wen extraction γ = log 𝒟 = log 2.
Code Examples
using QAtlas
# Default isotropic point
m = ToricCode() # J_e = J_m = 1
QAtlas.fetch(m, GroundStateEnergyDensity(), Infinite()) # -2.0
QAtlas.fetch(m, MassGap(), Infinite()) # 2.0
QAtlas.fetch(m, GroundStateDegeneracy(), PBC(0)) # 4 (torus)
QAtlas.fetch(m, GroundStateDegeneracy(), PBC(0); genus=2) # 16
QAtlas.fetch(m, TopologicalEntanglementEntropy(), Infinite()) # log 2
# Anisotropic
m2 = ToricCode(J_e=2.0, J_m=0.5)
QAtlas.fetch(m2, GroundStateEnergyDensity(), Infinite()) # -2.5
QAtlas.fetch(m2, MassGap(), Infinite()) # 1.0 (= 2·0.5)
# Anyon table
QAtlas.fetch(m, AnyonStatistics()) # default :em
QAtlas.fetch(m, AnyonStatistics(); type=:e) # NamedTuple for e
QAtlas.fetch(m, AnyonStatistics(); type=:ε) # NamedTuple for εDistinction from KitaevHoneycomb
The KitaevHoneycomb model (Kitaev 2006, Annals 321) shares an author and a topological-order theme but is otherwise a different physical system:
ToricCode (this page) | KitaevHoneycomb | |
|---|---|---|
| Reference | Kitaev 2003, Annals 303 | Kitaev 2006, Annals 321 |
| Lattice | square (qubits on edges) | honeycomb (qubits on sites) |
| Hamiltonian | 4-body stabilizers (σˣˣˣˣ, σᶻᶻᶻᶻ) | bond-anisotropic 2-body (σˣσˣ, σʸσʸ, σᶻσᶻ) |
| Solution | exact stabilizer code | four-Majorana mapping + Z₂ gauge fields |
| Anyons | Abelian Z₂ (1, e, m, ε) | Abelian (A-phases) / non-Abelian Ising (B + B-field) |
References
- A. Yu. Kitaev, "Fault-tolerant quantum computation by anyons", Annals Phys. 303, 2 (2003).
- A. Kitaev, J. Preskill, "Topological entanglement entropy", Phys. Rev. Lett. 96, 110404 (2006).
- M. Levin, X.-G. Wen, "Detecting topological order in a ground state wave function", Phys. Rev. Lett. 96, 110405 (2006).
- C. Nayak, S. H. Simon, A. Stern, M. Freedman, S. Das Sarma, "Non-Abelian anyons and topological quantum computation", Rev. Mod. Phys. 80, 1083 (2008).
<!– ATLAS:HUBS:START – auto-generated by docs/atlas/generate.jl. Do not edit by hand; edits between these markers are overwritten on next regen. –>
Verified hubs
In the Verified Atlas, this model registers 5 hubs (quantity / BC pair). The badge column shows the R1 assurance level; click a hub link to see the exact verify(...) calls, references, and corroboration mechanism.
| Quantity | BC | Assurance | Cards |
|---|---|---|---|
AnyonStatistics | Infinite | ⚪ cited-only | 0 |
GroundStateDegeneracy | PBC | 🟢 corroborated-at-p | 6 |
GroundStateEnergyDensity | Infinite | 🟢 corroborated-at-p | 1 |
MassGap | Infinite | 🟢 corroborated-at-p | 1 |
TopologicalEntanglementEntropy | Infinite | 🟢 corroborated-at-p | 1 |
<!– ATLAS:HUBS:END –>
<!– ATLAS:DOCS:START – auto-generated by docs/atlas/generate.jl. Do not edit by hand; edits between these markers are overwritten on next regen. –>
API
Every fetch(::Model, …) method registered for this model — together with the model struct(s) and exported helpers — generated directly from the source (in lock-step with @register):
QAtlas.ToricCode — Type
ToricCode(; J_e::Real = 1.0, J_m::Real = 1.0) <: AbstractQAtlasModelKitaev (2003) toric code: the square-lattice Z₂ surface code with vertex ("electric") coupling J_e and plaquette ("magnetic") coupling J_m,
H = − J_e Σ_v A_v − J_m Σ_p B_p,where A_v = ∏_{i ∈ star(v)} σˣ_i and B_p = ∏_{i ∈ ∂p} σᶻ_i. All stabilizers commute, so the model is exactly solvable. See module header for the full closed-form result list and the distinction from KitaevHoneycomb.
QAtlas.fetch — Method
fetch(::ToricCode, ::AnyonStatistics; type::Symbol) -> NamedTupleTopological data of one of the four toric-code anyons or the e/m mutual braiding. The returned NamedTuple shape depends on type:
type | NamedTuple fields |
|---|---|
:e | (label = :e, statistics = :boson, self_phase = 0.0, quantum_dim = 1.0, fusion = (:e, :e) => :1) |
:m | (label = :m, statistics = :boson, self_phase = 0.0, quantum_dim = 1.0, fusion = (:m, :m) => :1) |
:ε | (label = :ε, statistics = :fermion, self_phase = π, quantum_dim = 1.0, fusion = (:ε, :ε) => :1) |
:em_braiding | (label = :em_braiding, mutual_phase = π, anyons = (:e, :m)) |
Bosons have self-statistics phase 0; the bound state ε = e × m acquires the relative phase π from the mutual e/m braid, making it a fermion. The e/m mutual phase is π (Z₂ "mutual semion") — a full braid of one around the other multiplies the wave function by exp(iπ) = −1. All quantum dimensions are 1 (Abelian theory).
Aliases: type = :epsilon is accepted as a synonym of :ε.
Throws an ErrorException for any other type.
QAtlas.fetch — Method
fetch(::ToricCode, ::GroundStateDegeneracy, ::PBC; genus::Int = 1) -> IntGround-state degeneracy on a closed orientable surface of genus g,
GSD(g) = 4^g.This is the dimension of H¹(Σ_g; Z₂) ⊗ H¹(Σ_g; Z₂) (logical Pauli-X and Pauli-Z operators, one independent pair per non-contractible cycle). The torus (g = 1) gives the canonical 4-fold degeneracy. The result is purely topological — it depends only on genus, not on J_e, J_m or the lattice size.
PBC is the appropriate boundary tag because GSD is meaningful only on a closed surface; on OBC / a disk the model has a unique ground state (no homologically non-trivial loops), so the OBC method is intentionally not registered.
QAtlas.fetch — Method
fetch(::ToricCode, ::GroundStateEnergyDensity, ::Infinite) -> Float64Ground-state energy density ε₀ = −(J_e + J_m).
Closed-form: every stabilizer commutes with every other, so the ground state simultaneously saturates A_v = +1 ∀v and B_p = +1 ∀p. The energy contribution per (vertex + plaquette) unit cell is −J_e − J_m.
QAtlas.fetch — Method
fetch(::ToricCode, ::MassGap, ::Infinite) -> Float64Single-anyon excitation gap Δ = 2·min(J_e, J_m).
Flipping a single vertex stabilizer eigenvalue (creating an e charge) costs 2 J_e; flipping a single plaquette (creating an m flux) costs 2 J_m. The minimum-energy excitation is therefore 2·min(J_e, J_m) — the gap of the cheaper anyon species.
QAtlas.fetch — Method
fetch(::ToricCode, ::TopologicalEntanglementEntropy, ::Infinite) -> Float64Topological entanglement entropy γ = log 2.
For the Z₂ topological order realised by the toric code, the total quantum dimension is 𝒟 = √(Σ_a d_a²) = √(1² + 1² + 1² + 1²) = 2 (four Abelian anyons {1, e, m, ε}, each with d_a = 1). The Kitaev–Preskill (2006) / Levin–Wen (2006) prescription extracts γ = log 𝒟 = log 2 from the constant offset of the bipartite entanglement entropy on a simply-connected region,
S(ρ_A) = α |∂A| − γ + O(|∂A|⁻¹).Independent of J_e, J_m (purely topological).
Example
julia> QAtlas.fetch(ToricCode(), TopologicalEntanglementEntropy(), Infinite())
0.6931471805599453<!– ATLAS:DOCS:END –>