Hey all,
I am trying to measure the overlap between a thermal state which I created using diagonalization of the Hamiltonian to an imaginary site development state.
It seems that no matter what \delta \beta is, I will always get the same overlap (up to some noise).
I will share my method and I hope that someone might know what my problem is.
In the following script I an doing a diagonalization to some random Hamiltonian:
using ITensors
function placeOne(i, n)
[repeat([0,], i - 1)..., 1, repeat([0,], n - i)...]
end
ψ = 0
ψs = []
H_tensor = prod(H)
eigen_E, Eigen_S = eigen(H_tensor)
for i = 1:dim(inds(Eigen_S)[end])
exited_state = Eigen_S * ITensor(placeOne(i, dim(inds(Eigen_S)[end])), inds(Eigen_S)[end])
ψ = MPS(exited_state, site)
append!(ψs, (ψ,))
end
ψeigen = ψs
ψeigen = exp.(-collect(diag(eigen_E)) .* β) .* ψeigen |> sum |> normalize
ψ_thermal=ψeigen
After that I am taking some random initial state which is in a product state and developing in time using the tdvp method
n_tot=β/δβ
o_v_β=[]
for i=1:n_tot
ψ_0 = tdvp(H, ψ_0, -δβ)
normalize!(ψ_0)
append!(o_v_β, abs(inner(ψ_thermal, ψ_0)))
end
The only parameter here is \delta \beta
In my intuition as \delta \beta increases the overlap should be less accurate… but it seems that it does not affect at all.
Does someone knows if I made some mistake on my code ? or maybe I am not doing what I think I am doing ?
Hi tsegev, we are trying to discourage the style of question where someone posts a lot of code and asks “please read my code and tell me what’s wrong”.
If you would like to ask about something, please instead describe the procedure you are trying to do, say using Latex math notation and ask a specific question about it, like whether a certain specific concept is correct about it. Or please highlight a certain line of code you might have a question about e.g. how to use ITensor for a given task. Thanks for understanding.
Hi miles,
Thank you for your comment. I understand what you wrote. What I am trying to do is to create a mps with some excited states (on finite temperature). The method that I thought will be the is to use the imaginary time evolution approach. In order to check that I took the Hamiltonian of issue and diagnolized it so that I created the actual thermal state I need:
The problem that seems from the numerics is that there is no dependence on the choice for \tau.
So, my original question was to understand if I am not doing the diagonalization correct, or that maybe the tdvp method can not be used to create a finite temperature state.