Repository navigation
Add CheckpointedProjMPO: exact low-memory environments - #228
Open
NihalShriv wants to merge 1 commit into
Open
NihalShriv wants to merge 1 commit into
NihalShriv wants to merge 1 commit into
Conversation
Keeps every k-th environment block (default k = round(sqrt(N))) plus the blocks next to the current position, and rebuilds dropped blocks from the nearest stored one. Same contractions as ProjMPO, so DMRG/TDVP results are identical; memory ~ N/k + 2k blocks instead of N. Implements ITensor#227.
This branch has not been deployed
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.
Implements #227.
CheckpointedProjMPO(H; k)is a drop-inAbstractProjMPOthat stores only everyk-th environment block (plus the blocks next to the current position) and rebuilds dropped ones from the nearest stored block when a sweep moves back onto them.ProjMPOdoes, sodmrg/tdvpresults matchProjMPO.N/k + 2kblocks instead ofN(defaultk = round(√N)), for about one extra environment update per site and sweep.after_drophook, e.g.() -> (GC.gc(false); CUDA.reclaim())to return GPU memory right away.Changes
src/abstractprojmpo/checkpointedprojmpo.jl(new), included and exportedtest/base/test_checkpointedprojmpo.jl: DMRG energies/states matchProjMPOfor k = 1, 3, 4, 7; TDVP state matches; fewer blocks stored; with and without QNsdocs/src/ProjMPO.md; exported-names test list updated; version 0.4.2 → 0.4.3itpkgfmtLocal: new tests 24/24 and exports test 180/180 pass (Julia 1.12). Aqua shows the same 3 failures as on
main(ambiguities, unbound type params, piracy), none from this file.Happy to adjust the design, e.g. make it a keyword option of
ProjMPOinstead of a new type. A same-design PR is under review in TeNPy (tenpy/tenpy#713).