The lattice is a transverse-field Ising model (TFIM), the Hamiltonian behind quantum annealers and quantum Boltzmann machines (QBMs):
H(s) = -A(s) Σᵢ σˣᵢ - B(s) J Σ⟨i,j⟩ σᶻᵢσᶻⱼ
A(s) = h_x·(1-s), B(s) = s, s: 0→1
At s=0 the transverse term σˣ dominates: every spin is a quantum superposition of up/down (a "paramagnet") and m=0. As s→1 the classical Ising coupling J·σᶻσᶻ takes over and the lattice freezes into an ordered configuration that samples low-energy states — exactly the annealing schedule real quantum annealers (D-Wave) and QBM training use to draw samples for a generative model, instead of the purely thermal (no σˣ term) fluctuations a classical Restricted Boltzmann Machine relies on.
Each frame solves the self-consistent mean-field equation for every site i, using its live neighbour average and the annealed field:
mᵢ = tanh( β · √( hₓ(s)² + (J·s·Σⱼ mⱼ)² ) ) · sign(J·s·Σⱼ mⱼ)
The colour of each qubit sphere is its magnetisation mᵢ (blue = spin-down, red = spin-up); the wobble amplitude is the quantum fraction hx(s)/√(hx(s)²+B(s)²), which shrinks to zero as the anneal completes.
- J / hx / T sliders — set the Ising coupling, starting transverse field, and sampling temperature before annealing.
- Run Anneal — animates s: 0→1 over a few seconds, driving the lattice from quantum-disordered to frozen.
- Draw 200 Samples — after annealing, samples bitstrings from the per-site probabilities p(σᵢ=+1)=(1+mᵢ)/2 and histograms their classical Ising energy, next to samples drawn the same way with hx forced to 0 the whole time (a purely classical Boltzmann machine) — the quantum run concentrates more probability mass at lower energy for the same coupling and temperature.