Skip to content
Mathematical Physics · Integrable Models

Exact Free Fermions & Integrable Checks

Derive the Jordan–Wigner transformation, Majorana representations, BdG diagonalization, and Yang–Baxter / Bethe ansatz checks, and use exact integrable solutions as zero-epistemic-error analytical oracles for pCUT and ED.

In perturbative many-body physics, numerical exact diagonalization (ED) is inevitably limited by finite-size wrap-around effects and floating-point precision. Exact integrable models—especially free-fermion chains solvable via Jordan–Wigner and Bogoliubov–de Gennes (BdG) transformations—provide zero-epistemic-error analytical oracles. In Weyl, locking the symbolic algebraic kernel against an exact free-fermion oracle (Stage A of examples/toric_boundary.weyl) before turning on non-integrable bulk couplings (Stage B) guarantees zero false positives across all perturbation orders.

Jordan–Wigner Transformation, Parity, and Boundary Conditions ​

Consider the 1D transverse-field Ising model (TFIM) with coupling λ\lambda (which coincides with the κ1=κ2=0\kappa_1 = \kappa_2 = 0 boundary Hamiltonian H∂H_\partial of the Z2\mathbb{Z}_2 toric code upon identifying τ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}, and λ=x\lambda = x):

HTFIM=−∑j=1Lτjx−λ∑j=1Lτjzτj+1z.H_{\mathrm{TFIM}} = -\sum_{j=1}^L \tau^x_j - \lambda \sum_{j=1}^L \tau^z_j \tau^z_{j+1}.

The Jordan–Wigner (JW) transformation maps spin-1/2 operators to spinless canonical fermions {ci,cj†}=δij\{c_i, c_j^\dagger\} = \delta_{ij}, {ci,cj}=0\{c_i, c_j\} = 0 by attaching a non-local string operator:

τjx=1−2cj†cj,τjz=−(∏l=1j−1(1−2cl†cl))(cj+cj†).\tau^x_j = 1 - 2 c_j^\dagger c_j, \qquad \tau^z_j = -\left(\prod_{l=1}^{j-1} (1 - 2 c_l^\dagger c_l)\right)\left(c_j + c_j^\dagger\right).

For interior bonds (1≤j<L1 \le j < L), the JW strings cancel cleanly: τjzτj+1z=(cj†−cj)(cj+1†+cj+1)\tau^z_j \tau^z_{j+1} = (c_j^\dagger - c_j)(c_{j+1}^\dagger + c_{j+1}). On a periodic chain (τL+1z=τ1z\tau^z_{L+1} = \tau^z_1), however, the closing bond retains the global fermion parity operator PF=∏j=1L(1−2cj†cj)=(−1)NFP_F = \prod_{j=1}^L (1 - 2 c_j^\dagger c_j) = (-1)^{N_F}:

τLzτ1z=−PF(cL†−cL)(c1†+c1).\tau^z_L \tau^z_1 = -P_F (c_L^\dagger - c_L)(c_1^\dagger + c_1).

Because [HTFIM,PF]=0[H_{\mathrm{TFIM}}, P_F] = 0, the Hilbert space splits into two decoupled boundary-condition sectors:

Parity SectorFermion Parity PFP_FFermion Boundary ConditionAllowed Momenta kkToric-Code Cylinder Sector
Neveu–Schwarz (NS)+1+1 (even NFN_F)Antiperiodic (cL+1=−c1c_{L+1} = -c_1)k=±πL,±3πL,…,±(L−1)πLk = \pm\frac{\pi}{L}, \pm\frac{3\pi}{L}, \dots, \pm\frac{(L-1)\pi}{L}Vacuum (Wetop=+1W_e^{\text{top}} = +1)
Ramond (R)−1-1 (odd NFN_F)Periodic (cL+1=+c1c_{L+1} = +c_1)k=0,±2πL,…,πk = 0, \pm\frac{2\pi}{L}, \dots, \piOne-particle (Wetop=−1W_e^{\text{top}} = -1)

