Heisenberg Chain¶
Ground-state VUMPS for the spin-½ Heisenberg chain, directly in the thermodynamic limit.
The exact energy per site is \(E/N = 1/4 - \ln 2 \approx -0.443147\). Nothing has to be extrapolated away: the state is a uniform MPS on an infinite chain, so the difference from that number is truncation error alone.
1. Setup¶
import alice
alice.configure_logging()
from alice import build_interaction, build_ihamiltonian, init_imps, vumps
from nicole import load_space
2. Build the Hamiltonian iMPO¶
The geometry describes the unit cell, not a chain, so lx is the cell length and bcx is IBC:
config = {
"geometry": {"lattice": "chain", "lx": 2, "bcx": "IBC", "n2x": True},
"model": {"category": "bosonic", "label": "Heisenberg",
"symmetry": "U1", "spin": 0.5, "J": 1.0},
}
interactions, spc, geo = build_interaction(config)
impo = build_ihamiltonian(interactions, geo.L, spc)
print(f"N = {geo.L}, iMPO bond dims: {impo.bond_dims}")
3. Build an initial unit cell¶
A cell of two sites is enough for the uniform ground state. Spin-½ admits no charge-neutral cell of odd length, so init_imps refuses one; see init_imps for why.
4. Run VUMPS¶
opts = vumps.Options(
scheme = '2s',
n_iters = 50,
max_bond = 16,
grad_tol = 1e-10,
env_tol = 1e-8,
)
summary = vumps.run(imps, impo, opts)
import numpy as np
exact = 0.25 - np.log(2)
print(f"VUMPS energy per site: {summary.energy:.10f}")
print(f"Exact energy per site: {exact:.10f}")
print(f"Error: {abs(summary.energy - exact):.2e}")
print(f"Gradient: {summary.gradients[-1]:.2e}")
At max_bond = 16 the energy per site comes out around 5e-5 above the exact value. Growing to 32 or 64 brings it down further; the gradient settles at a floor set by the discarded weight and never falls to grad_tol, the signature of a converged two-site run against a bond cap.
The chain is critical, so env_tol = 1e-8 is deliberate: the environment fixed point converges at a rate set by a correlation length that the bond dimension itself cuts off, and reaching 1e-12 takes more cells than env_maxiter allows. The energy is unaffected either way, so loosening the tolerance is the cheaper of the two fixes. See Lessons.
Running under '1s' instead would strand the state: the one-site scheme can neither grow the bond dimension nor move weight between charge sectors, so from a random initial cell it converges to a stationary point of the sectors that cell happened to carry, roughly an order of magnitude worse in energy.
Command-line script¶
uv run python examples/examples_vumps/vumps_heisenberg.py --cell 2 --bond-dim 16
uv run python examples/examples_vumps/vumps_heisenberg.py --cell 2 --bond-dim 32 --history
uv run python examples/examples_vumps/vumps_heisenberg.py --cell 2 --bond-dim 16 --init product