Conversation
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Reconcile CBE with main after rebase: - migrate CBEDMRG/SketchedExpand to the 3-arg environments(ψ, H, ψ) API (#436 removed the defaulted operator-environments form) - instrument CBEDMRG/cbe_sweep! with TimerOutputs (expand / AC_eigsolve / svd_trunc / sweep / finalize), matching the #431 DMRG/DMRG2 style Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restore the `isnothing(alg.alg_expand)` guard around `changebond!` in the finite TDVP sweep. It was dropped together with the verbosity `withlevel` wrapper during cleanup, so `TDVP()` (default `alg_expand = nothing`) called `changebond!(..., nothing, ...)` — which has no method — erroring for any `AbstractFiniteMPS` (e.g. WindowMPS evolution with an InfiniteMPOHamiltonian). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
leburgel
left a comment
There was a problem hiding this comment.
Too slow to review before this was merged, but I'm giving it anyway just in case there's some things we want to change after the fact.
Everything looks great, but I was wondering: why not do this for infinite MPS right away as well? Is there some obstruction to this?
|
|
||
| # select the dominant directions in the complement of the current state | ||
| g2 = adjoint(NL) * AC2 * adjoint(NR) | ||
| _, _, Vᴴ = svd_trunc!(normalize!(g2); trunc = alg.trscheme, alg = alg.alg_svd) |
There was a problem hiding this comment.
Just as a reminder, should we add a rename trscheme -> trunc to the set of breaking changes for the next breaking MPSKit release?
|
I'll open a follow-up PR to adress your comments.
|
|
Before I forget: the reason why I can't do this for the infinite case directly is that I'm not sure it really works out so easily: it gives the same kind of issues as we have on the boundaries for IDMRG2, which I'm not sure I want to introduce in general (although we should probably investigate if it is possible). The issue for VUMPS is that adding zero-directions creates a state that is hard to gauge (I think), so the canonicalization step might fail. |
Incorporate post-merge review feedback (docstring/wording only): - changebond docstring: drop inaccurate "in place", "enriched" -> "expanded" - OptimalExpand: reword "does not alter the state" -> "state-preserving" to avoid implying out-of-place operation - TDVP: "enriches" -> "expands" the bond Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This is a WIP implementation of a CBE-like expansion scheme based on randomized SVD.
The long story short is that instead of a full twosite (
OptimalExpand) -based approach, we can sketch out this update to select the expansion directions.Mainly I'm still struggling slightly with committing to an interface, and checking what goes where.
I'm somewhat convinced that the
changebond!(as opposed tochangebonds!) abstraction for doing a single expansion on a bond is probably good, but still struggling a bit to see if I want to default this intoDMRG(andTDVP), or get a dedicatedCBE_DMRGalgorithm for it.Interestingly, I think I've set it up in such a way that the various expansion schemes can be used interchangibly, so it is quite modular.
The main source of complexity/messiness is mostly that the
FiniteMPSstructs and environments are very untransparant about what they do, so trying to reuse functionality involves a lot of assumptions on which tensors exactly are where and which ones are used.It would be nice to revisit that at some point, but I also just don't have the time to actually go ahead and do this...
Still to do: