Tracking DMRG progress in ITensors

I’m using ITensors to do some DMRG calculation. When running dmrg(H, ψ_0, sweeps), is there a way to track the progress? For example, if I want to displa a progress bar to keep an eye on the calculation, what should I do?

1 Like

Hi, thanks for the question. Currently, the way we let you keep track of the progress is that the dmrg function prints a line of output after each DMRG sweep is completed. Are you seeing that kind of printout? If you want a more detailed printout, you can adjust the outputlevel keyword argument. For example, calling DMRG as dmrg(H,psi,sweeps; outputlevel=2) will show more information about every single step of DMRG, and not just each sweep.

The idea of having a progress bar is an interesting one. I think we have been planning to look into it, although the current approach of printing text has the advantage of letting us report details like the accuracy (truncation error) currently reached.

Finally, we have a very customizable system called the “Observer” system which lets you customize the output of our DMRG code, in essentially an arbitrary way. It may interest you to learn about and use this system. Here is some documentation about it with detailed examples:
https://itensor.github.io/ITensors.jl/dev/Observer.html

1 Like