jcmgray / quimb

A python library for quantum information and many-body calculations including tensor networks.
http://quimb.readthedocs.io
Other
467 stars 107 forks source link

Real time evolution of MPS with long range interactions #67

Closed ermalrrapaj closed 3 years ago

ermalrrapaj commented 3 years ago

Hi, I was wondering if it was possible to perform real time evolution of an initial MPS wavefunction with a Hamiltonian that has long range interactions? If this information is already provided in the documentation, sorry for the hassle and could you direct me to it? I looked at the tutorial for TEBD+MPS and if I am not wrong it is explicitly stated that it works only for nearest neighbor interactions. However, hopefully it could be adapted for interactions between spins a a bit further apart (for instance XIIIX + YIIIY+ ZIIIZ in the Hamiltonian etc) Thank you, ermal

jcmgray commented 3 years ago

Hi Ermal,

I'm afraid you have interpreted the docs correct - currently the 1D TEBD only allows nearest neighbor interactions. I don't myself have any immediate plans to implement this though it would of course be nice to have!

However, new 2D functionality (in the tensor_2d branch currently) does have TEBD that supports long range interactions, and of course you can just set one direction to be length = 1. I haven't tested this 'effective' 1D chain and real time evolution myself so it might require a few small tweaks however.

ermalrrapaj commented 3 years ago

Hi Johnnie, Thank you for your prompt reply. I had a quick look at the 2D tensor and yes it does have TEBD, but like you mentioned, it supports imaginary time evolution for now. I will see if it can be tweaked for my purposes, but it may be simpler to just try and apply a bunch of swap gates to the MPS in 1D. Anyways, I think this issue could be closed for now. Thank you, again.

jcmgray commented 3 years ago

Sure thing, you can call:

mps.gate(G, (i, j), contract='swap+split', cutoff=1e-8, ...)

and it will do the swapping for you. But obviously for TEBD you also need to find a trotterization, which is slightly more complex for long range gates (the LocalHam2D object can do this automatically) , and probably keep track of the canonization center more carefully for efficiencies sake.

ermalrrapaj commented 3 years ago

Hi, thank you for the suggestion. I had one more question, if you don't mind helping some more. I was thinking of 2 was to go about it: (1) Let's assume I have an order established for my trotterization (say I either do it myself or adapt the routines in LocalHam2D for 1D). In TEBD you canonize after every operation in a sweep, should I do the same after every operation in my list?

(2) I can group my pair operations in sets: nearest neighbor, next to nearest neighbor, next to next etc. Then I could do a modified sweep for each case, and it should take care automatically of the canonization center. Do you expect this to work?

I understand my questions might be a bit hard to answer without actually trying out each case first, but I was hoping you'd have better intuition on how to proceed and perhaps save me some time and headaches.

jcmgray commented 3 years ago

Just to briefly comment:

  1. You'd want to divide your terms up into commuting groups (an edge coloring of the graph is one way to do this). In all likelihood you will want to mix NN, NNN etc in each group since e.g. XIIX commutes with IXXI so you can apply these in the same layer.

  2. Once you have your groups, I'd sort them by site, then progress through applying each whilst keeping track of/moving the orthogonality center (you can move it around with shift_orthogonality_center, and by using absorb='left' etc when applying the actual gate) .