I have been using AutoMPO to create MPO's with both onsite and nearest-neighbor terms, but after a recent update, this no longer seems to work as before:
const int N = 4;
SpinHalf hs(N);
AutoMPO ampo(hs),bmpo(hs);
for(int i = 1 ; i <= N ; ++i) {
if(i != N) {
ampo += -1.0,"Sz",i,"Sz",i+1;
bmpo += -1.0,"Sz",i,"Sz",i+1;
}
bmpo += -1.0,"Sx",i;
}
auto A = MPO(ampo);
println("checkpoint 1");
auto B = MPO(bmpo);
println("checkpoint 2");
For me, MPO A (with pair terms only) correctly generates, but the second call to the MPO constructor causes the program to crash with the following ITError:
doTask not defined for task CalcDiv and storage type QMixed<Real>
Which I suppose comes from the storage type changing between the two cases. I am up-to-date with the git branch master.