Page 1 of 1

Finite DMRG not working after update to new version

Posted: 12 Mar 2019, 17:02
by Umberto Borla
Hi! After some months I finally decided to update to the newest version of TeNpy, and I found that my code does not work whenever it involves finite DMRG. The error that I get is:

KeyError: "Label not found: '(vR.p1)', current labels: ['(vL.p0)', '(p1.vR)']"

So it seems that something goes wrong with the labeling of the legs. I even tried a clean reinstall of TeNpy, but the problem persists. For example, the example "xxz_corrlength" which uses iDMRG works, while "xxz_groundstate" that uses finite DMRG does not. Reverting to an older version of TeNpy solves the problem. Any idea of what is going on? :)

Re: Finite DMRG not working after update to new version

Posted: 12 Mar 2019, 17:29
by Johannes
I recently changed the order of axes in DMRG from (vR.p1) to (p1.vR) to avoid unnecessary transposes.
However, the newest version should consistently use "(p1.vR)".
Did you actually store some MPS (e.g. with pickle) and load it again?
Or do you restart the whole simulation/initialization of MPS/...?

Re: Finite DMRG not working after update to new version

Posted: 12 Mar 2019, 17:34
by Umberto Borla
Hi! Thanks for the quick reply!
No, I find such error consistently every time I use finite DMRG. Even the example file xxz_groundstate, after a clean reinstall, does not run. Does it run without errors in the version that you have?

Re: Finite DMRG not working after update to new version

Posted: 13 Mar 2019, 09:23
by Johannes
Sorry, that's indeed true. The bug only appeared if you use a mixer and have a model without onsite terms.
Should be fine now ;)

PS: You can also report problems like that as github issues.

Re: Finite DMRG not working after update to new version

Posted: 13 Mar 2019, 10:52
by Umberto Borla
Thanks for the quick fix, it is working as expected now. :)