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,

Miles