Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cleanupWrite in localmpo to avoid creating multiple folders when calling dmrg multiple times #372

Open
wants to merge 2 commits into
base: v3
Choose a base branch
from

Conversation

mingruyang
Copy link
Contributor

No description provided.

@mtfishman
Copy link
Member

@mingruyang, these new changes to the density matrix algorithm make the code look more complicated than before. What problems were you seeing before that this fixes? (I mean besides the write to disk, which seems like a good thing to add.)

@mingruyang
Copy link
Contributor Author

The problem before this fix is that it uses huge memory when the MPO's bond dimension is large even if the bond dimension of the MPS is small, because there is a vector of N edge tensor which has 2 bond indices of the MPS and 2 bond indices of the MPO, which make it much bigger than in the DMRG case. When I have a MPS of bond dimension 100 and MPO of bond dimension 100, the density-matrix-apply function uses about 50GB. In addition to write-to-disk, I also change the code to only make a temporary conjugate of each site tensor of the MPS and MPO when constructing the edge tensor at each site, instead of constructing a conjugate of the whole MPS and MPO at a time which is only for one-off use to construct the edge tensor K but exist in the memory all the time until the function returns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants