+1 vote
asked by (160 points)

Hi Miles,

I tried to apply an MPO to a wave function obtained by IDMRG . Are the existing fitApplyMPO and ExactApplyMPO adaptable for that? Or does one need to consider the technicality of psi.A(0)* psi.A(1)? The latter case seems to lead to 'std::bad_alloc'. Many thanks,


1 Answer

0 votes
answered by (20.8k points)

Hi Sam,
Good question. The short answer is that the existing MPO apply codes are not designed to apply an MPO to just a piece of a larger MPS, although it makes perfect sense that you may want to do that.

There are a few issues that could come up. One of them is what you mention, that at the very least you ought to "prepare" the right MPS to go into the algorithm. So you are right that an important step is to multiply psi.A(0) into psi.A(1):
psi.Aref(1) *= psi.A(0);
The reason for this, as you may know, is that you want the portion of the infinite MPS to which you apply the MPO to be the "orthogonality center", meaning that all other MPS tensors to the left/right are left/right orthogonal. This is so that the truncations made when manipulating the MPS locally also translate into optimal truncations in a global sense.

But the more practial issues have to do with the extra virtual indices that will be "sticking out" of your MPS. There is definitely a way to handle these, but the codes presently available in ITensor would likely have to be modified to do so.

Can I suggest this modification as 'homework' for you to look into? It might be useful for you to dig into the inner workings of these algorithms anyway. A nice one, which should generalize very cleanly to the infinite MPS case, is the exactApplyMPO algorithm. If you'd like to email me to remind me, I can sketch up some brief notes about how this algorithm works so you could see how to generalize it to the infinite MPS case.

Best regards,

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.