Exact Correspondence with Cylinder Wilson Loops

On the rough–smooth toric-code cylinder, PF=∏iPi=Webot=WetopP_F = \prod_i P_i = W_e^{\text{bot}} = W_e^{\text{top}} in the Bp=+1B_p = +1 bulk sector. Thus the NS/R fermion boundary split is algebraically identical to the Wetop=±1W_e^{\text{top}} = \pm 1 Wilson-loop sector split enforced by weyl-oracle in ED!

Majorana Fermions and Kitaev Models ​

Splitting each complex fermion into two Hermitian Majorana operators γ2j−1=cj+cj†\gamma_{2j-1} = c_j + c_j^\dagger and γ2j=−i(cj−cj†)\gamma_{2j} = -i(c_j - c_j^\dagger) yields the Clifford algebra {γa,γb}=2δab\{\gamma_a, \gamma_b\} = 2\delta_{ab}, γa†=γa\gamma_a^\dagger = \gamma_a, γa2=1\gamma_a^2 = \mathbb{1}.

In this representation, the 1D TFIM / pp-wave superconductor becomes the Kitaev chain,

HKC=i∑j=1Lγ2j−1γ2j+iλ∑j=1L−1γ2jγ2j+1,H_{\mathrm{KC}} = i \sum_{j=1}^L \gamma_{2j-1}\gamma_{2j} + i\lambda \sum_{j=1}^{L-1} \gamma_{2j}\gamma_{2j+1},

where for λ>1\lambda > 1 under open boundary conditions the end Majoranas γ1\gamma_1 and γ2L\gamma_{2L} decouple exponentially from the bulk, forming a topologically protected zero-energy fermion mode. The same construction extends to two dimensions in the Kitaev honeycomb model, HKH=−∑α∈{x,y,z}Jα∑⟨i,j⟩ασiασjαH_{\mathrm{KH}} = -\sum_{\alpha \in \{x,y,z\}} J_\alpha \sum_{\langle i,j\rangle_\alpha} \sigma^\alpha_i \sigma^\alpha_j, which is solved exactly by introducing four Majorana fermions per site, σjα=ibjαcj\sigma^\alpha_j = i b^\alpha_j c_j, subject to the local Z2\mathbb{Z}_2 gauge constraint Dj=bjxbjybjzcj=+1D_j = b^x_j b^y_j b^z_j c_j = +1; the bond operators uij=ibiαbjα=±1u_{ij} = i b^\alpha_i b^\alpha_j = \pm 1 commute with HKHH_{\mathrm{KH}}, reducing each flux sector to free itinerant cjc_j Majoranas.

In Weyl's Phase 2 weyl-canonical, Majorana words share the same GradedAlgebra trait as Pauli strings: a word is stored as a sorted index list of site-flavor IDs, multiplication merges two sorted lists while counting inversions for the (−1)inv(-1)^{\mathrm{inv}} sign, and duplicate indices cancel via γa2=1\gamma_a^2 = \mathbb{1}.

In the surface language, fermion, boson and Majorana fields share one exact normal form, the graded tensor product CAR ⊗ CCR (a Majorana mode is γ=c+c†\gamma = c + c^\dagger on a fermion mode of its own). Hermiticity of a define and every bracket claim are computed from it:

weyl
model  Holstein coupling and a Majorana chain

given  Λ : open chain of 4 sites
given  c : fermion on vertices(Λ)
given  a : boson on vertices(Λ)
given  γ, η : Majorana on vertices(Λ)
given  ω, g, t : real number

define H_ph ≔ ω Σ_i a†_i a_i
define H_g  ≔ g Σ_i c†_i c_i (a_i + a†_i)
define H_K  ≔ i t Σ_i η_i γ_{i+1}
define H    ≔ H_ph + H_g + H_K

