First of all, I would like to thank you for making the ITensor code available, and for the
time/efforts to keep it running and updated.
Well, I have a (naive) question on one of your examples of exact diagonalization (ITensors.jl/examples/exact_diagonalization/exact_diagonalization.jl at main · ITensor/ITensors.jl · GitHub).
Is it possible to use the eigenvectors obtained from it (after calling the eigsolve) and use it to calculate the correlation matrix (or any other observable) by means of “correlationMatrix”?
I’ve gone though the available tutorial (MPS and MPO Examples · ITensors.jl) on how to convert it to a MPS,
but so far I have not succeeded.

Hi Miles!
Thank you so much for the quick reply. In fact, I have tried to follow the example given (and that you’ve suggested). As I have mentioned, I am extracting the GS wavefuntion from the exact diagonalization (exactly as calculated from the example: ITensors.jl/examples/exact_diagonalization/exact_diagonalization.jl at main · ITensor/ITensors.jl · GitHub), and then, I am trying
to convert the GS wavefunction to a MPS. I have used:

If we are looking at the same example, there is already an array of site indices made on line 29 (just below the comment saying “Hilbert space”). The array is stored in the variable s. Then those indices are used to make the Hamiltonian and the eigenvectors. (You will need to set the fuse keyword to fuse=false in the call to main to keep the indices from being merged together, or else unfuse them after the ED is run.)

Then when making the MPS, your code is almost correct except:

do not make a second array of site indices, but use the one already made, because a new array will contain new indices that will not match

pass the existing array of site indices (named s in that code) to the MPS constructor

Hi Miles,
It worked after your suggestion (fuse=false). In fact, I have also assumed “fuse=false” before, but
at the same time I have also (wrongly) assumed “binary=false”, and this was my error.
Thank you so much for your help.