Skip to content

Alice 0.3.1

Choose a tag to compare

@changkai-zhang changkai-zhang released this 21 Oct 15:48
· 382 commits to stable since this release

Alice 0.3.1 — TDVP: The 1-Site-Plus Scheme

Release Date: October 21, 2026

Version 0.3.1 implements '1sp', the third TDVP update scheme, which v0.3.0 accepted in
Options and rejected in run(). Before each local update it widens the bond ahead of
it with up to expand_k directions drawn from the complement of the space that bond
currently spans, evolves over the widened space, and truncates back — so the rank adapts
as it does under '2s' while every local exponential stays 1-site sized. It is an
adaptive-rank scheme of the '2s' kind at close to 1-site cost, and it is free of the
frozen-product-state trap. 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.3.0 raised is gone.
  • Where '1s' and '2s' split one fixed tangent-space projector, '1sp' rebuilds the
    space it projects onto at each bond out of the state it finds there, as the sweep
    reaches it. Every local update is still a 1-site exponential.
  • Its irreversibility is structural rather than incidental: the expansion is chosen from
    the state the step begins in, so forward and backward steps do not widen the bond into
    the same subspace. The deviation enters at the order of the integrator error and falls
    as dt², so it is bounded by the accuracy already being asked for — but '2s' is the
    scheme to use where exact reversibility is the point of the calculation.
  • expand_k = 0 leaves the complement empty, stops the rank from moving, and degenerates
    a '1sp' sweep into a '1s' sweep exactly. That is a control, not a corner case: it
    separates an error in the expansion from an error in the integrator around it.
  • A bond of dimension 1 has a complement like any other, so a quench from a product state
    evolves under '1sp'. The frozen-bond warning now recommends '2s' or '1sp'.

🧩 The Complement Isometry

  • New alice.algorithm.tdvp.complement with expand_forward and expand_backward, which
    return the expanded center tensor, the expanded neighbor, and the environment facing
    the widened bond. The construction follows DMRG's '1sp' scheme
    (alice.algorithm.dmrg.complement) and reuses its factored structure: H is applied
    independently from the left and from the right to a cheaply factored 2-site tensor, the
    kept subspace is projected out of each half, and the SVD of the resulting
    doubly-discarded outer product supplies the new basis vectors.
  • Exact state preservation. Concatenating complement vectors onto both tensors
    would move the state, since Θ = M_i ⊗ M_i1 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, M_i_exp = Θ · M_i1_exp†, which reproduces Θ exactly
    because the expanded basis contains the old one. This is the TDVP counterpart of the
    exact fill-in in alice.algorithm.xtrg.complement.
  • Exact expanded environment. The environment facing the widened bond is built by a
    single step_*_env call over the expanded neighbor, which keeps the cross blocks
    between M_i1 and the complement. Assembling it block-diagonally from the two pieces,
    as DMRG does, drops those blocks — cheap for an initial guess, but a perturbed H_eff
    would perturb the trajectory itself.
  • Orthonormal projectors. The neighbor side projects against the site tensor itself,
    which is exactly isometric there. The center side cannot: M M† is a projector only
    for an isometry, and in a TDVP sweep the center tensor is not one, so a 1-site split of
    it supplies an orthonormal basis of the same space instead. 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, which for a short-range Hamiltonian is typically one or two per update.
  • Θ'_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,
    carries no direction, and in measured cases overlaps the kept space completely.
    oplus-ing such a vector would duplicate a kept direction, destroy the neighbor's
    isometry, and move the state.
  • A relative threshold cannot do this job: taken against Θ'_disc it shrinks with exactly
    the quantity whose smallness is the thing to detect, which lets a bond whose complement
    is pure noise pass every test and expand on garbage.
  • The same absolute floor gates the expansion as a whole and each singular value within
    it. The whole-tensor test has to be made on Θ'_disc rather than on the two discarded
    halves separately: each half can keep a sizable remainder while their contraction
    cancels it, which is what happens wherever H cannot yet act across the bond — on a
    product state, at every bond away from the excitation. The 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 H's reach from the current
    state — is left alone, and the expansion hands back the environment the 1-site step
    would have used anyway.