claim  H : Hermitian
claim  [a_i, a†_i] = 1
claim  [a_i, a†_j] = 0
claim  [a†_i a_i, c†_i c_i] = 0
claim  [γ_i, η_i]₊ = 0
claim  [γ_i, γ_i]₊ = 2
claim  [i γ_i η_i, i η_j γ_j] = 0

Dropping the factor i in H_K, or replacing the displacement a_i + a†_i by a_i, makes claim H : Hermitian fail with E0301; claiming [a_i, a†_i] = 0 or [γ_i, γ_i]₊ = 0 fails with E0340.

Draft The gauge-fixed solution of the Kitaev honeycomb model (flux sectors and the projection Dj=+1D_j = +1) is not expressible yet; only the operator algebra above is checked.

Bogoliubov–de Gennes (BdG) Diagonalization ​

Transforming cj=1L∑keikjckc_j = \frac{1}{\sqrt{L}}\sum_k e^{ikj} c_k within each parity sector decouples HTFIMH_{\mathrm{TFIM}} into 2×22 \times 2 Nambu–BdG blocks pairing (k,−k)(k, -k):

HTFIM=∑k>0(ck†c−k)2(1−λcos⁡k−iλsin⁡kiλsin⁡k−(1−λcos⁡k))⏟HBdG(k)(ckc−k†).H_{\mathrm{TFIM}} = \sum_{k > 0} \begin{pmatrix} c_k^\dagger & c_{-k} \end{pmatrix} \underbrace{2\begin{pmatrix} 1 - \lambda \cos k & -i \lambda \sin k \\ i \lambda \sin k & -(1 - \lambda \cos k) \end{pmatrix}}_{H_{\mathrm{BdG}}(k)} \begin{pmatrix} c_k \\ c_{-k}^\dagger \end{pmatrix}.

Applying the unitary Bogoliubov rotation ηk=cos⁡θk2 ck−isin⁡θk2 c−k†\eta_k = \cos\frac{\theta_k}{2}\, c_k - i \sin\frac{\theta_k}{2}\, c_{-k}^\dagger with tan⁡θk=λsin⁡k1−λcos⁡k\tan\theta_k = \frac{\lambda \sin k}{1 - \lambda \cos k} diagonalizes HTFIM=∑kϵk(ηk†ηk−12)H_{\mathrm{TFIM}} = \sum_k \epsilon_k \left(\eta_k^\dagger \eta_k - \frac{1}{2}\right), giving the exact single-quasiparticle dispersion and thermodynamic ground-state energy density:

ϵk=21−2λcos⁡k+λ2,e0(λ)=−12π∫02π1−2λcos⁡k+λ2 dk=−2π(1+λ) E ⁣(2λ1+λ),\epsilon_k = 2\sqrt{1 - 2\lambda \cos k + \lambda^2}, \qquad e_0(\lambda) = -\frac{1}{2\pi}\int_0^{2\pi} \sqrt{1 - 2\lambda \cos k + \lambda^2}\,dk = -\frac{2}{\pi}(1+\lambda)\,E\!\left(\frac{2\sqrt{\lambda}}{1+\lambda}\right),

where E(m)E(m) is the complete elliptic integral of the second kind. Expanding e0(λ)e_0(\lambda) and ϵk\epsilon_k as formal power series in λ\lambda yields exact rational coefficients at every order:

e0(λ)=−1−14λ2−164λ4−1256λ6−2516384λ8−4965536λ10−⋯e_0(\lambda) = -1 - \frac{1}{4}\lambda^2 - \frac{1}{64}\lambda^4 - \frac{1}{256}\lambda^6 - \frac{25}{16384}\lambda^8 - \frac{49}{65536}\lambda^{10} - \cdots

