QuantumPhaseTransition-Lab: TFIM phase transition lab - ED vs Jordan-Wigner, gap closed at g=1. Sim!
141
Transverse-Field Ising Quantum Phase Transition Lab β by Darion Kellar
Educational quantum phase transition lab in ONE pure-Python file: the 1D transverse-field Ising model H = -J Ξ£ ΟzΟz - h Ξ£ Οx on a ring, solved by two independent engines that cross-check each other β exact diagonalization of the full Hamiltonian (Kronecker products, from-scratch Jacobi eigensolver, N β€ 7) and the Jordan-Wigner / Bogoliubov free-fermion solution (dispersion Ξ΅(k) = 2β(JΒ² + hΒ² β 2Jh cos k), thermodynamic ground energy, quasiparticle gap 2|J β h| closing exactly at g = h/J = 1). The finite-N Jordan-Wigner sum reproduces the ED ground energy to ~1e-8 at every N tested; the ordered-phase spectral gap collapses exponentially with N (tunnelling: 0.035490 β 0.003146 for N = 4 β 7 at g = 0.5), the critical gap closes like Ο/(2N) (gap Γ N: 1.5913 β 1.5774 toward Ο/2), the labelled Onsager-Yang magnetization (1 β gΒ²)^(1/8) is printed next to the ED β¨|Mz|β© that trends toward it, and a from-scratch kNN phase classifier labels the lab's own computed phase diagram.
Pure Python standard library. Zero dependencies. Zero network. Honest scope: the 1D TFIM is exactly solvable and the lab says so β the Jordan-Wigner formulas are labelled textbook results, nothing here solves an unsolved model, and no real material is predicted, fitted, or measured. Every materials / hardware / sensor / prediction use is a permanent HOLD gate (14 total).
docker pull credkellar/quantumphasetransition-lab:latest
docker run --rm credkellar/quantumphasetransition-lab:latest
The default command runs the full demo plus the built-in self-checks (CHECKS 49/49).
Run a specific command instead:
docker run --rm credkellar/quantumphasetransition-lab:latest python3 main.py checks # CHECKS 49/49
docker run --rm credkellar/quantumphasetransition-lab:latest python3 main.py ed # ED scan at N=6 vs JW (JSON)
docker run --rm credkellar/quantumphasetransition-lab:latest python3 main.py jw # finite-size ED vs JW report (JSON)
docker run --rm credkellar/quantumphasetransition-lab:latest python3 main.py gap # the two gap stories (JSON)
docker run --rm credkellar/quantumphasetransition-lab:latest python3 main.py phases # order parameter + correlation length (JSON)
docker run --rm credkellar/quantumphasetransition-lab:latest python3 main.py classify # kNN phase classifier report
docker run --rm credkellar/quantumphasetransition-lab:latest python3 main.py holds # 14 HOLD gates
python:3.12-slimScience Β· Developer tools Β· Machine learning & AI
credkellar/quantumphasetransition-lab:latestdocker pull credkellar/quantumphasetransition-lab:latest