+1 vote
asked by (160 points)

Hi,

I am currently working on the implementation of an iTEBD algorithm using iTensor. For this purpose I need to handle MPS with two external "unphysical" indices like the following:

iMPS diagrams

Is it possible to store an iMPS like @@\Theta@@ in panel (ii) using the MPS class of iTensor?

Best,

Markus

1 Answer

0 votes
answered by (70.1k points)
selected by
 
Best answer

Hi Markus,
For infinite DMRG with just two sites you would probably be better off not to use the MPS class. The reason is that the main features it offers have to do with easily changing MPS gauge, but into a different style of gauge (a site-centered orthogonal gauge) rather than the canonical form you are using here.

I think your best approach here would be to just use four tensors G1, L1, G2, L2, say, and when you reach step (ii) just contract them together into a tensor T = L2 G1L1G2L2;

Another thing that could get tricky is that even if you use 4 distinct indices for the virtual indices in diagram (i), there could be steps where too many indices will match when doing the contraction (*) operation. You'll have to put primes on the indices you don't want to contract and carefully make sure each step is doing what you intend.

Something I do when prototyping a new code is to partially contract a few tensors together into a temporary, say "T" then do:

Print(T);
PAUSE

which prints T and pauses the program (PAUSE is a macro that gets included with the ITensor library). After the PAUSE, you can hit enter to continue one more iteration or Ctrl+C to exit.

Let me know if you have more questions.

commented by (100 points)
edited by
Following your suggestion, how could one efficiently input the two-site Hamiltonian?

If I use autoMPO to construct the two-site Hamiltonian, is there a method to convert an MPO to a regular ITensor with indices matching those of G1,L1,G2,L2?
commented by (70.1k points)
Hi, could you say a bit more by what you mean about inputting the two-site Hamiltonian? You should be able to use AutoMPO with just two sites, although it would be a bit of overkill. To convert an MPO to just an ITensor (or IQTensor) that represents the entire Hamiltonian you can multiply all of the MPO tensors together: H.A(1)*H.A(2) for a two-site MPO H.

Another way to make a two site Hamiltonian is just to make ITensors for the single-site operators, multiply them together with the right coefficients, then add them together. You can use the site set (such as SpinHalf or Hubbard) to easily obtain single-site operators, keeping in mind that they are returned as IQTensors so you may need to explicitly convert them to ITensors if that is what you want. For example:

ITensor Sz1 = sites.op("Sz",1);
ITensor Sp1 = sites.op("S+",1);
ITensor Sm1 = sites.op("S-",1);
ITensor Sz2 = sites.op("Sz",2);
ITensor Sp2 = sites.op("S+",2);
ITensor Sm2 = sites.op("S-",2);
auto H = Jz*Sz1*Sz2 + 0.5*Jxy*Sp1*Sm2 + 0.5*Jxy*Sm1*Sp2;
Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...