+1 vote

Dear ITensor team,
Thanks for your reply. I want to save ground state by DMRG calculation, and I fellow the tutorial exactly https://itensor.org/docs.cgi?vers=cppv3&page=classes/readwrite
writeToFile("GSwavefunctionfile",psi);
But when I load ground state MPS in the other code:
I get following error:
"From line 568, file indexes.cc
In findIndex: more than one Index found, consider using findInds instead
In findIndex: more than one Index found, consider using findInds instead
"
and I print my MPS from the file and Hamiltonian(MPO) in the current code
Print(psi(1));
Print(H(1));
I find site information are not one-one correspondence. I want to know the correct way to write MPS and read MPS from the file, in order to do time-evolution operation. Please help me, many thanks!

Hi, thanks for the question. Did you also write the "sites" object to disk too, read it back in before reading the wavefunction, and then use this read sites object to pass to the auto psi = readFromFile(...) command?

Miles

commented by (400 points)
Thanks, Miles. I have solved my problem. I forgot save sites object to the disk.
commented by (64.2k points)
Glad that you found a solution. Thanks for replying to explain what it was.