Course project (Quantum Computing) exploring the 1D/2D transverse-field Ising
model — exact diagonalization, entanglement/central-charge scaling, an
independent Jordan-Wigner cross-check, classical-shadow reconstruction, and
two VQE ansätze (hardware-efficient vs. a Hamiltonian Variational Ansatz) —
grounded in the official PennyLane qspin
dataset.
Full write-up: report.md. Slides + speaker notes:
presentation/.
H = J Σ_<i,j> σ_i^z σ_j^z + h Σ_i σ_i^x (J = -1, ferromagnetic)
<i,j> runs over nearest-neighbour lattice bonds; h is the transverse
field. The order parameter is the longitudinal magnetization ⟨|M_z|⟩. The 1D
infinite chain has a quantum critical point at h/|J| = 1.
- Critical point, two independent exact routes (Suzuki-Trotter mapping to
the classical 2D Ising model; Jordan-Wigner free-fermion gap) agree on
g_c = 1; the Jordan-Wigner closed form matches the dataset's exact diagonalization to 1e-13–1e-15 (src/physics/jordan_wigner.py). - Finite-size
h_c(N)from the order parameter/Binder cumulant converges towardh_c=1asNgrows, faster on the closed (periodic) chain than the open one — an explicit finite-size boundary effect (src/physics/boundary_comparison.py,src/physics/finite_size_scaling.py). - Entanglement entropy shows the area law away from criticality and the
expected CFT log-scaling at the critical point; the naive Calabrese-Cardy
central-charge fit is biased on the open chain (
c≈0.62) by boundary operators, confirmed by refitting on the closed chain (c≈0.51, matching the Ising CFT value1/2) (src/physics/entanglement.py). - VQE ansatz comparison: a physics-informed Hamiltonian Variational Ansatz
with warm-starting beats a generic hardware-efficient ansatz by roughly
23× median energy error at
N=8, widening to ~85× atN=16(src/ansatz/vqe_hva.py,src/ansatz/benchmark.py). - Barren plateaus: gradient variance for the hardware-efficient ansatz
decays exponentially with
N; the symmetry-respecting HVA/QAOA ansatz instead grows (src/ansatz/trainability.py). - Classical-shadow reconstruction of
√⟨M_z²⟩from the dataset's pre-simulated randomized measurements — the one NISQ-realistic, shot-noise-limited result in the project (src/physics/classical_shadow.py).
python3.12 -m venv .venv
uv pip install -r <(echo "pennylane==0.45.0 aiohttp fsspec h5py")
.venv/bin/python -m pytest tests/ -qThe qspin dataset is downloaded on first use and cached under data/
(git-ignored). To regenerate every figure and CSV from scratch:
.venv/bin/python run_all.pysrc/— reusable Python modules, split by role:core/— dataset loader, shared plotting style, process-pool helperphysics/— order parameter, entanglement/central charge, finite-size scaling, boundary comparison, 2D lattices, Jordan-Wigner, classical shadowsansatz/— VQE/QAOA ansätze, optimizer trajectories, trainability, benchmarks
tests/— pytest suite mirroringsrc/(core/,physics/,ansatz/)plots/— generated figures (PNG), referenced by both the report and the slidesreport.md— full written reportpresentation/— slides (Typst) + speaker notesrun_all.py— single entry point that reproduces every figure/CSV
See CLAUDE.md for full project history, physics background, and detailed
status notes.

