Hello,

I am trying to apply a localMPO to a local MPS Itensor. Namely

auto PH = LocalMPO(WGlobal);

int b=1;

int numCenter=1

PH.numCenter(numCenter);

PH.position(b,psi);

phi1 = psi(b);

phi1 = PH * phi1;

the latter command cannot compile:

error: invalid operands to binary expression (‘LocalMPO’ and ‘ITensor’)

phi1 = PH * phi1;

What type of object is the local MPO then? How can I extract the corresponden ITensor and apply it to the local MPS?

Thanks a lot!

Jacopo.

Could you explain more about what you are trying to do? the `LocalMPO`

object is really designed for a sparse projection of the MPS, where the two main functions are `product`

/`expect`

to find \langle \phi^\prime|PH|\phi\rangle or \langle \phi|PH|\phi\rangle.

Given a standard MPO, one can use the `applyMPO`

function to either exactly, or approximately apply an MPO to a MPS.

Hi,

thanks for your answer!

All I am trying to do is to have an Itensor object (with 2 links indeces and sites and site’ ) giving me the 1 site effective Hamiltonian at site b (as in TDVP for example (see Fig 2 in https://arxiv.org/pdf/1408.5056)), and I want to apply it to the MPS at site b. I thought that this Itensor object is indeed given by PH, so that explains my previous attempt to code.

Thanks,

Jacopo.

Ah yes, this is the object in Fig 2b (for some number of sites). `product`

is probably the function you want. Check out how things are done in the tdvp code: TDVP/tdvp.h at master · ITensor/TDVP · GitHub

(And an obligatory this is much nicer in the Julia version )

1 Like