wai-quantum 0.3.35: time evolution of spin chains by TDVP, held to exact answers #160
Loading…
Reference in a new issue
No description provided.
Delete branch "wai-quantum-tdvp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #159 (DMRG); the diff against main includes #151, #155, #156 and #159 until they merge.
What this adds
quantum_tdvp: time evolution of spin chains by the time-dependent variational principle, held to exact answers.expm_krylov): Lanczos with full re-orthogonalisation. A step that does not converge inkrylovvectors is halved.θ†. The left vectors are accumulated rotations, so they stay orthonormal however small the singular value, and amplitudes resolve to rounding. A density-matrix split resolves them only to about10⁻⁸.Evolution::newcompletes every bond's basis with orthonormal null vectors up tomax_bond. The state does not change, but the tangent space grows. A product state's bases cannot expressH|ψ⟩, and that, not the time step, was the error: with complete bases a chain that fits the bond evolves exactly, to rounding, at any step size.exact_evolveevolves all2ⁿamplitudes (≤ 20 sites).ising_quenchis the Ising chain fromσˣ = +1as free fermions, at any length:σˣ,σᶻσᶻ, and the echo as|det((Γ₀+Γₜ)/2)|^{1/2}.The DMRG engine is now generic over a
Scalartrait (f64, or the crate's complex type). Real arithmetic keeps its exact operation order, and the DMRG pin is unchanged.hermitian_eigenreduces to a real tridiagonal matrix and then shares the QL iteration.Checked
The free-fermion solution matches exact evolution to
10⁻¹⁰(8 sites, three quenches, echo included). The Krylov exponential matches the dense one to10⁻¹¹, including a step it has to halve.Complete bases: steps of 0.5 match exact evolution to
10⁻¹¹in the state, for Heisenberg from the Néel state and for Ising from a tilted product state.16 sites at bond 8 follow the critical Ising quench to
10⁻⁶inσˣ,σᶻσᶻand the echo.At scale (
tdvp_quench):The quench is critical (
J = h = 1), with step 0.1 and cutoff10⁻²⁰. Until the entanglement fills the bond, the error stays below10⁻⁹and the Loschmidt rate agrees with the exact one to seven digits. After that, the error follows the reported discarded weight, within a factor of three.Cutoff, measured on 40 sites at bond 32 and dt 0.05, error at
t = 2:4·10⁻⁶at10⁻¹²,3·10⁻⁸at10⁻¹⁶,2·10⁻¹⁰at10⁻²⁰(the new default), and4·10⁻¹⁰at 0, where the bond is full and costs three times as much.Lengthening the backward half-step by 0.1 % fails both accuracy tests.
Energy holds to
10⁻⁹over ten truncated steps. Runs are bit-identical at 1 and 5 threads, and complex threaded effective Hamiltonians are bit-identical to single-threaded ones.New pin
tdvp_time_evolution. All 20 pins pass natively and underwasm32-wasip2.Measured, and not kept
A fourth-order composition of the step (Yoshida, three stages) was built and measured on the 40-site critical quench at bond 32. At dt 0.05, 0.1 and 0.2 it was less accurate than second order:
1.1·10⁻⁹against2.3·10⁻¹⁰att = 2, dt 0.05. It was also 3–10× slower, because its backward middle stage entangles the state the next split then truncates. It was removed.CLI
wai-quantum tdvp [--chain ising|heisenberg] [-n N] [--start plus|neel|up] [--bond D] [--dt DT] [--t T] [--cutoff C] [--json]. For the Ising chain fromplus, every report carries the exact free-fermion values beside TDVP's.CI note
The stack below this one (#151, #155, #156) is merged, and 0.3.31–0.3.33 are published.
The macOS runner is single-slot and was about a day behind. Its three WAI legs (energy receipts, byte-equality, conformance) were replicated step by step from the workflow files against the #159 head
aa64bcf1, in a clean worktree with its own target directory. All steps passed.🤖 Generated with Claude Code