In 2+1D topologically ordered phases, microscopic lattice Hamiltonians—whether Toric Code stars and plaquettes or Kitaev quantum doubles —encode an emergent unitary modular tensor category (UMTC) . Hand-writing microscopic local terms while manually tracking anyon fusion, braiding phases, and boundary condensation is error-prone and obscures duality structure.
Weyl bridges the macroscopic categorical layer and the microscopic lattice layer through categorical combinators (gauge, condense, dual, stack, couple) that operate directly on models and topological orders. Every combinator lowers deterministically to core lattice operators, and the type checker independently verifies consistency between the categorical type and the lowered microscopic normal form.
Modular Tensor Categories & Drinfeld Centers in weyl-topo
A 2+1D bosonic topological order is represented in weyl-topo by its modular data , where is the finite set of simple anyon types, are the fusion multiplicities in the fusion ring
and are the modular matrices satisfying unitarity, , and the Verlinde / modular relations (with chiral central charge phase for non-chiral doubles).
Pre-Metric Groups vs. Non-Abelian Quantum Doubles
weyl-topo specializes the representation by algebraic structure to avoid unnecessary -symbol overhead when exact group-theoretic formulas exist:
| Regime | Weyl Representation | Anyon Labels | Quantum Dimension | Exact Arithmetic Field |
|---|---|---|---|---|
| Abelian (Phase 1) | Pre-metric group , | |||
| Non-Abelian | Conjugacy classes & centralizer irreps | |||
| Twisted | 3-cocycle | Projective centralizer irreps | ||
| General UMTC | Explicit | Finite index set | Perron–Frobenius eigenvalue | Number field / cyclotomic |
For an Abelian quantum double , the topological spin and mutual braiding phase are generated automatically from :
For a non-Abelian finite group (such as ), the Drinfeld center has simple objects labeled by pairs where is a conjugacy class with representative and is an irreducible representation of the centralizer . The modular - and -matrices are computed over the cyclotomic field :
where . For , yields 8 anyons ( in Beigi–Shor–Whalen notation) with quantum dimensions and total quantum dimension .
Categorical Combinators in Weyl
Weyl provides five orthogonal combinators that compose both Hamiltonians and topological orders (weyl-types + weyl-topo):
| Combinator | Physical Operation | Lowering Target | Static Preconditions |
|---|---|---|---|
stack(M₁, M₂) / M₁ ⊠ M₂ | Uncoupled stacking (Deligne product) | , | Shared lattice |
couple M₁, M₂ by V | Inter-layer interaction | Hermitian & local; symmetry reduced to | |
gauge G in M | Minimal coupling of 0-form symmetry | Edge gauge DOFs + Gauss law + flux term | on-site, exact, anomaly-free () |
condense 𝒜 in 𝒞 | Anyon condensation | Deconfined quotient category | is a condensable bosonic algebra |
dual of M under D | Bond-algebra isomorphism (e.g. KW, ) | Term-wise canonical image | Every term of lies in |
Example: Toric Code & Condensation Without Microscopic Boilerplate
In examples/toric_gauge_combinators.weyl, the entire Toric Code cylinder with rough and smooth boundary terms is synthesized in six lines—and proved algebraically identical to the hand-written star/plaquette Hamiltonian:
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(ℤ₂)Running weylc explain examples/toric_gauge_combinators.weyl prints the inferred physical types without expanding lattice sizes :
$ weylc explain examples/toric_gauge_combinators.weyl
bulk : model on Λ, topological order D(ℤ₂), symmetry ℤ₂^(1), exact
R : model on Λ, topological order D(ℤ₂), symmetry ℤ₂^(1), ∂Λ condenses {1, e}, exact
S : model on Λ, topological order D(ℤ₂), symmetry ℤ₂^(1), ∂Λ condenses {1, m}, exact
𝒟 : topological order condense {1, e₁e₂} in D(ℤ₂) ⊠ D(ℤ₂) with anyons {1, e₂, m₁m₂, m₁f₂}
claim dual of (R + x S) under KW(∂Λ) = S + x R [proved: exact bond-algebra identity]
claim H = H_explicit [proved: canonical normal form identical]
claim 𝒟 = D(ℤ₂) [proved: modular (S, T) isomorphism]Trusted Computing Base (TCB) Invariant
High-level combinators never enlarge the trusted base. Every combinator lowers to core lattice terms (weylc explain --expand), and the type checker re-verifies the lowered terms from scratch. If the combinator-level type disagrees with the lowered microscopic type (e.g., braiding phase from vs. Pauli symplectic inner product), the compiler aborts with an internal error.
Anyon Condensation & Lagrangian Algebras
Anyon condensation transitions a parent UMTC to a child phase by proliferating a commutatively separable Frobenius algebra (condensable algebra) with and .
Static Checks for Condensable & Lagrangian Algebras
When a user writes condense 𝒜 in 𝒞 or declares a refinement type LagAlg<𝒞>, weyl-topo enforces four static conditions over . First, the algebra must contain the vacuum with unit multiplicity (), and every condensed simple anyon must have bosonic self-statistics:
Second, the quantum dimension must divide for Abelian condensations, and equals precisely when is Lagrangian (yielding a trivial child phase , i.e., a gapped boundary to vacuum):
Finally, as a necessary condition for Lagrangian algebras, the multiplicity vector must be modular invariant:
Because modular invariance alone is not sufficient for general non-Abelian MTCs, weyl-topo constructively enumerates valid Lagrangian algebras of from subgroup-cocycle pairs with up to conjugacy and , rejecting any user-claimed vector outside the constructive enumeration with diagnostic E0372.
Confinement, Identification, and Splitting
Under condensation of , anyons in undergo confinement, identification, and splitting. Any anyon with non-trivial mutual braiding against a constituent (, or more generally a non-local module structure) acquires a linear string tension and is confined in . Among the remaining deconfined anyons, two charges and related by fusion with become identical in the quotient phase (). In non-Abelian theories, a deconfined anyon that can absorb in multiple channels ( for ) additionally splits into distinct simple anyons in , conserving total quantum dimension .
In the double-layer example condense {1, e₁e₂} in D(ℤ₂) ⊠ D(ℤ₂), the composite charge has spin , so is bosonic with inside a parent phase of total quantum dimension . Exactly eight anyons——braid trivially with , whereas and their -shifts are confined. Identifying collapses the deconfined sector into four equivalence classes with , recovering a child phase isomorphic to .
Non-Abelian Example: Condensation & Lagrangian Algebras
For (), weyl-topo enumerates the 4 subgroup conjugacy classes of (all with trivial ), yielding 4 Lagrangian algebras and 2 non-Lagrangian condensable algebras:
given G : symmetric group S₃
given 𝒞 : topological order D(G)
-- Non-Lagrangian condensation: condense the 1D bosonic sign charge B (d_B = 1)
define 𝒰_B ≔ condense {1 ⊕ B} in 𝒞
claim 𝒰_B = D(ℤ₃) -- D(S₃) / {1, B} ≅ D(ℤ₃), 𝒟 = 6 / 2 = 3
-- All four Lagrangian algebras of D(S₃), each with dim(𝒜) = 6 = 𝒟
claim 1 ⊕ B ⊕ 2 C : Lagrangian algebra of 𝒞 -- K = {1} (smooth / magnetic-like)
claim 1 ⊕ C ⊕ D : Lagrangian algebra of 𝒞 -- K = ℤ₂ (partial SSB)
claim 1 ⊕ B ⊕ 2 F : Lagrangian algebra of 𝒞 -- K = ℤ₃ (electric-magnetic mixed)
claim 1 ⊕ D ⊕ F : Lagrangian algebra of 𝒞 -- K = S₃ (rough / electric-like)Notice the non-trivial multiplicity in : because , . Under , the 2-dimensional anyon () splits into two Abelian anyons of , while the 3-dimensional flux anyons are confined.
Fixed-Point Condensation & Braiding Cross-Checks
Weyl draws a strict semantic boundary between geometric termination and dynamical condensation phase. A declaration such as given ∂Λ : boundary of Λ at y = 0 with dangling edges d_i specifies only lattice geometry and truncated operators, whereas claim ∂Λ condenses {1, e} at x = 0, κ₁ = 0, κ₂ = 0 is decided strictly at that solvable stabilizer fixed point via the quotient of the boundary stabilizer centralizer by endpoint string operators (T-Bdy). Away from the fixed point (H = H₀ + V), Weyl preserves the tag at x = 0, κ₁ = 0, κ₂ = 0 rather than extrapolating fixed-point condensation to finite couplings .
Static Diagnostics on Invalid Condensation & Braiding
Attempting to claim a wrong condensate or inconsistent anyon string braiding fails at compile time before any series expansion runs:
error[E0311]: the fixed-point condensation claim disagrees with the stabilizer quotient
--> toric_boundary.weyl:23:8
| claim ∂top condenses {1, e} at x = 0, κ₁ = 0, κ₂ = 0
| the smooth termination has truncated stars and absorbs m
= help: state the proven fixed-point subgroup {1, m}
error[E0360]: claimed algebra {1, f} is not a valid condensable algebra of D(ℤ₂)
--> bad_condense.weyl:9:12
| anyons with n_a > 0 must be bosons (θ_a = 1), but θ(f) = −1For every pair of string operators annotated with anyon types (e ↔ A_v = −1, m ↔ B_p = −1) and intersection number , rule T-Braid checks that the categorical prediction matches the microscopic Pauli symplectic inner product . Any discrepancy triggers E0340, providing a zero-cost cross-check between the categorical type layer and the microscopic operator kernel.
Internal Representation & Static Check Complexity
Inside weyl-topo and weyl-types, topological orders and refinement predicates are stored as immutable interned structures whose verification cost is independent of the symbolic lattice dimensions :
pub struct PreMetricGroup {
pub order: usize, // |A| = |G|^2 for Abelian D(G)
pub spins: Vec<Cyclotomic>, // theta(a) in Q(zeta_n)
pub braiding: Vec<Cyclotomic>, // M(a, b) = theta(a + b) / (theta(a) * theta(b))
}
pub struct LagAlg {
pub parent: TopoId,
pub multiplicities: Vec<u32>, // n_a in N with n_1 = 1, sum n_a d_a = D
pub witness: Option<(SubgroupId, Cocycle2Id)>, // constructive (K, omega) witness
}| Static Check | Algorithm in weyl-topo | Complexity | Lattice-Size Dependent? |
|---|---|---|---|
Abelian Lagrangian check (Lagrangian<T>) | Verify $ | L | ^2 = |
Non-Abelian LagAlg<T> enumeration | Enumerate up to conjugacy + | No | |
| 3-cocycle verification () | Bounded exhaustive table check over | No | |
Fixed-point condensation (T-Bdy) | Boundary stabilizer centralizer quotient on representative cells | No | |
Braiding cross-check (T-Braid) | Compare against | No |