I am noticing a bug when I use AutoMPO for building the following bosonic Hamiltonian
$$
H = \sum_j n_j n_j
$$
Essentially, it looks like it does not do the square correctly. For example, if I run the following code (I don't impose conservation of particles, since in the actual model I have been investigating it is not conserved)
int size = 2;
int cutoff = 3;
SiteSet sites = Boson(size,{"ConserveQNs",false,"MaxOcc=",cutoff});
auto ampo = AutoMPO(sites);
for(int j = 1 ; j <= size ; j++) ampo += 1 , "N", j , "N", j ;
MPO H = toMPO(ampo,{"Exact=",true});
PrintData(H(1));
The output does not appear to be n^2:
H(1) =
ITensor ord=3: (dim=4|id=952|"n=1,Site,Boson") (dim=4|id=952|"n=1,Site,Boson")' (dim=3|id=827|"l=1,Link")
{norm=8.60 (Dense Real)}
(1,1,1) 1.0000000
(2,2,1) 1.0000000
(3,3,1) 1.0000000
(4,4,1) 1.0000000
(2,2,2) 2.0000000
(3,3,2) 4.0000000
(4,4,2) 6.0000000
(2,2,3) 1.0000000
(3,3,3) 2.0000000
(4,4,3) 3.0000000
Am I missing something?
Thank you in advance!