🔁 Sweeps and Truncating Splits

  • New _forward_1sp / _backward_1sp half-sweeps in sweep.py, dispatched from
    forward_sweep and backward_sweep, reusing every piece of local arithmetic from
    scheme_1s — a 1-site-sized update being the same arithmetic whatever space it is
    carried out on.
  • Each site expands the bond ahead of it, evolves the expanded tensor forward by dt,
    splits with truncation to cut the bond back under max_bond / trunc_thresh keeping
    whichever directions the evolution populated, then back-evolves the exposed bond tensor
    by -dt and absorbs it into the expanded neighbor. The site at the far end has no
    neighbor to expand into and takes no back-evolution.
  • The zero-site step spans two bonds rather than one: C is rectangular, carrying the
    truncated bond on the axis the freshly built environment was formed over and the
    expanded bond on the axis facing the expanded environment. That is what keeps it exact.
  • split_forward and split_backward in scheme_1s.py gain an optional trunc
    forwarded to decomp, defaulting to None. '1s' always passes None and nothing
    else in that module truncates; '1sp' passes the run's truncation.
  • Summary.discarded_weights is populated by '1sp' as it is by '2s', measured once
    per half-sweep at the mid-chain bond.

⚙️ Options

  • tdvp.Options gains expand_k (default 4) and expand_alpha (default None), used
    only by '1sp' and matching the DMRG and XTRG option names. max_bond and
    trunc_thresh now apply to '1sp' as well.
  • expand_alpha truncates the internal bond of the cheap factorization of Θ, which is
    what keeps the complement search below 2-site cost; None keeps the full bond, making
    the search exact and the step no cheaper than '2s' per bond.
  • run() logs expand k and expand alpha in the startup block when scheme='1sp'.
  • The guidance for the expansion options across all three algorithms is now
    round(sqrt(max_bond)) rather than a bare 4, in tdvp.Options, dmrg.Options, and
    xtrg.Options.

🧪 Tests

  • New tests/algorithm/tdvp/test_complement.py (749 lines) covering the expansion piece
    by piece: the cheap factors and their isometry, including the case where the factor of
    Θ spans more than the center tensor; the center-side orthonormalization and the
    demonstration that the center tensor itself is not a projector; the two half
    contractions reassembling H·Θ̃; the discarded-space projections and their
    idempotence; complement detection on a bond that has one, on a saturated bond, and on a
    vanishing doubly-discarded tensor; and the expansion end to end — bond growth, state
    preservation, effective energy and norm unchanged, neighbor isometry retained, the
    fill-in matching zero padding, chain-edge bonds, and alpha truncation still
    preserving the state. TestNonAbelian repeats the core cases on an SU(2) Heisenberg
    chain.
  • New TestTruncatingSplits in test_scheme_1s.py: isometry surviving truncation,
    nkeep capping every sector, bond-tensor orientation, and the lost weight matching the
    reported discarded weight in both sweep directions.
  • New coverage in test_sweep.py for bond growth, max_bond, the reported discarded
    weight, the expand_k = 0 reduction to '1s', and a frozen product state opening; and
    TestExpansionReversibility, which checks that the deviation on reversing a run shrinks
    quadratically with dt.
  • New TestFreeFermion1SitePlus and TestMeltingDomainWall in test_physics.py,
    validating '1sp' against the analytic single-particle propagator and the exact
    correlation matrix, with a domain_wall fixture and its reference added to
    conftest.py.
  • New TestExpansionDriver in test_tdvp.py: achieved bond growth, a discarded weight
    per step, max_bond respected, the expansion settings logged, a resumed run
    reproducing an uninterrupted one, and every recognized scheme now being implemented.

