Running DMRG with storing the PH and Psi into the Disk instead of RAM and use them via I/O

Dear there,

I checked the space complexity of the DMRG code, and I found that the bottleneck is on the variable PH, especially when I considering a 1D system with long range interaction. Then the bond dimension of MPO will become much large than the physical dimension d.

PH is the projected Hamiltonian, which contain the effective hamiltonian of left and right subsystem. However, when we perform local minimization on sites N, we only need PH.L [n]and one PH.R[n+1]. However, PH.L and PH.R for all sites is stored on the memory thus the memory requirement is very high when the bond dimention is large.

I’m wondering if there is a simple way to store PH and Psi into the Disk and visit them via I/O? This will significantly reduce the memory demand.

Thank you for your help!

Min

Yes, it is a good strategy to save RAM, and fortunately we have exactly this feature built in to ITensor’s DMRG code.

To use it, you pass the keyword write_when_maxdim_exceeds=M to our dmrg function, where M is some number you decide. When the allowed maxdim crosses this value, our code will start writing the PH.L and PH.R “environment” tensors to the hard drive or disk and only reading them back into RAM one at a time, as needed.