+1 vote
asked by (270 points)

Hi,

I encounter some problems when I try to test the real space parallel DMRG. In calculation, I write the wave function psi to the hard disk by

writeToFile("path", psi);

When I load the wavefunction readFromFile("path", psi) and do it inner product inner(psi, psi), the error is:
From line 568, file indexset.cc
In findIndex: more than one Index found, consider using findInds instead.

What makes such an error?

commented by (62.7k points)
Thanks for the question. Often this kind of error has to do with how in ITensor, MPS are made by first making a collection of site indices ("site set") and then you form the MPS with these. Are you also saving the sites of your MPS to disk too and reading them back in? Or are you making a brand new set of sites?

But I do see that even `inner(psi,psi)` is failing which should work for any MPS psi whatever sites it has.

So can you please provide some more context like a minimal code sample that reproduces this issue?

Also have you tried printing out `psi` to look at the indices each of its tensors has? That could reveal what's going on: it might have a structure that's not a valid MPS.
commented by (62.7k points)
Oh I just saw that this is for the real-space parallel DMRG code. That code is really provided for research/example purposes only and doesn't come with guarantees like about the wavefunction being in a given global state after you read it from disk. Basically in more detail there are additional "V" tensors in between each group of MPS tensors that "glue" them together into a valid global MPS, and you might have not included these back into psi when you made it.

May I ask what you are using the real-space parallel DMRG for? You may not strictly need it for your application.
commented by (270 points)
Hi Miles,

Thanks for your answer. I think that considering the glue tensors V is the key point to fix this problem.

I am testing the parallel DMRG for the Hubbard model with Sz, electron number, and ky conserved.  Storing the wave function is very useful for the following considerations:

For challenging quasi-2D models, we usually do not know how many sweeps and states are large enough to make the result veritably converged in advance. So it is very convenient to use the stored wave function as an input when we increase the sweep numbers and bond dimensions, which avoids starting a calculation in the beginning. Therefore, that will save time and computational resources.

On the other hand,  the maximum running time is limited on some public clusters, which may be one or two weeks. In addition,  we need to shut down the personal cluster during power maintenance. Hence,  the program will be more flexible if we can resubmit it based on the stored wave function in the previous calculation.

Bests
Zongsheng Zhou

1 Answer

0 votes
answered by (62.7k points)

Hi Zongsheng,
Glad the point about the V tensors helped. Yes I think that's the key point to notice. Additionally, there could also be some subtlety about the state of each node as the calculation is stopped which could leave them in an incompatible state, so that is another thing to consider.

In general, that parallel DMRG code was not very focused on the ability to restart the calculations, with the thinking that anyway the time to store and re-prepare the state (e.g. recalculating the tensors which wrap the Hamiltonian into the MPS) does not have good parallel scaling so could cancel out the benefits of doing a parallel calculation in the first place. Also it's just a more complicated aspect of the code to get working correctly.

Hope you find a way to use it that's helpful to you –

Miles

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...