Lattice gauge theories place matter degrees of freedom on vertices and gauge link variables on oriented edges , subject to local gauge invariance at every site. Weyl encodes gauge groups, Gauss's law projectors, high-level gauging combinators, and Wilson-loop sectors directly in its type system (weyl-types) and canonical operator algebra (weyl-canonical), allowing physicists to move seamlessly between high-level field-theoretic constructions and microscopic lattice Hamiltonians.
Discrete and Continuous Lattice Gauge Hamiltonians
In the Hamiltonian formulation of lattice gauge theory on a spatial lattice , each oriented link carries a local Hilbert space (for a compact Lie group ) or the finite group algebra (for a finite group ). Every gauge Hamiltonian splits into an electric term that penalizes link excitations and a magnetic plaquette term that penalizes curvature (flux) around elementary closed loops :
and Finite-Group Lattice Gauge Theories
For an abelian cyclic group , each link carries clock and shift operators satisfying with and . The Hamiltonian reads
where encodes edge orientation around plaquette . At (, ), this reduces to the lattice gauge theory whose deconfined fixed point ( with soft Gauss's law penalty ) is Kitaev's toric code.
For a non-abelian finite group (such as or ), the link basis supports left and right regular translations , , and diagonal group-element projectors . The magnetic plaquette projector enforces trivial holonomy around :
Kogut–Susskind Hamiltonian Draft
For continuous non-abelian gauge groups , link variables are group-valued parallel transporters with conjugate left/right electric-field generators obeying the commutation relations and . The Kogut–Susskind Hamiltonian is
where the quadratic Casimir is diagonal in the Peter–Weyl representation basis with eigenvalue .
| Theory | Link Space | Electric Term | Magnetic Term | Weyl Support |
|---|---|---|---|---|
| Toric / LGT | (qubit) | Phase 1 (weyl-canonical Pauli) | ||
| Clock LGT | (qudit<ℤ_N>) | Phase 1–2 (weyl-topo abelian ) | ||
| Finite Non-Abelian () | (qudit<G>) | / Casimir penalty | Phase 2 (weyl-topo + weyl-lean) | |
| Continuous KS | Phase 3 (Rep(G) truncated irreps) |
Gauss's Law as a Static Type Invariant
The physical Hilbert space is carved out by local Gauss's law constraints at every vertex :
in the continuous case with static background charge . A physical observable must commute with every Gauss generator, ; any operator violating this condition creates an unphysical isolated gauge charge unless paired with an appropriate matter operator or Wilson line.
In weyl-types, every operator expression carries a five-tuple type Op<Space, Charge, Herm, Grade, Support> inferred symbolically on unit-cell templates—never by constructing dense matrices. The Charge component tracks the syndrome (stabilizer violation pattern) via symplectic inner products for Pauli algebras, or via conjugacy-class and centralizer-irrep labels for general Rep(G). Declaring conserves A_v (or marking a sector A_v = +1) instructs the type checker to verify statically across all lattice translations; for perturbations on a gapped boundary , the boundary consistency rule likewise checks whether the net bulk charge of a boundary operator is absorbable by the declared condensed subgroup (for example, on a rough boundary).
Compile-Time Violation of Gauss's Law or Spectrum Preconditions
If a user declares a gauge-invariant observable or an equidistant pCUT expansion with an invalid parameter or uncompensated charge, weylc rejects the program statically before entering KIR:
error[E0412]: pCUT requires a provably equidistant unperturbed spectrum
--> toric_boundary.weyl:6:8
| given J : real number
| excitation energies of H₀ are {2 (P_i), 2J (A_v), 2J (B_p)}: J is a continuous symbol,
| so no common energy quantum exists for all J
= help: write `given J : positive integer` (assumption A3), or use epCUT (planned for Phase 2)Gauging Combinators and Normal-Form Equivalence
Following Weyl's design philosophy of freedom and elegance, high-level field-theoretic combinators (gauge, condense, dual, stack, couple) are first-class, orthogonal constructs that lower deterministically into microscopic lattice operators. You can write a gauge theory with a rough–smooth boundary using gauge ℤ₂ or by spelling out every explicitly, and verify exact equivalence via claim H = H_explicit:
model ℤ₂ gauge theory with a boundary between its two condensates
given Λ : square lattice on a cylinder (circumference L, height W)
given ∂Λ : boundary of Λ at y = 0 with dangling edges d_i
given ∂top : smooth termination of Λ at y = W
given J : positive integer
given x, κ₁, κ₂ : small parameter
define bulk ≔ gauge ℤ₂ in (J · paramagnet on vertices(Λ)) with flux energy J
define R ≔ boundary terms of bulk at ∂Λ condensing {1, e}
define S ≔ boundary terms of bulk at ∂Λ condensing {1, m}
define H₀ ≔ bulk − R
define H ≔ H₀ − x S − κ₁ Σ_i σᶻ_{d_i} − κ₂ Σ_i σᶻ_{h_i}
claim H : Hermitian, local
claim dual of (R + x S) under KW(∂Λ) = S + x R
define H_explicit ≔ − J Σ_v A_v − J Σ_p B_p − Σ_i P_i
− x Σ_i σˣ_{d_i} − κ₁ Σ_i σᶻ_{d_i} − κ₂ Σ_i σᶻ_{h_i}
claim H = H_explicit
define 𝒟 ≔ condense {1, e₁e₂} in D(ℤ₂) ⊠ D(ℤ₂)
claim 𝒟 = D(ℤ₂)When weylc checks claim H = H_explicit, both sides lower to SIR translation-orbit templates (TermTemplate), normalize in weyl-canonical into canonical Pauli word form (big-endian (site << 2) | code with phase in ), and verify that their difference is identically zero across all bulk and boundary unit-cell orbits.
$ weylc explain --expand examples/toric_gauge_combinators.weyl
[sir.expand] bulk := -J * sum_{v in vertices(Λ)} prod_{l ∋ v} σˣ_l
-J * sum_{p in plaquettes(Λ)} prod_{l ∈ ∂p} σᶻ_l
[sir.expand] R := sum_{i in cells(∂Λ)} σᶻ_{d_i} σᶻ_{h_i} σᶻ_{d_{i+1}}
[sir.expand] S := sum_{i in cells(∂Λ)} σˣ_{d_i}
[claim] H = H_explicit ... OK (Exact, Pauli normal form)
[claim] dual of (R + x S) under KW(∂Λ) = S + x R ... OK (Exact, boundary self-dual at x = 1)
[claim] 𝒟 = D(ℤ₂) ... OK (Exact, weyl-topo modular data)Formatting Preserves Authorial Intent
weylc fmt only normalizes whitespace and Unicode notation—it never expands high-level combinators or rewrites expressions into canonical normal form. Normalization occurs solely inside the compiler kernel for verification and derivation.
Wilson Loops, Polyakov Loops, and Confinement
Gauge-invariant non-local order parameters diagnose phases of lattice gauge theories. For a closed spatial contour , the spatial Wilson loop is (in , , paired with the dual magnetic loop ). In pure gauge theory without dynamical matter, the expectation value distinguishes the two regimes directly: in the confined phase () it follows an area law , indicating a linear quark–antiquark potential with non-zero string tension , whereas in the deconfined phase () it obeys a perimeter law , signaling topological order for discrete or a massless photon for continuous in .
At finite temperature , the Polyakov loop—a Wilson loop wrapping the Euclidean time direction—plays the complementary role:
It measures the free energy of an isolated static quark and serves as the order parameter for center symmetry breaking across the confinement–deconfinement transition.
Cylinder Sector Constraints in Weyl
On a rough–smooth cylinder of circumference and height (as in examples/toric_boundary.weyl), the lower and upper -Wilson loops and obey exact operator identities:
In the bulk sector, coincides with the boundary -anyon parity! Consequently, the vacuum lies in , while a single boundary excitation lies in . Computing the one-particle dispersion via exact diagonalization (ED) must subtract energies across these two distinct Wilson-loop sectors:
compare H_eff through total order 10 with exact diagonalization on L = 12, W = 2
by vacuum sector (k = 0, W_e^top = +1)
and one-particle sector (k, W_e^top = −1)
using double-double arithmetic, residual protocol of section 6.7Why Sector Specification Prevents False Oracles
Within the same sector, the lowest excited state is a two-particle -pair state rather than a single-particle excitation. Because weyl-oracle independently constructs Clifford/stabilizer bases on the qubit cylinder, fixing the 48 conserved deep stars and bulk plaquettes and tagging both (k, W_e^top) sectors guarantees an unambiguous one-particle gap comparison.
Kramers–Wannier Duality and Boundary Phase Transitions
Gauging a global symmetry implements the Kramers–Wannier (KW) duality between a transverse-field Ising model and its dual gauge theory (or between rough and smooth boundary condensates). On the lower boundary of the toric code, the boundary operators and satisfy the exact Ising algebra , in the bulk sector. Under the boundary Kramers–Wannier map :
which immediately implies dual of (R + x S) under KW(∂Λ) = S + x R. At , the boundary condenses (rough boundary); as (with ), projecting onto yields the condensate (smooth boundary). By self-duality, the continuous boundary phase transition sits strictly at in the Ising universality class (). Turning on bulk-coupling perturbations breaks exact boundary self-duality via virtual bulk -anyon fluctuations of energy and , shifting starting at order and —precisely the Stage B pCUT target verified by Weyl's multi-sector ED oracle.
Stabilizer Coordinates and KIR Compilation
To evaluate high-order perturbation theory or multi-sector ED on lattice gauge models without exponentially large dense matrices, weyl-topo and weyl-canonical apply a symplectic Gram–Schmidt coordinate transformation to the independent stabilizers of . Completing the basis with destabilizers (, , ) and commuting logical pairs puts every Pauli string into a unique factorized form:
Rather than expanding projectors in SIR, each perturbation term stores only its flip mask and dynamically evaluates the quasiparticle change during KIR Apply:
| Perturbation Term | Flipped Stabilizers | Energy Cost () | Allowed Channels () |
|---|---|---|---|
In weyl-cas, the KIR term stream packs coefficients over 63-bit primes alongside big-endian canonical monomials and parameter exponents in a flat 8-byte-aligned record:
#[repr(C, align(8))]
pub struct TermHeader {
pub len: u32,
pub mono_len: u16,
pub flags: u16, // encodes imaginary-unit parity (i^0 vs i^1); sign folds into Fp
}
// Record layout: [TermHeader][coeff: [u64; K]][mono: mono_len bytes][pad to 8]Because weyl-types enforces that all bulk stars at and all bulk plaquettes commute with , virtual -anyons remain confined to the boundary row. Consequently, both Stage A () and Stage B () reduce to quasi-1D linked-cluster expansions where order requires clusters of length at most , making 10th–15th order exact rational reconstruction feasible on a single workstation.