Skip to content

Alice 0.4.1

Choose a tag to compare

@changkai-zhang changkai-zhang released this 20 Nov 07:42
· 113 commits to stable since this release

Alice 0.4.1 — VUMPS: The 1-Site-Plus Scheme

Release Date: November 20, 2026

Version 0.4.1 implements '1sp', the third VUMPS update scheme, which v0.4.0 accepted in
Options and rejected in run(). Before each center-tensor solve it expands the bond the
solve sits on with up to expand_k directions drawn from the complement of the space that
bond currently spans, solves the ordinary one-site eigenproblem there, and splits the
answer to cut the bond back — so the bond dimension adapts as it does under '2s' while
every local solve stays one-site sized. Each of the four algorithms in Alice now carries
the same three schemes. Also in this release: a language regularization pass over the
comments, docstrings, and documentation of the whole tree, and Python 3.13 through 3.15
declared supported. No breaking API changes.

🧬 The 1-Site-Plus Scheme

  • run() accepts scheme='1sp' (with the '1-site-plus' / 'one-site-plus' aliases
    already resolved by Options). _IMPLEMENTED_SCHEMES now holds all three schemes, so
    the NotImplementedError v0.4.0 raised for it is gone.
  • The one-site update ends in a pair of polar decompositions, which discard nothing and so
    cannot replace a bond index: a '1s' run is confined to the bond dimension and the
    charge sectors its initial cell happened to carry. The two-site update escapes that by
    solving a pair and splitting the answer, at a local problem d times larger on each
    side. '1sp' buys the same freedom at the one-site price, by expanding the bond before
    the solve instead of letting a larger solve discover the width on its own.
  • Growth is additive where a split is multiplicative. A two-site split multiplies the bond
    by the physical dimension and is then cut back to max_bond; an expansion adds at most
    expand_k directions per bond per iteration. max_bond and trunc_thresh apply to
    '1sp' exactly as they do to '2s', and Summary.discarded_weights is populated by it.
  • Like '2s', it needs a unit cell of at least two sites, and cell_update refuses a
    one-site cell with a ValueError naming the two ways out: scheme='1s', or the same
    state described on a doubled cell. The expansion acts on the bond between a site and its
    neighbor, and on a one-site cell those are the same site, so it would read the bond it is
    about to replace.

🧩 The Complement Isometry

  • New alice.algorithm.vumps.complement with expand_bond, split_center, and
    discarded_weight. The construction follows TDVP's '1sp'
    (alice.algorithm.tdvp.complement): the iMPO is applied independently from the left and
    from the right to a cheaply factored two-site tensor, the kept subspace is projected out
    of each half, and the SVD of the doubly-discarded outer product supplies the new basis
    vectors.
  • One side, not two. A VUMPS pass reaches bond j with the left-orthonormal tensor of
    the site behind it and the center tensor of the site in front, which is the geometry of a
    backward half-sweep in the finite algorithms. So only one of the two complement
    factors the finite code carries is ever used here, the one facing the neighbor, and the
    module is correspondingly half the size of its TDVP counterpart.
  • Exact state preservation. Concatenating complement vectors onto both tensors would
    move the state, since Θ = AL ⊗ AC picks up the extra outer product. Only the neighbor
    is expanded by oplus; the center tensor is then filled in by projecting Θ onto the
    expanded neighbor basis, AC_exp = AL_exp† · Θ, which reproduces Θ exactly because the
    expanded basis contains the old one. Writing it as a projection instead of as a zero
    padding keeps it exact even where the complement is not perfectly orthogonal to the kept
    space.
  • Exact expanded environment, and nothing else to expand. The left environment facing
    the expanded bond is a single step_left_env call over the expanded neighbor, which keeps
    the cross blocks between AL and the complement, so the effective Hamiltonian of the
    solve that follows is exact. Nothing on the AR side has to be expanded at all: the
    right block being read sits on the bond behind the one being expanded, and the bond
    matrix comes out of split_center and not out of an eigenproblem of its own.
  • Orthonormal projectors. The neighbor side projects against the tensor itself, which
    is exactly isometric there and whose whole column space the complement has to miss for
    the expanded neighbor to stay isometric. The center side cannot: M M† is a projector
    only for an isometry and a center tensor is not one, so new _center_isometry_right
    returns the isometric factor of a one-site split of it, spanning the same space. What
    must not be used there is the isometric factor of Θ, orthonormal though it is —
    decomp keeps every sector at full dimension regardless of rank, so that factor can
    span the entire (bond, physical) space and project the complement away entirely.

