I have written an IQMPS obect to disk in my DMRG calculation. I found that to load the mps, we need to construct a sites object first. Otherwise something will be wrong with the mps. Below is an example.
If we try to load a mps as,
//Exeception
int main(){
IQMPS psi;
readFromFile("psi_file", psi); // Here psi.N() > 2
psi.position(2);
return 0;
}
psi.position(2) will throw an exception which says "Mismatched IQIndex arrows";
But if we construct a sites object before reading it, everything is OK.
// OK.
int main(){
SpinHalf sites(1); // SpinHalf sites(0) doesn't work either.
IQMPS psi;
readFromFile("psi_file", psi); // Here psi.N() > 2
psi.position(2); // Works
return 0;
}
I check the constructor of BasicSiteSet, but I didn't see any global variables set there. Anyone has similar problem as I described above?
Thanks.