This is a real "quantum simulation" in the technical sense: using a sequence of quantum gates to approximate the time evolution of a genuinely quantum many-body Hamiltonian — the transverse-field Ising model on N spins:
H = -J Σ Zₖ Zₖ₊₁ - h Σ Xₖ
The two pieces don't commute, so e-iHt can't be built directly from simple gates. Instead the circuit uses a first-order Trotter-Suzuki step:
e^(-iHδt) ≈ e^(-iJδt·ΣZZ) · e^(-ihδt·ΣX)
Each factor alone is easy: the ZZ term is diagonal (a phase gate per neighbor pair), the X term is a single-qubit rotation on every spin. Repeating this product Nsteps times approximates the true evolution, with an error per step of order O(δt²) — smaller Trotter steps (the "Trotter steps / unit time" slider) shrink δt and drive the circuit's output closer to the exact continuum evolution, exactly as it does on real superconducting/trapped-ion quantum simulators.
- Fidelity bar — |⟨ψtrotter|ψref⟩|², measured against a much finer-grained reference Trotterization of the same physical time. Coarser δt (fewer steps) visibly degrades this over time.
- Arrows — each spin's exact Bloch vector projected onto the (X,Z) plane, computed from the full 2N-dimensional statevector by tracing out the rest of the chain; the disc's fill opacity encodes the out-of-plane ⟨Y⟩ component. The chain starts fully polarized along +X (a product state, arrows at full disc radius); as ZZ coupling entangles neighboring spins the reduced Bloch vectors shrink below the disc's edge — a direct, visible signature of quantum entanglement.
- J / h sliders — set the relative strength of the interaction vs. the driving field; increasing h drives faster coherent oscillation, increasing J drives faster entangling dynamics and magnetization spread along the chain.