🔇 The Noise Floor

  • expand_k is a cap, not a request. A bond gains however many directions its complement
    actually holds, and asking for more than exist is the ordinary case, not an edge case.
  • Θ'_disc is a difference of quantities of size ‖lh‖ · ‖rh‖, so that product — not
    Θ'_disc itself — sets the scale at which its entries stop being meaningful. Anything the
    SVD reports below 1e-10 times that product was manufactured by the subtraction, lies in
    the kept space, and would destroy the neighbor's isometry and move the state if
    oplus-ed onto the bond. A relative threshold cannot do this job, shrinking with exactly
    the quantity whose smallness is the thing to detect.
  • The same absolute floor gates the expansion as a whole and each singular value within it,
    and the whole-tensor test is made on Θ'_disc and not on the two discarded halves
    separately: each half can keep a sizable remainder while their contraction cancels it,
    as happens on a product state, every bond there being out of the iMPO's reach. An
    SVD cannot report it, since handed an exactly zero block decomp returns a unit-norm
    singular vector anyway.
  • A bond with no complement — saturated, or simply out of the iMPO's reach from the current
    state — is left alone, and the step degenerates into a plain one-site update with the
    environment that update would have used anyway.

🔁 The Sweep

  • New _update_one_site_plus in sweep.py, dispatched from cell_update. The step at
    bond k+1 expands it, solves the one-site center problem on the expanded bond with the
    solver and arithmetic scheme_1s already provides, measures the weight the split is
    about to discard, splits with split_center, and absorbs the rotation into the neighbor.
    Only that bond changes, as under '2s', so the next step starts from something
    consistent and the cell still tiles at the end.
  • Like the two-site pass it is a sweep in the finite sense, for the same reason: the split
    replaces the index on the bond, so the pass has to reach that bond with a left
    environment built on the index the previous split left behind. The module docstring now
    separates the three schemes by that distinction — the one-site pass walks in order only
    to carry one environment block instead of N, while the other two have no choice.
  • The environments work out as under '2s', with one simplification: the expansion needs
    no environment of its own, so the expansion and the solve read the same right block and
    the sliding window still advances by one per step. env_window = 2 remains the smallest
    value any scheme runs at.
  • split_center hands back factors ready to use as they are. U rotates the neighbor onto
    the truncated bond, S is the bond matrix, already diagonal and so already in the
    Schmidt basis iMPS.set_canonical expects, and Vh is the right-orthonormal tensor of
    the site. The gauge step of the one-site scheme reproduces those factors unchanged, so
    the side just solved carries no gradient and nothing has to be divided by a bond matrix.
  • discarded_weight repeats the bipartition to recover the truncation report decomp does
    not surface. The second decomposition runs once per bond per iteration, against a
    Davidson solve that has already cost many applications of the effective Hamiltonian.

⚙️ Options

  • vumps.Options gains expand_k (default 4) and expand_alpha (default None), used
    only by '1sp' and matching the names the other three algorithms already use.
  • expand_k sets how many directions are offered, and so both the quality of the expanded
    space and how fast the state can grow. expand_alpha truncates the internal bond of the
    cheap factorization of Θ, which keeps the expansion cheap against the Davidson solve it
    precedes; None keeps the full bond, making the expansion exact and its half-applications
    no cheaper than a two-site solve. round(sqrt(max_bond)) is a reasonable starting point
    for both.
  • run() logs expand k and expand alpha in the startup block when scheme='1sp'.
  • The option docstrings are rewritten wherever they said "the two-site scheme" and now mean
    "either scheme that splits": max_bond, trunc_thresh, grad_tol and its
    discarded-weight floor, and the gradient's behavior against a bond cap that bites.

📐 Measurements

  • Spin-1/2 Heisenberg chain, two-site cell, product start, max_bond = 16, 50 iterations:
    '1sp' lands 4.6759e-05 above 1/4 - ln 2 in 57 s, where '2s' lands 4.6841e-05
    above it in 85 s. The same accuracy on the same bond dimension, a third faster, and both
    resting on their discarded-weight floor (5.78e-04 and 5.71e-04) and not on
    grad_tol.
  • Majumdar-Ghosh point from a product cell, where the exact ground state needs bond
    dimension two: '1sp' reaches -0.374999991443 in one iteration, which is 8.56e-09
    from exact and the precision of Alice's U(1) spin tables, digit for digit what '2s'
    reaches from the same start. Under SU(2) the dimer state is already a width-one cell, so
    neither scheme has anything to expand and both land at 1.78e-15.

🧪 Tests

  • New tests/algorithm/vumps/test_scheme_1sp.py covering the expansion piece by piece:
    the state unchanged across cells of two and four sites, the bond growing by at most what
    was asked for, the neighbor still orthonormal afterwards, the center-side basis spanning
    the center tensor, a saturated bond left alone, the floor rejecting a vanishing
    complement, and a cheaper alpha still expanding the bond. TestSolveOnTheWidenedBond
    pins that the solve on the expanded bond cannot do worse than the plain one and that the
    expanded effective Hamiltonian is Hermitian; TestSplit covers reconstruction,
    orthonormality, the cut back down, and nothing discarded without a cap.
  • The shared TestCellUpdate cases in test_sweep.py are parametrized over all three
    schemes, and new TestOneSitePlusCellUpdate covers growth from a Néel cell whose every
    bond is one-dimensional, growth capped by expand_k, growth respecting max_bond over
    several iterations, a discarded weight reported under a cap that bites, and the one-site
    cell refusal. The scheme-rejection test now uses a name that is not a scheme, since
    '1sp' is no longer the unimplemented one.
  • New driver coverage in test_vumps.py: the dimer reached from a product state under both
    '1sp' aliases, '1sp' and '2s' landing on the same energy from the same start,
    '1sp' under SU(2) to 1e-11, growth capped by max_bond and by expand_k, and a
    truncated expand_alpha landing where the full expansion does.

