Skip to content

Alice 0.4.2

Choose a tag to compare

@changkai-zhang changkai-zhang released this 22 Nov 03:09
· 77 commits to stable since this release

Alice 0.4.2 — VUMPS: Corrections and Warm Environments

Release Date: November 21, 2026

Version 0.4.2 corrects two things in VUMPS that an energy could not see, and makes every
environment solve start from the answer of the previous one. The gradient is now the
larger of the two gauge mismatches, where reading one of them alone called a moving state
converged; the '1sp' expansion now acts on the bond in front of the center tensor, the
only bond a forward pass is free to replace, where it was built for the geometry of a
backward sweep. The warm start cuts the unit cells a run absorbs by a factor of two to
three, and the energies are unchanged throughout. Also in this release: a terminology pass
that gives controlled bond expansion the vocabulary it is named for. No breaking API
changes.

📏 The Convergence Measure

  • gauge_tensors returns the larger of |AC - AL C| and |AC - C AR| in place of the
    left mismatch alone. The cost is one contraction per position, well under a percent of
    an iteration and cheaper than any of the polar factors the gauge step already computes.
  • Both mismatches vanish together at a stationary point, and they are equal on a cell no
    pass has touched, so '1s' is unaffected. What the second form catches is a splitting
    sweep: each step writes its answer back as AL C or as C AR, the polar step hands the
    same factor back, and the matching mismatch is therefore zero at every position the pass
    solved. A '2s' or '1sp' run was measuring its own arithmetic on one side.
  • Gradients reported under the splitting schemes are consequently larger than those of
    v0.4.1 on the same state, and they are the honest ones. A run that stopped at grad_tol
    before may now continue, and the discarded-weight floor it rests on is where it should
    have rested all along.
  • Options.grad_tol, Summary.gradients, the module docstrings of vumps and sweep,
    the algorithm page, and the grad_tol help of all four example scripts say what is
    measured in place of restating one side of it.

🧭 The One-Site-Plus Geometry

  • The expansion is mirrored end to end. The complement comes from the right singular
    vectors of the doubly-discarded tensor, it expands the left bond of the
    right-orthonormal tensor of the next site, and the expanded block is one step of the
    right environment over that neighbor. expand_bond takes and returns its tensors in
    the new order, and the center-side projector is now a left-isometric split of the center
    tensor.
  • _update_one_site_plus follows the bond across: the split cuts the center tensor on its
    right, the rotation is absorbed into the neighbor, which stays right-orthonormal, and the
    left-isometric factor of the split carries the streamed left environment onto the new
    bond with no gauge step of its own.
  • Why the old geometry was wrong is a sentence about where a pass leaves the center. A
    forward step ends with the left-orthonormal tensor of the site it solved and the center
    on the bond in front, so the bond it may replace is that one. The v0.4.1 construction
    expanded the bond behind the center, which the pass had already finished with, and
    handed the solve an expanded left environment while the pass streamed its left blocks
    from elsewhere. The energies were right because the expansion preserves the state and
    the solve that follows is variational either way; what was lost was the point of the
    expansion.
  • Everything v0.4.1 said about the construction holds with left and right exchanged: one
    complement factor and not two, the state preserved exactly by filling in the center
    tensor against the expanded neighbor, an exact environment from a single step over that
    neighbor, and nothing on the far side of the bond to expand.

🔥 Warm Environments

  • left_environment and right_environment take an optional guess, as do
    build_right_envs and cell_environments. Only the entering channel of a guess is
    rebuilt: the transfer operator carries that channel to itself, so an error there is a
    fixed point of the iteration as well and would survive to bias the energy. Everything
    else is taken as given, the iteration having one fixed point regardless of where it
    starts.
  • What gets handed over is the pair of blocks the pass itself ends holding, not the
    previous fixed point. The last position a forward pass solves straddles the cell
    boundary, so one step inward on each side lands both blocks on bond 0, the bond the
    final split has just created. The pair therefore fits the next iteration's solves
    whatever the split did to the width of that bond. Previous fixed points would serve
    '1s' alone, whose bonds never move.
  • iMPS.set_canonical returns the per-bond U and Vh that rotate every bond into its
    Schmidt basis, and _diagonalize_gauge hands them up. New rotate_left_env and
    rotate_right_env carry a block across one of those rotations, and every pass ends by
    applying them. Without that step a guess is a right answer in coordinates that no longer
    exist, and the solver spends undoing it the cells it was meant to save.
  • cell_update returns the left block it ends on and leaves the right one on bond 0 of
    the store, so the driver has the pair to pass forward.
  • vumps.Options gains env_warm_start (default True), reported in the startup block.

📐 Measurements

  • Spin-1/2 Heisenberg chain at D = 16, env_tol = 1e-10, two-site cell. Cells absorbed
    over the whole run, cold against warm: '1s' 7150 → 4408, '2s' 82532 → 33624, '1sp'
    81729 → 35820. The energies agree to 1e-13, as they must.
  • Late in a run the per-solve cost separates further: 209 cells cold against 77 warm under
    '2s'. The cold column climbs to a plateau and stays there, since a cold solve pays the
    same price every iteration forever, while the warm column falls away from it as the
    state settles.
  • Wall clock improves by less than cells do — 1.16x, 1.34x and 1.42x for the three schemes
    — the environments being about half of an iteration and the Davidson solves the other
    half.