The single-particle gap Δ(λ)=ϵk=0=2(1−λ)\Delta(\lambda) = \epsilon_{k=0} = 2(1 - \lambda) has exact logarithmic derivative ddλln⁡Δ(λ)=−11−λ\frac{d}{d\lambda}\ln \Delta(\lambda) = -\frac{1}{1-\lambda}. Applying dlog-Padé yields xc=1x_c = 1 and zν=1z\nu = 1 already at the minimal [0/1][0/1] approximant with zero family spread—yet Weyl still preserves the Epi{PadeSpread(dlog-Padé)} tag because Padé extrapolation is intrinsically an epistemic inference.

Exact Real-Space Hopping Amplitudes tδ(λ)t_\delta(\lambda) ​

To compare the momentum-space dispersion against real-space pCUT hopping amplitudes tδ=⟨δ∣Heff∣r=0⟩−Evacδδ,0t_\delta = \langle \delta | H_{\mathrm{eff}} | r = 0 \rangle - E_{\mathrm{vac}} \delta_{\delta,0}, we factorize the square root into holomorphic and anti-holomorphic factors,

ϵk=2(1−λeik)1/2(1−λe−ik)1/2=2∑m=0∞∑n=0∞(1/2m)(1/2n)(−λ)m+nei(m−n)k.\epsilon_k = 2(1 - \lambda e^{ik})^{1/2}(1 - \lambda e^{-ik})^{1/2} = 2 \sum_{m=0}^\infty \sum_{n=0}^\infty \binom{1/2}{m}\binom{1/2}{n} (-\lambda)^{m+n} e^{i(m-n)k}.

Extracting the Fourier coefficient of eikδe^{ik\delta} (δ≥0\delta \ge 0) gives an exact closed-form rational series for every hopping distance δ\delta:

tδ(λ)=2(−λ)δ∑m=0∞(1/2m)(1/2m+δ)λ2m,(1/2n)=(−1)n−14n(2n−1)(2nn).t_\delta(\lambda) = 2 (-\lambda)^\delta \sum_{m=0}^\infty \binom{1/2}{m}\binom{1/2}{m+\delta} \lambda^{2m}, \qquad \binom{1/2}{n} = \frac{(-1)^{n-1}}{4^n (2n - 1)} \binom{2n}{n}.

Hopping ChannelExact Rational Series through O(λ6)O(\lambda^6)Leading Cluster Length
On-site t0(λ)t_0(\lambda)2+12λ2+132λ4+1128λ6+⋯2 + \frac{1}{2}\lambda^2 + \frac{1}{32}\lambda^4 + \frac{1}{128}\lambda^6 + \cdots11
Nearest neighbor t1(λ)t_1(\lambda)−λ+18λ3+164λ5+⋯-\lambda + \frac{1}{8}\lambda^3 + \frac{1}{64}\lambda^5 + \cdots22
Next-nearest t2(λ)t_2(\lambda)−14λ2+116λ4+5512λ6+⋯-\frac{1}{4}\lambda^2 + \frac{1}{16}\lambda^4 + \frac{5}{512}\lambda^6 + \cdots33
Third neighbor t3(λ)t_3(\lambda)−18λ3+5128λ5+⋯-\frac{1}{8}\lambda^3 + \frac{5}{128}\lambda^5 + \cdots44

Notice that ∑δ=−∞∞tδ(λ)=t0(λ)+2∑δ=1∞tδ(λ)=ϵk=0=2(1−λ)\sum_{\delta = -\infty}^{\infty} t_\delta(\lambda) = t_0(\lambda) + 2\sum_{\delta=1}^\infty t_\delta(\lambda) = \epsilon_{k=0} = 2(1-\lambda), so every order k≥2k \ge 2 satisfies the exact sum rule t0(k)+2∑δ=1ktδ(k)=0t_0^{(k)} + 2\sum_{\delta=1}^k t_\delta^{(k)} = 0—an immediate internal cross-check on cluster inclusion–exclusion weights.

Yang–Baxter Equation and Bethe Ansatz Consistency Checks Draft ​

