Hi
I tried to use the wave function obtained form previous calculation as an initial wave function of dmrg calculation(I stored the wave function in the hard disk "./Wave/Psi", but the MPO is not stored), and I obtained MPO via AutoMPO by using the same rules as before. The id in site-indices of MPO is different form the ones of MPS read form disk, I met some problems in replacing the site-indices of MPO by the ones of MPS. The key code is as follow
auto psi = readFromFile<MPS>("./Wave/Psi");
auto newIndexSet = siteInds(psi);
vector<Index> indexMPO;
for (auto i : range1(length(H)))
{
auto siteIndexSet = siteInds(H, i);
indexMPO.push_back(siteIndexSet[1]);
}
auto oldIndexSet = IndexSet(indexMPO);
H.replaceSiteInds(oldIndexSet, newIndexSet); // out arrow indices of MPO
H.replaceSiteInds(oldIndexSet.dag(), newIndexSet.dag()); // in arrow indices of MPO
But the code do not change the id in site-indices of MPO, could you give me some help?, thanks .