## Memory saving options in dmrg

How do I use this algorithm? What does that parameter do?
spookyribeye
Posts: 2
Joined: 18 Apr 2019, 16:22

### Memory saving options in dmrg

Somehow I could not find a way to save part of MPO to disk in order to save memory in DMRG. And I really need to do so when doing some large size finite DMRG calculations. Any hints or suggestions would be really appreciated! (Actually, I am not sure if this is already done by default somewhere, if so, may I know the path where the MPO is stored?)
Johannes
Posts: 183
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

### Re: Memory saving options in dmrg

unfortunately, this is currently not implemented in TeNPy
What you need to do is to write a custom tenpy.networks.mpo.MPOEnvironment which stores the tensors to disk instead of keeping them in the _LP and _RP lists. It should suffice to overwrite the get_LP, get_RP, set_LP, set_RP , del_LP, del_RP methods.
For the moment, the easiest way to store the tensors is with pickle.

PS: I assume that you have a large MPO bond dimensions, such that the MPOEnvironment consumes most memory? Otherwise you might even need to store the MPS itself...
spookyribeye
Posts: 2
Joined: 18 Apr 2019, 16:22

### Re: Memory saving options in dmrg

Yes, I attempted to do some finite size DMRG simulations, which lead to a huge memory cost due to the large system size. Thank you so much for the hint. I will let you know when I figure out how to do this.