Skip to content
High Energy & Field Theory · Gauge Theory

Gauge Theory & Lattice Models

Formulate discrete and continuous lattice gauge theories in Weyl, enforce Gauss's law as static type invariants, prove normal-form equivalence, and analyze Wilson loops and Kramers–Wannier duality.

Lattice gauge theories place matter degrees of freedom on vertices v∈V(Λ)v \in V(\Lambda) and gauge link variables on oriented edges ℓ∈E(Λ)\ell \in E(\Lambda), 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 Λ\Lambda, each oriented link ℓ=(v,v′)\ell = (v, v') carries a local Hilbert space Hℓ=L2(G)\mathcal{H}_\ell = L^2(G) (for a compact Lie group GG) or the finite group algebra C[G]\mathbb{C}[G] (for a finite group GG). 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 p∈P(Λ)p \in P(\Lambda):

ZN\mathbb{Z}_N and Finite-Group Lattice Gauge Theories ​

For an abelian cyclic group ZN\mathbb{Z}_N, each link carries clock and shift operators Zℓ,XℓZ_\ell, X_\ell satisfying ZℓXℓ=ωXℓZℓZ_\ell X_\ell = \omega X_\ell Z_\ell with ω=e2πi/N\omega = e^{2\pi i / N} and ZℓN=XℓN=1Z_\ell^N = X_\ell^N = \mathbb{1}. The Hamiltonian reads

HZN=−g22∑ℓ∈E(Λ)(Xℓ+Xℓ†)−12g2∑p∈P(Λ)(Bp+Bp†),Bp=∏ℓ∈∂pZℓϵ(ℓ,p),H_{\mathbb{Z}_N} = -\frac{g^2}{2}\sum_{\ell \in E(\Lambda)} \left(X_\ell + X_\ell^\dagger\right) - \frac{1}{2g^2}\sum_{p \in P(\Lambda)} \left(B_p + B_p^\dagger\right), \qquad B_p = \prod_{\ell \in \partial p} Z_\ell^{\epsilon(\ell,p)},

where ϵ(ℓ,p)=±1\epsilon(\ell,p) = \pm 1 encodes edge orientation around plaquette pp. At N=2N=2 (Xℓ=σℓxX_\ell = \sigma^x_\ell, Zℓ=σℓzZ_\ell = \sigma^z_\ell), this reduces to the Z2\mathbb{Z}_2 lattice gauge theory whose deconfined fixed point (g→0g \to 0 with soft Gauss's law penalty −J∑vAv-J\sum_v A_v) is Kitaev's toric code.

For a non-abelian finite group GG (such as S3S_3 or D4D_4), the link basis {∣g⟩ℓ:g∈G}\{|g\rangle_\ell : g \in G\} supports left and right regular translations L+g∣h⟩=∣gh⟩L_+^g |h\rangle = |gh\rangle, L−g∣h⟩=∣hg−1⟩L_-^g |h\rangle = |hg^{-1}\rangle, and diagonal group-element projectors Th∣g⟩=δg,h∣g⟩T^h |g\rangle = \delta_{g,h}|g\rangle. The magnetic plaquette projector enforces trivial holonomy around ∂p\partial p:

Bp=∑g1g2g3−1g4−1=1Tℓ1g1Tℓ2g2Tℓ3g3Tℓ4g4,Av=1∣G∣∑g∈G(∏ℓ out of vL+,ℓg)(∏ℓ into vL−,ℓg).B_p = \sum_{g_1 g_2 g_3^{-1} g_4^{-1} = 1} T^{g_1}_{\ell_1} T^{g_2}_{\ell_2} T^{g_3}_{\ell_3} T^{g_4}_{\ell_4}, \qquad A_v = \frac{1}{|G|}\sum_{g \in G} \left(\prod_{\ell \text{ out of } v} L^g_{+,\ell}\right)\left(\prod_{\ell \text{ into } v} L^g_{-,\ell}\right).

SU(N)SU(N) Kogut–Susskind Hamiltonian Draft ​

For continuous non-abelian gauge groups G=SU(N)G = SU(N), link variables are group-valued parallel transporters Uℓ∈SU(N)U_\ell \in SU(N) with conjugate left/right electric-field generators EL,ℓa,ER,ℓaE^a_{L,\ell}, E^a_{R,\ell} obeying the su(N)\mathfrak{su}(N) commutation relations [EL,ℓa,Uℓ′]=−δℓℓ′TaUℓ[E^a_{L,\ell}, U_{\ell'}] = -\delta_{\ell\ell'} T^a U_\ell and [ER,ℓa,Uℓ′]=δℓℓ′UℓTa[E^a_{R,\ell}, U_{\ell'}] = \delta_{\ell\ell'} U_\ell T^a. The Kogut–Susskind Hamiltonian is

HKS=g22ad−2∑ℓ∈E(Λ)∑a=1N2−1(Eℓa)2−12g2a4−d∑p∈P(Λ)(Tr⁡Up+Tr⁡Up†),Up=Uℓ1Uℓ2Uℓ3†Uℓ4†,H_{\mathrm{KS}} = \frac{g^2}{2a^{d-2}} \sum_{\ell \in E(\Lambda)} \sum_{a=1}^{N^2-1} \left(E^a_\ell\right)^2 - \frac{1}{2g^2 a^{4-d}} \sum_{p \in P(\Lambda)} \left(\operatorname{Tr} U_p + \operatorname{Tr} U_p^\dagger\right), \qquad U_p = U_{\ell_1} U_{\ell_2} U_{\ell_3}^\dagger U_{\ell_4}^\dagger,

where the quadratic Casimir ∑a(Eℓa)2\sum_a (E^a_\ell)^2 is diagonal in the Peter–Weyl representation basis ∣R,mL,mR⟩ℓ|R, m_L, m_R\rangle_\ell with eigenvalue C2(R)C_2(R).

TheoryLink Space Hℓ\mathcal{H}_\ellElectric TermMagnetic TermWeyl Support
Z2\mathbb{Z}_2 Toric / LGTC2\mathbb{C}^2 (qubit)−h∑ℓσℓx-h\sum_\ell \sigma^x_\ell−J∑p∏ℓ∈∂pσℓz-J\sum_p \prod_{\ell\in\partial p}\sigma^z_\ellPhase 1 (weyl-canonical Pauli)
ZN\mathbb{Z}_N Clock LGTCN\mathbb{C}^N (qudit<ℤ_N>)−g22∑ℓ(Xℓ+h.c.)-\frac{g^2}{2}\sum_\ell (X_\ell + \text{h.c.})−12g2∑p(Bp+h.c.)-\frac{1}{2g^2}\sum_p (B_p + \text{h.c.})Phase 1–2 (weyl-topo abelian D(G)D(G))
Finite Non-Abelian (S3,D4S_3, D_4)C[G]\mathbb{C}[G] (qudit<G>)−∑vAv-\sum_v A_v / Casimir penalty−∑pBp-\sum_p B_pPhase 2 (weyl-topo + weyl-lean)
Continuous SU(N)SU(N) KS⨁RVR⊗VR∗\bigoplus_R V_R \otimes V_R^*g22∑ℓC2(Rℓ)\frac{g^2}{2}\sum_\ell C_2(R_\ell)−12g2∑p(Tr⁡Up+h.c.)-\frac{1}{2g^2}\sum_p (\operatorname{Tr} U_p + \text{h.c.})Phase 3 (Rep(G) truncated irreps)

Gauss's Law as a Static Type Invariant ​

The physical Hilbert space Hphys⊂⨂ℓHℓ\mathcal{H}_{\mathrm{phys}} \subset \bigotimes_\ell \mathcal{H}_\ell is carved out by local Gauss's law constraints at every vertex vv:

Gvg∣ψ⟩=∣ψ⟩(∀g∈G,  ∀v∈V(Λ)),or(∑ℓ out of vEL,ℓa−∑ℓ into vER,ℓa−Qva)∣ψ⟩=0G_v^g |\psi\rangle = |\psi\rangle \quad (\forall g \in G, \; \forall v \in V(\Lambda)), \qquad \text{or} \qquad \left(\sum_{\ell \text{ out of } v} E^a_{L,\ell} - \sum_{\ell \text{ into } v} E^a_{R,\ell} - Q^a_v\right)|\psi\rangle = 0

in the continuous case with static background charge QvaQ^a_v. A physical observable O\mathcal{O} must commute with every Gauss generator, [Gvg,O]=0[G_v^g, \mathcal{O}] = 0; 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 [Av,O]=0[A_v, \mathcal{O}] = 0 statically across all lattice translations; for perturbations on a gapped boundary ∂Λ\partial\Lambda, the boundary consistency rule likewise checks whether the net bulk charge of a boundary operator is absorbable by the declared condensed subgroup (for example, {1,e}\{1, e\} 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:

text
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 Z2\mathbb{Z}_2 gauge theory with a rough–smooth boundary using gauge ℤ₂ or by spelling out every Av,Bp,PiA_v, B_p, P_i explicitly, and verify exact equivalence via claim H = H_explicit:

weyl
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 Z4\mathbb{Z}_4), and verify that their difference is identically zero across all bulk and boundary unit-cell orbits.

bash
$ 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 CC, the spatial Wilson loop is WR(C)=Tr⁡R∏ℓ∈CUℓW_R(C) = \operatorname{Tr}_R \prod_{\ell \in C} U_\ell (in Z2\mathbb{Z}_2, We(C)=∏ℓ∈CσℓzW_e(C) = \prod_{\ell \in C} \sigma^z_\ell, paired with the dual magnetic loop Wm(C~)=∏ℓ⊥C~σℓxW_m(\tilde{C}) = \prod_{\ell \perp \tilde{C}} \sigma^x_\ell). In pure gauge theory without dynamical matter, the expectation value distinguishes the two regimes directly: in the confined phase (g≫1g \gg 1) it follows an area law ⟨WR(C)⟩∼exp⁡(−σ Area(C))\langle W_R(C) \rangle \sim \exp(-\sigma\,\mathrm{Area}(C)), indicating a linear quark–antiquark potential V(r)=σrV(r) = \sigma r with non-zero string tension σ>0\sigma > 0, whereas in the deconfined phase (g≪1g \ll 1) it obeys a perimeter law ⟨WR(C)⟩∼exp⁡(−μ Perimeter(C))\langle W_R(C) \rangle \sim \exp(-\mu\,\mathrm{Perimeter}(C)), signaling topological order for discrete GG or a massless photon for continuous U(1)U(1) in d≥3d \ge 3.

At finite temperature T=1/βT = 1/\beta, the Polyakov loop—a Wilson loop wrapping the Euclidean time direction—plays the complementary role:

P(x)=Tr⁡ ⁣(∏τ=0Nτ−1U(x,τ),0^),⟨P(x)⟩∝e−βFq.P(\mathbf{x}) = \operatorname{Tr}\!\left(\prod_{\tau=0}^{N_\tau - 1} U_{(\mathbf{x},\tau),\hat{0}}\right), \qquad \langle P(\mathbf{x}) \rangle \propto e^{-\beta F_q}.

It measures the free energy FqF_q of an isolated static quark and serves as the order parameter for center symmetry ZN⊂SU(N)\mathbb{Z}_N \subset SU(N) breaking across the confinement–deconfinement transition.

Cylinder Sector Constraints in Weyl ​

On a rough–smooth cylinder of circumference LL and height WW (as in examples/toric_boundary.weyl), the lower and upper ee-Wilson loops Webot=∏iσhi,0zW_e^{\text{bot}} = \prod_i \sigma^z_{h_{i,0}} and Wetop=∏iσhi,WzW_e^{\text{top}} = \prod_i \sigma^z_{h_{i,W}} obey exact operator identities:

∏i=0L−1Pi=Webot,∏p∈bulkBp=WebotWetop.\prod_{i=0}^{L-1} P_i = W_e^{\text{bot}}, \qquad \prod_{p \in \mathrm{bulk}} B_p = W_e^{\text{bot}} W_e^{\text{top}}.

In the Bp=+1B_p = +1 bulk sector, Wetop=∏iPi=(−1)NmW_e^{\text{top}} = \prod_i P_i = (-1)^{N_m} coincides with the boundary mm-anyon parity! Consequently, the vacuum lies in Wetop=+1W_e^{\text{top}} = +1, while a single boundary mm excitation lies in Wetop=−1W_e^{\text{top}} = -1. Computing the one-particle dispersion ωL(k)\omega_L(k) via exact diagonalization (ED) must subtract energies across these two distinct Wilson-loop sectors:

weyl
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.7

Why Sector Specification Prevents False Oracles

Within the same Wetop=+1W_e^{\text{top}} = +1 sector, the lowest excited state is a two-particle mm-pair state rather than a single-particle excitation. Because weyl-oracle independently constructs Clifford/stabilizer bases on the (2W+2)L=72(2W+2)L = 72 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 Z2\mathbb{Z}_2 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 ∂Λ\partial\Lambda of the Z2\mathbb{Z}_2 toric code, the boundary operators PiP_i and σdix\sigma^x_{d_i} satisfy the exact Ising algebra τi+1/2x=Pi\tau^x_{i+1/2} = P_i, τi−1/2zτi+1/2z=σdix\tau^z_{i-1/2}\tau^z_{i+1/2} = \sigma^x_{d_i} in the bulk +1+1 sector. Under the boundary Kramers–Wannier map KW(∂Λ)\mathrm{KW}(\partial\Lambda):

Pi⟷σdix,R=∑iPi⟷S=∑iσdix,P_i \longleftrightarrow \sigma^x_{d_i}, \qquad R = \sum_i P_i \longleftrightarrow S = \sum_i \sigma^x_{d_i},

which immediately implies dual of (R + x S) under KW(∂Λ) = S + x R. At x=0x = 0, the boundary condenses {1,e}\{1, e\} (rough boundary); as x→∞x \to \infty (with κ1=κ2=0\kappa_1 = \kappa_2 = 0), projecting onto σdix=+1\sigma^x_{d_i} = +1 yields the {1,m}\{1, m\} condensate (smooth boundary). By self-duality, the continuous boundary phase transition sits strictly at xc=1x_c = 1 in the c=1/2c = 1/2 Ising universality class (zν=1z\nu = 1). Turning on bulk-coupling perturbations κ1σdiz+κ2σhiz\kappa_1 \sigma^z_{d_i} + \kappa_2 \sigma^z_{h_i} breaks exact boundary self-duality via virtual bulk ee-anyon fluctuations of energy 2J2J and 4J4J, shifting xc(J,κ1,κ2)x_c(J, \kappa_1, \kappa_2) starting at order xκ12x\kappa_1^2 and κ12κ2\kappa_1^2\kappa_2—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 {Sj}\{S_j\} of H0H_0. Completing the basis with destabilizers DjD_j (Dj2=1D_j^2 = \mathbb{1}, [Di,Dj]=0[D_i, D_j] = 0, DiSj=(−1)δijSjDiD_i S_j = (-1)^{\delta_{ij}} S_j D_i) and commuting logical pairs (Xˉr,Zˉr)(\bar{X}_r, \bar{Z}_r) puts every Pauli string into a unique factorized form:

P=iϕ∏jDjaj∏jSjbj∏rXˉrurZˉrvr,P∣s,ℓ⟩=iϕ(−1)b⋅s+v⋅ℓ∣s⊕a,ℓ⊕u⟩.P = i^\phi \prod_j D_j^{a_j} \prod_j S_j^{b_j} \prod_r \bar{X}_r^{u_r} \bar{Z}_r^{v_r}, \qquad P|s, \ell\rangle = i^\phi (-1)^{b \cdot s + v \cdot \ell} |s \oplus a, \ell \oplus u\rangle.

Rather than expanding 2r2^r projectors in SIR, each perturbation term stores only its flip mask aa and dynamically evaluates the quasiparticle change n=ΔQ=Q(s′,ℓ′)−Q(s,ℓ)n = \Delta Q = Q(s', \ell') - Q(s, \ell) during KIR Apply:

Perturbation TermFlipped StabilizersEnergy Cost (ε0=2\varepsilon_0 = 2)Allowed TnT_n Channels (ΔQ\Delta Q)
−x σdix-x\,\sigma^x_{d_i}Pi−1,PiP_{i-1}, P_i±2,0\pm 2, 0n∈{−2,0,+2}n \in \{-2, 0, +2\}
−κ1 σdiz-\kappa_1\,\sigma^z_{d_i}Ai,0A_{i,0}±2J\pm 2Jn∈{−J,+J}n \in \{-J, +J\}
−κ2 σhiz-\kappa_2\,\sigma^z_{h_i}Ai,0,Ai+1,0A_{i,0}, A_{i+1,0}±4J,0\pm 4J, 0n∈{−2J,0,+2J}n \in \{-2J, 0, +2J\}

In weyl-cas, the KIR term stream packs coefficients over K≥4K \ge 4 63-bit primes alongside big-endian canonical monomials and parameter exponents (xaκ1bκ2c)(x^a \kappa_1^b \kappa_2^c) in a flat 8-byte-aligned record:

rust
#[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 y≥1y \ge 1 and all bulk plaquettes BpB_p commute with VV, virtual ee-anyons remain confined to the y=0y = 0 boundary row. Consequently, both Stage A (κ1=κ2=0\kappa_1 = \kappa_2 = 0) and Stage B (J∈{1,2}J \in \{1, 2\}) reduce to quasi-1D linked-cluster expansions where order kk requires clusters of length at most k+1k + 1, making 10th–15th order exact rational reconstruction feasible on a single workstation.

Weyl v0.1 · MIT License