How to define a infiniteT MPS under canonical ensemble

How do I use this algorithm? What does that parameter do?
Post Reply
yasin
Posts: 4
Joined: 08 Nov 2020, 12:08

How to define a infiniteT MPS under canonical ensemble

Post by yasin »

I want to run Purification.TEBD with a initial MPS under canonical ensemble. The way I use to creat such a MPS is psi = PurificationMPS.from_infiniteT(M.lat.mps_sites(), bc=bc), but it gives me a grand canonical ensemble result. I want to conserve some charges, for example, I want to conserve the total number of boson. But I dont know How to do it. I use

Python: Select all

psi.gauge_total_charge([10])
to conserve the number to 10. But when I print

Python: Select all

psi.get_total_charge(only_physical_legs = True)
, it is still [0] while

Python: Select all

psi.get_total_charge()
print [10]. I see my block

Python: Select all

for i in range(L): print(psi._B[i].qtotal)
where L is my chain length, I will get [0] [0] ... [10], only the final one is [10]. Thus I dont understand how to get a canonical ensemble MPS. And PHYSICAL REVIEW B 94, 115157 (2016) is not very clearly for me.
User avatar
Johannes
Site Admin
Posts: 457
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: How to define a infiniteT MPS under canonical ensemble

Post by Johannes »

This wasn't implemented yet in TeNPy , as you have probably seen by the ToDo entry.

However, since today, it is: 64cd7a3a690e80b2876fce48e79675f060b52ab7 ;)

The function from_infiniteT_canonical gives you an initial density matrix with fixed particle number on the physical sector, i.e. the canonical ensemble at infinite temperature.
It follows Sec. VI C of Barthel's arXiv:1607.01696.

Could you please do me a favor and make sure that this actually works? I wrote some quick tests which check that the infinite-T density matrix is what it should be. But it would be good to compare e.g. the magnetization in the TFIChain as a function of beta with results from exact diagonalization.

yasin
Posts: 4
Joined: 08 Nov 2020, 12:08

Re: How to define a infiniteT MPS under canonical ensemble

Post by yasin »

Thanks for your replay and the update of Tenpy. I see the function from_infiniteT_canonical, it may be helpfully. But you can’t be sure if it will actually work. Before tring your suggest, I try a bose case (the Bose Hubbard Chain). I want to control the total number of bosons \(N\) to 10 and use TEBD to get \(N\) as a function of \(\beta\). The result as I show below, the total number semms to change with \(\beta\) and finally tends to a no-ten number. Could this be due to errors? But this error is relatively large.

Attachments
1612859502(1).png
1612859502(1).png (39.06 KiB) Viewed 8867 times
User avatar
Johannes
Site Admin
Posts: 457
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: How to define a infiniteT MPS under canonical ensemble

Post by Johannes »

I played around with this a little bit. When you choose a smaller time step, the error gets smaller, it's O(dt). Further, I noticed that the error is coming from the state not being in canonical form: If you call psi.canonical_form_finite() right before measurements, at least this error is gone, as you would expect for a state conserving total N. I'm still a bit worried, though, because I don't really understand where the error comes from in the first place. I know that this is an issue if you do the even-odd trotterized "brick-wall" update, but I thought we're doing the imaginary time evolution with left-right sweeps here, which I believed to cure this issue.
As an alternative, can you try out the tenpy.algorithms.purification.PurificationApplyMPO? This one might go around the issue at all.

User avatar
Johannes
Site Admin
Posts: 457
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: How to define a infiniteT MPS under canonical ensemble

Post by Johannes »

Since there was another question coming back to this: I do understand this now.

The error comes from the fact that the imaginary TEBD algorithm applies non-unitary 2-site gates, which change the state and in general also singular values on other bonds. After one update sweep, we end with A S B B B B form, and those tensors are the correctly evolved state, as we can see from calling psi.canonical_from() on that state before evaluating expectation values. However, the S starting on the third bond are not exactly correct, due to the additional evolution that happend since we last updated them - that's an O(dt) update, so we get an O(dt) error.
User avatar
Johannes
Site Admin
Posts: 457
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: How to define a infiniteT MPS under canonical ensemble

Post by Johannes »

The fix is here: PR #414
Post Reply