feat: BUG integrator#468
Open
lkdvos wants to merge 6 commits into
Open
Conversation
Renormalization after each step is now controlled by an explicit `normalize` kwarg on `timestep`/`time_evolve` (default `false`) instead of being tied to `imaginary_evolution`. By default the norm is preserved, so it retains useful information (accumulated truncation error in real time, decaying weight in imaginary time); pass `normalize = true` to renormalize, e.g. for ground-state or thermal-state search. Threaded through the driver and both TDVP/TDVP2 integrators; test norm/imaginary-time expectations updated accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the `BUG` time-evolution algorithm: a symmetric second-order Basis-Update & Galerkin integrator for finite MPS. Unlike `TDVP` it has no backward-in-time substep (stable for imaginary-time evolution); passing a truncating `trscheme` enables rank-adaptivity, growing and shrinking the bond dimension to track the entanglement. Wires up the export, include, docs (`@docs` entry, changelog, Ceruti & Lubich 2022 reference). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add tests for the sequential `BUG` integrator: energy conservation, eigenstate phase, agreement with TDVP, second-order convergence vs dense propagation, imaginary-time cooling, LazySum/time-dependent operators, rank-adaptivity, and symmetric tensors (U(1)/Z2/SU(2), incl. rank-adaptive-symmetric). Plus unit tests for the `_bug_augment_*` basis-augmentation helpers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Remove unused `tolgauge`/`gaugemaxiter` fields from the `BUG` struct and constructor: they are read only for `InfiniteMPS` gauge reconstruction in TDVP, and BUG is finite-only, so they were silently ignored. - Clarify the `BUG` docstring (single-site, symmetric second-order, finite MPS) and correct the `finalize` signature docs (`finalize(t, …)`, not `iter`) in BUG, TDVP and TDVP2. - Document the `normalize` behavior change under changelog "Changed": it is now an explicit kwarg (default false) decoupled from `imaginary_evolution`; imaginary-time evolution no longer renormalizes unless `normalize = true`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lkdvos
force-pushed
the
ld-bug-consolidate
branch
from
July 20, 2026 23:55
21e8388 to
f8a54a2
Compare
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
lkdvos
marked this pull request as ready for review
July 21, 2026 01:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the BUG integrator as an alternative to TDVP. It's a consolidation of part of #454.
The main purpose is to have a stable integrator to be able to handle (large) imaginary or complex time steps in a way that is more stable than standard TDVP since it does not involve a backwards integration.
@Jutho I would be very happy to hear your opinions on this, I'm still not completely sure I've done everything correctly and many parts still confuse me, so a second set of eyes would be greatly appreciated. 🙃