Same 2D compact U(1) lattice gauge theory as the 3D version — a phase θl ∈ [0, 2π) lives on every link of a periodic lattice, and the gauge-invariant plaquette loop θp is thermalized by Metropolis Monte Carlo against the action:
θ_p = θ(x,y)ʰ + θ(x+1,y)ᵛ − θ(x,y+1)ʰ − θ(x,y)ᵛ
S[U] = β Σ_p (1 − cos θ_p), β = 1/g²
This 2D-native view drops the 3D camera scene entirely. The left panel is a top-down flux heatmap: each plaquette cell is shaded blue→orange by its local flux 1−cos θp, and every link is drawn as a short hue-coded vector arrow pointing along its own phase angle — a genuine 2D vector-field rendering of the same link/plaquette data, not a rotated 3D lattice.
The right panel is a live log-linear regression: for every Wilson loop size R = 1…Rmax the simulator keeps a running ensemble average ⟨cos Σl∈∂Cθl⟩ and plots ln W(R) against the loop area R². In 2D, compact U(1) gauge theory confines at every coupling — the exact solution is W(R,R) = (I₁(β)/I₀(β))R², a strict area law — so the points should fall on a straight line whose slope is minus the string tension σ. The simulator fits that line live and reports σ.
- β slider — large β (weak coupling) shallows the line (small σ, near-ordered links); small β (strong coupling) steepens it (large σ, fast-decaying loops).
- Because W(R) is a running ensemble average rather than one Monte Carlo snapshot, the fitted σ converges to the exact analytic value as more sweeps accumulate — you can watch the fit stabilize.
Real-world relevance: this is the direct 2D ancestor of the lattice QCD Monte Carlo codes used to compute the quark-confinement string tension from first principles — here, in the one dimension where the answer is known exactly, so the live fit is directly checkable.