hello, I think I meet some troubles at four point MPO, this is a simple example code
using ITensors
let
L = 4
n_max = 2
Np = 2
sites = siteinds("Boson", L; dim=n_max, conserve_qns=true)
state = ["0", "1", "0", "1"]
psi = MPS(sites, state)
sites = siteinds(psi)
os = OpSum()
os += "Adag", 1, "A", 2, "Adag", 1, "A", 2
@show os
op = MPO(os, sites)
corr = inner(psi', op, psi)
@show corr
end
for n_max > 2, it works well
for n_max = 2, os is not at same site, for example, os += “Adag”, 1, “A”, 2, “Adag”, 2, “A”, 3, it works well
but for n_max = 2, os is at same site, for example, 1, 2, 1, 2, it can not work and throw a error:
ERROR: LoadError: Could not find block of QNIndex with matching QN
how can I repair it? thanks