📚 Documentation

  • docs/algorithms/tdvp/index.md gains a Controlled Bond Expansion section — how the
    widening is computed, the expand_k / expand_alpha table, why expand_k is a cap and
    not a request, the escape from the frozen-product-state trap, and an admonition on the
    scheme not being exactly time-reversible. The scheme table lists '1sp' in place of the
    forward-compatibility note.
  • docs/algorithms/tdvp/options.md gains a Choosing expand_k section: what too
    small and too large a value look like, the round(sqrt(max_bond)) starting point, and
    expand_k = 0 as a control.
  • New docs/examples/tdvp/scheme-comparison.md, the page to read when choosing a scheme:
    the three schemes separated by where their bond dimension comes from, why the melting
    domain wall is the test case that exercises both the frozen start and the growing front,
    the side-by-side output, the expand_k scan, and the dt scan showing the expansion
    adds no error floor of its own.

📝 Examples

  • examples/examples_tdvp/tdvp_scheme_comparison.py: '1s', '1sp', and '2s' run on
    one free-fermion quench from a half-filled product state and scored against the exact
    correlation matrix, with --expand-k-scan and --dt-scan modes. '1s' stays frozen at
    bond dimension 1 with every conservation law intact; '1sp' and '2s' both land within
    9e-05 of the Gaussian solution, '1sp' carrying a smaller bond profile (38 against 46
    at the center) because it only ever adds directions the complement offers.

📊 Statistics

  • 1,313 tests across 38 test modules (up from 1,211 / 37 modules in v0.3.0).
  • 30 commits since v0.3.0.
  • 17 files changed, 3,109 insertions, 84 deletions.
  • 35 source modules in five subpackages: alice.network, alice.physics,
    alice.algorithm.dmrg, alice.algorithm.xtrg, alice.algorithm.tdvp.

✅ Compatibility

Breaking Changes: none.

Behavioral Changes:

  • tdvp.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.
  • tdvp.Options gains two fields, expand_k and expand_alpha. Positional construction
    of Options past trunc_thresh shifts accordingly; keyword construction is unaffected.
  • The frozen-bond warning text now reads "Use scheme '2s' or '1sp', or warm up with one of
    them until every bond has opened." Tests matching on the old wording need updating.

Requirements:

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

📝 Notes

'1s' is an exact splitting of one fixed tangent-space projector, which is why it
conserves norm and energy to roundoff, discards nothing, and reverses to roundoff — and
also why it cannot leave the manifold it started on, the restriction that freezes a
product-state quench entirely. '1sp' gives all of that up: it assembles the space it
projects onto afresh at every bond, truncates each bond it has widened, and carries the
resulting discarded weight. Read a '1sp' run the way a '2s' run is read, with
discarded_weights as the accuracy diagnostic and max_bond as the knob.

What it buys is '2s' accuracy at close to '1s' arithmetic, and it can reach that
accuracy on a smaller bond profile, because a complement search only offers directions H
can actually reach the state through, where a 2-site SVD keeps whatever clears its
threshold. The cost is paid in exactness. The expansion is chosen from the state the step
begins in, so a reversed run does not retrace its path; the deviation is of the order of
the integrator error and falls as dt², which makes it a bounded price rather than a
hidden one, but it is a real difference from both other schemes.

The implementation lesson is about thresholds. The doubly-discarded tensor is a difference
of two large quantities, and near a bond H cannot yet act across, that difference is
nothing but cancellation. An SVD has no way to say so — handed a zero block it returns a
unit vector regardless, and that vector lies in the kept space rather than the complement,
so expanding on it breaks the neighbor's isometry and moves the state. The first
formulation tested the complement relatively, against Θ'_disc itself, which fails in
exactly the case that matters: the threshold shrinks with the quantity whose smallness is
the thing to detect. The floor that works is absolute, taken against the product of the
two half-norms the cancellation happened on, and it gates the expansion as a whole and
each direction within it alike.