I’ve been using ITensor for a bit now and I am really enjoying using this package. I do have a couple of questions to ask and any help on them would be greatly appreciated.
I am using DMRG to calculate the ground state |\psi\rangle for a given Hamiltonian. Once I have this ground state at a bond dimension \chi is it possible to create multiple copies of the same ground state i.e. calculate |\psi\rangle^{\otimes 4} ?
If it is possible to create the replicas then would it also be possible to define an operator or MPO which can act across the same site in all 4 replicas which would allow me to take expectation values of this operator/MPO?
Interesting question. Yes, ITensor makes it straightforward to do this even though we don’t have a function to do it in one step.
Here’s a pattern you can use:
make a new array of site indices that is 4 times longer than your original one. So like snew = siteinds("S=1/2",4*N) (here I assumed S=1/2 sites but of course use the correct site type that you originally used for the length N system)
make an empty MPS of length 4N like this: psi_new = MPS(snew)
write a loop where you copy the original MPS, change its site indices to match the appropriate subarray of snew, and copy these tensors into mnew, like this:
for r=1:4
range = 1+(r-1)*N:r*N
psi_r = replace_siteinds(psi,snew[range])
for (i,j) in enumerate(range)
psi_new[j] = psi_r[i]
end
end
I haven’t tested the above code but I think it should work.
for good measure, I would lastly call orthogonalize!(psi_new,1) which will “gauge” the new MPS and also insert any missing virtual or link indices that might not be there from the above code
Then you can measure any operator you wish, using the new site index array snew to generate operators either as ITensors or using our OpSum to MPO conversion system.