For interacting 1D integrable models—such as the Heisenberg XXZ chain HXXZ=∑j(σjxσj+1x+σjyσj+1y+Δσjzσj+1z)H_{\mathrm{XXZ}} = \sum_j (\sigma^x_j\sigma^x_{j+1} + \sigma^y_j\sigma^y_{j+1} + \Delta \sigma^z_j\sigma^z_{j+1}) or the 1D Hubbard model—free-fermion mappings break down, but integrability survives through an infinite tower of commuting charges generated by a transfer matrix T(u)=Tr⁡a∏jRaj(u)T(u) = \operatorname{Tr}_a \prod_j R_{aj}(u) whose RR-matrix obeys the Yang–Baxter equation (YBE):

R12(u−v) R13(u) R23(v)=R23(v) R13(u) R12(u−v).R_{12}(u - v)\, R_{13}(u)\, R_{23}(v) = R_{23}(v)\, R_{13}(u)\, R_{12}(u - v).

Simultaneous eigenstates with MM magnons are parameterized by rapidities {λ1,…,λM}\{\lambda_1, \dots, \lambda_M\} solving the Bethe ansatz equations (for isotropic XXX, Δ=1\Delta = 1):

(λj+i/2λj−i/2)L=∏l=1l≠jMλj−λl+iλj−λl−i,E=EFM−∑j=1M2λj2+1/4.\left(\frac{\lambda_j + i/2}{\lambda_j - i/2}\right)^L = \prod_{\substack{l=1 \\ l \neq j}}^M \frac{\lambda_j - \lambda_l + i}{\lambda_j - \lambda_l - i}, \qquad E = E_{\mathrm{FM}} - \sum_{j=1}^M \frac{2}{\lambda_j^2 + 1/4}.

In Weyl, the YBE is verified as an exact symbolic operator identity in weyl-canonical, while Bethe-root energies serve as high-precision analytical benchmarks to cross-check finite-size ED and high-order series expansions in weyl-oracle:

weyl
model  Heisenberg XXX Yang–Baxter and Bethe check

given  u, v : spectral parameter
given  P₁₂, P₁₃, P₂₃ : permutation operators on (ℂ²)⊗³

define R(w) ≔ w · 𝟙 + i · P
claim  R₁₂(u − v) · R₁₃(u) · R₂₃(v) = R₂₃(v) · R₁₃(u) · R₁₂(u − v)

compare H_XXX on L = 12, M = 6 with bethe_ansatz_roots
        using double-double arithmetic

Exact Analytical Oracles in Weyl (compare ... against exact) ​

In examples/toric_boundary.weyl, the free-fermion oracle validates every ground-state coefficient e0e_0 and every one-particle hopping amplitude tδt_\delta of the pCUT effective Hamiltonian HeffH_{\mathrm{eff}} as exact rationals with zero tolerance:

weyl
expand H_eff ≔ pCUT of H around H₀
       to O(x¹⁵) at κ₁ = κ₂ = 0,  to total order 10 in (x, κ₁, κ₂) otherwise
       in the sector where every conserved A_v, B_p equals +1

define e₀   ≔ (⟨vac| H_eff |vac⟩ − E_bulk) / L
define ω(k) ≔ one-particle dispersion of H_eff
define Δ    ≔ ω(0)
estimate (x_c, zν) from Δ by dlog-Padé in x

compare H_eff with free fermions at κ₁ = κ₂ = 0
bash
$ weylc run examples/toric_boundary.weyl --stage A
[pcut.coeffs]    generated C(m) for n ∈ {-2, 0, 2} up to order 14 (4,782,969 sequences)
[kir.cluster]    evaluated linked clusters L ≤ 15 over 4 × 63-bit primes -> CRT exact
[oracle.ff]      e₀(x) through O(x¹⁴):  15/15 rational coefficients EXACT MATCH (tol = 0)
[oracle.ff]      t_δ(x) through O(x¹⁴): all hopping channels δ ∈ [0..14] EXACT MATCH
[pade.dlog]      [0/1] approximant: x_c = 1.000000, zν = 1.000000 (tag: Epi{PadeSpread(dlog-Padé)})