✒️ Terminology

  • The "widen" family is replaced throughout the sources, tests, documentation, and
    examples by the vocabulary of the scheme's own name: controlled bond expansion expands a
    bond, leaves an expanded neighbor and an expanded basis, and hands the solve an
    environment exact there.
  • Where a passage describes something else — a two-site split, a product cell growing
    under a raised cap, the span of an iMPO — the wording is "grow", so that expansion names
    one mechanism only.
  • The executable part is two local names and one debug line, which now reads
    D = %d (%d expanded). In the tests, TestSolveOnTheWidenedBond becomes
    TestSolveOnTheExpandedBond, with four cases renamed to match.

🧪 Tests

  • tests/algorithm/vumps/test_environ.py (10 new): rotating a block commutes with
    absorbing a unit cell on either side, against bond matrices deliberately not diagonal so
    the rotation is not the identity, and the block comes back tagged as the bond it sits on;
    a solver handed its own answer returns it in a single cell, a foreign state's environment
    does not move the fixed point, and a spoiled entering channel leaves no trace in the
    energy.
  • test_sweep.py (3 new): under each scheme, stripping either rotation makes the warm
    solve cost more cells than the cold one. A transported block can only be measured by
    what it saves, and it is required by a clear margin.
  • test_vumps.py (4 new): each scheme run both ways agrees on the energy, the bond
    dimensions, and the final gradient, and the default is pinned on.
  • test_scheme_1s.py (1 new): a center tensor in exact left-gauge form against a bond
    matrix from another state, the shape every position of a splitting sweep ends in, where
    the left mismatch is zero and only the right one has anything to say.
  • test_infinite.py (1 new): the rotations returned by set_canonical rebuild the stored
    canonical form from what the caller passed in.
  • test_scheme_1sp.py follows the mirrored expansion throughout, checking which axis is
    expanded and the block on the other side of the bond; test_scheme_2s.py and the shared
    cell-update cases follow the wider return of cell_update.

📚 Documentation

  • docs/algorithms/vumps/index.md names the bond a '1sp' step expands and the tensor it
    meets there, describes the gradient as the gauge mismatch with both of its forms, and
    gains a paragraph on the warm start and the order of magnitude it is worth.
  • docs/algorithms/vumps/lessons.md gains Starting From the Previous Answer: cells and
    wall clock for all three schemes cold and warm, the reasoning that turns a starting error
    into a saving in cells, and a subsection on why a reproducible SVD phase convention
    looked like a fix while leaving the block in the wrong coordinates.
  • The v0.4.0 changelog entry keeps the wording it was released with, terminology included.

📊 Statistics

  • 1,779 tests across 47 test modules (up from 1,760 in v0.4.1).
  • 34 commits since v0.4.1.
  • 39 files changed, 1,044 insertions, 377 deletions.
  • 45 source modules in six subpackages: alice.network, alice.physics,
    alice.algorithm.dmrg, alice.algorithm.vumps, alice.algorithm.tdvp,
    alice.algorithm.xtrg.

✅ Compatibility

Breaking Changes: none.

Behavioral Changes:

  • Summary.gradients and the logged gradient report the larger of the two gauge
    mismatches. Under '2s' and '1sp' the numbers are larger than v0.4.1 reported for the
    same state, and a run comparing them against a fixed grad_tol may take more iterations
    or stop on its discarded-weight floor instead.
  • vumps.Options gains env_warm_start, inserted after env_maxiter. Positional
    construction past that field shifts; keyword construction is unaffected.
  • iMPS.set_canonical returns the two lists of per-bond rotations where it returned
    None. Existing calls that ignore the return value are unaffected.
  • cell_update returns a third element, the left block the pass ends on. The environment
    solvers and cell_environments accept an optional guess, keyword-only in every case.
  • A '1sp' run expands the opposite bond of each pair, so its intermediate states differ
    from those of v0.4.1 while the converged energies agree.

Requirements:

  • Python ≥ 3.11
  • PyTorch ≥ 2.5
  • Nicole ≥ 0.4.2

📝 Notes

Both corrections were found the same way, by asking what a forward pass is holding when it
reaches a position instead of what the finite algorithm does at the analogous one. A sweep
that writes AL C back and then measures |AC - AL C| is measuring its own arithmetic, and
an expansion aimed at the bond behind the center expands a bond the pass has already
finished with. Neither showed up in an energy, so both survived a suite that checks
energies against exact answers.

The warm start is the one change here that is purely an accelerator, and the part worth
recording is what it took to get right. Carrying a block across the Schmidt rotation and
pinning the SVD phase so that the rotation is nearly the identity produce nearly the same
saving near convergence, and the second is easier to reach for. It is also wrong: it
compensates for coordinates that do not match instead of making them match, and it left
the one-site scheme, whose rotation is the only non-trivial one, saving the least of the
three.