📚 Documentation

  • docs/algorithms/vumps/index.md gains a Controlled bond expansion section: where the
    directions come from, why the local problem stays one-site sized while the bond still
    grows, what the two knobs do, and the two facts that make the step safe — the state never
    moves, and a bond with no complement is detected instead of expanded on roundoff. The
    scheme table lists '1sp' in place of the forward-compatibility note, and the claim that
    '2s' is the only scheme that can grow a bond is gone from the table, the gradient
    section, and the Options docstring.
  • docs/algorithms/vumps/options.md shows the two expansion keys in a TOML block.
  • The README's VUMPS paragraph counts three update schemes.

📝 Examples

  • All four VUMPS example scripts accept --scheme 1sp and expose --expand-k and
    --expand-alpha, with the product-state initialization now pointing at '2s' or
    '1sp' wherever it used to name '2s' alone. Each script's header and --help examples
    gain a 1sp line.

✒️ Language Regularization

  • The prose of comments, docstrings, and Markdown documentation across src/, docs/,
    tests/, and examples/ is brought in line with the Language section of the project
    conventions: 194 occurrences of "rather than" reconsidered and mostly recast as "instead
    of", "not", "in place of", or dropped entirely; the 38 which is what pivots and the
    which is why / which is how ones removed in favor of stating the consequence
    directly; and bare is what clefts kept only where the emphasis carries weight.
  • Each site was a judgment call and not a find-and-replace, so a handful of contrasts
    survive where what follows is already present in the code or alarming enough to name.
  • Two terminology fixes: the one misuse of "leg" for an index, in
    tests/algorithm/tdvp/test_scheme_2s.py, and the one British spelling, labelled in
    src/alice/network/autoimpo.py.
  • Nothing in the pass changes behavior. The one runtime string it touches is the
    gauge-fixing two-cycle message in iMPS, and no test matched on the affected fragment.
  • The survey found the rest of the conventions already satisfied: no Sphinx-style docstring
    fields, no ::, no stray double backticks, no eagerly evaluated forward references.

📦 Packaging

  • Python 3.13, 3.14, and 3.15 are declared in the trove classifiers; requires-python
    stays at >= 3.11.
  • The README's Python badge is static (Python ≥ 3.11) in place of the dynamic
    pypi/pyversions one, which reported whatever the last published release happened to
    declare, and the PyTorch badge follows the same ≥ 2.5 form.

📊 Statistics

  • 1,760 tests across 47 test modules (up from 1,728 / 46 modules in v0.4.0).
  • 55 commits since v0.4.0.
  • 92 files changed, 1,864 insertions, 512 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:

  • vumps.run no longer raises NotImplementedError for scheme='1sp'; it runs the
    scheme. Code catching that exception to fall back to '2s' will no longer see it.
  • vumps.Options gains two fields, expand_k and expand_alpha. Positional construction
    of Options past env_window shifts accordingly; keyword construction is unaffected.
  • cell_update raises ValueError for '1sp' on a one-site unit cell, where it
    previously raised NotImplementedError for the scheme itself.
  • The gauge-fixing two-cycle message of iMPS is reworded. A test matching on "rather than
    onto themselves" needs updating; nothing in Alice's own suite did.

Requirements:

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

📝 Notes

With '1sp' in place, every algorithm in Alice offers the same three schemes, and they
divide the same way in all four. '1s' discards nothing and optimizes within the bond
dimension and the charge sectors it was handed. '2s' solves a larger local problem and
splits it, and the split is where its freedom to grow comes from. '1sp' separates those
two things: the freedom comes from a complement search run before the solve, and the solve
itself stays small. Read a '1sp' run as a '2s' run, with discarded_weights as the
accuracy diagnostic and max_bond as the knob.

What is new here is how little of the finite machinery the infinite case needs. A VUMPS
pass always meets a bond with the neighbor behind it and the center in front, so only one
of the two expansion directions the finite algorithms implement exists at all; and the
expanded bond is always the one in front of the block being carried, so a single step over
the expanded neighbor puts an exact environment on it, with nothing on the other side to
expand and no block-diagonal assembly to get wrong. The asymmetry that made the
environments awkward in v0.4.0 — one side streamed, one side stored — is the reason the
expansion comes simpler.