add sites to MPS/MPO in C++

Dear ITensor,

Hi!

I’m using ITensor C++ version. I noticed that in Julia ver, we can extend an MPS/MPO by adding a site, i was wondering if this operation can be done in C++?

What I’m planning to do is basically as follows:

auto M1 = MPO(sites);// of length N
auto M2 = MPO(sites); // of length N
auto M3 = sum(M1,M2, {"Cutoff",1E-8});

Then I want to add a site to M3 such that it is an MPO of length N+1, and then set the (N+1) site of M3 to be an ITensor T.

M3.set(N+1, T);

I’ve tried several ways but they’re all failed. Is this operation possible in C++?

Thank you.

Best,
Trudy