Finite DMRG not working after update to new version

How do I use this algorithm? What does that parameter do?
Post Reply
Umberto Borla
Posts: 18
Joined: 23 Jul 2018, 09:23
Location: Technical University Munich

Finite DMRG not working after update to new version

Post 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? :)
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Finite DMRG not working after update to new version

Post 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/...?
Umberto Borla
Posts: 18
Joined: 23 Jul 2018, 09:23
Location: Technical University Munich

Re: Finite DMRG not working after update to new version

Post 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?
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Finite DMRG not working after update to new version

Post 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.
Umberto Borla
Posts: 18
Joined: 23 Jul 2018, 09:23
Location: Technical University Munich

Re: Finite DMRG not working after update to new version

Post by Umberto Borla »

Thanks for the quick fix, it is working as expected now. :)
Post Reply