Kernel Architecture: GradedAlgebra and FreeFermionOracle ​

Inside weyl-canonical and weyl-oracle, Majorana canonicalization and exact series comparison are implemented with zero floating-point operations:

rust
// weyl-canonical: unified trait for Pauli (Phase 1) and Majorana (Phase 2) words
pub trait GradedAlgebra: Clone + Ord {
    fn mul_canonical(&self, rhs: &Self) -> (PhaseZ4, Self);
    fn parity(&self) -> Grade; // Even for Pauli; len % 2 for Majorana words
}

// Majorana multiplication merges sorted mode lists, counts inversions for (-1)^inv,
// and cancels duplicate modes via gamma_a^2 = 1.
pub fn majorana_mul(lhs: &[u32], rhs: &[u32]) -> (i8, Vec<u32>) {
    let (mut sign, mut out) = (1i8, Vec::with_capacity(lhs.len() + rhs.len()));
    let (mut i, mut j) = (0, 0);
    while i < lhs.len() && j < rhs.len() {
        match lhs[i].cmp(&rhs[j]) {
            std::cmp::Ordering::Less => { out.push(lhs[i]); i += 1; }
            std::cmp::Ordering::Greater => {
                if (lhs.len() - i) % 2 == 1 { sign = -sign; }
                out.push(rhs[j]); j += 1;
            }
            std::cmp::Ordering::Equal => {
                if (lhs.len() - i - 1) % 2 == 1 { sign = -sign; }
                i += 1; j += 1; // gamma_a^2 = 1 cancellation
            }
        }
    }
    out.extend_from_slice(&lhs[i..]);
    out.extend_from_slice(&rhs[j..]);
    (sign, out)
}

// weyl-oracle: zero-tolerance exact rational comparator for Stage A
pub fn verify_tfim_series(
    pcut_e0: &[Rational],
    pcut_hoppings: &BTreeMap<usize, Vec<Rational>>,
    max_order: usize,
) -> Result<(), OracleFailure>;

Verification Oracle Comparison ​

Oracle TypeDomainPrecision / ToleranceError Tag ImpactPrimary Role in Weyl
Free-Fermion Exact1D TFIM / Kitaev / Stage AExact Q\mathbb{Q} (zero tolerance)Confirms Exact series coefficientsLocks pCUT & KIR correctness through O(x14)O(x^{14})
Yang–Baxter / BetheXXZ / 1D HubbardExact YBE + arbitrary-precision rootsConfirms integrability & spectraValidates interacting 1D models & ED sectors
Multi-Sector EDNon-integrable Stage B (J<∞J < \infty)Double-double (~106-bit mantissa)Never upgrades to ExactChecks residual slope r<Lr < L across (k, W_e^top)
Schrieffer–Wolff spectrumFermion clusters, expand … ≔ SW of H around H₀Exact modulo two 63-bit primesConfirms the stated remainder orderBlock diagonality and Tr⁡Hk\operatorname{Tr} H^k identities, sector by sector
dlog-PadéCritical point (xc,zν)(x_c, z\nu)Exact Q\mathbb{Q} Padé + family spreadAlways Epi{PadeSpread(dlog-Padé)}Extracts critical exponents from verified series

Mutation Testing Guarantees Oracle Sensitivity

Weyl's CI suite runs mutation tests against weyl-oracle—intentionally flipping a single sign in C(m)C(m), dropping a cluster of length kk, or corrupting one entry in the Pauli phase table. Every mutation must fail the Stage A free-fermion oracle or Stage B ED residual-slope check and accurately report first_bad_order.

Weyl v0.1 · MIT License