Unreasonable results occurred when using TDVP to calculate the long-range interaction Hamiltonian

I recently encountered a puzzling issue while using TDVP, and it took me a long time to find the root cause. Therefore, I would greatly appreciate any assistance.

L = 2
tₜₒₜₐₗ = 10
τ = 0.01
tₛₜₑₚₛ = convert(Int64, tₜₒₜₐₗ /τ)
sites = siteinds("Boson",2L)
states = ["1","1","0","0"]
ψ₀ = MPS(sites,states)
os = OpSum()
os += "a", 2, "a†", 3
os += "a", 3, "a†", 2
ℋ = MPO(os,sites)

ψₜ = ψ₀
N̂ₛₜₑₚₛ = []
for i in 1:tₛₜₑₚₛ
   N̂ = expect(ψₜ ,"N")
   push!(N̂ₛₜₑₚₛ ,N̂')
   ψₜ = tdvp(ℋ,ψₜ ,-im*τ,ishermitian=true)
end

In the above code, I created a boson model with an initial state of “1100” and applied the Hamiltonian of a_{2}^{\dagger} a_{3} + a_{3}^{\dagger} a_{2}. After drawing the graph of the number of particles at each site over time, as we expected, the particles oscillated back and forth between the second and third sites.


But when I modify the Hamiltonian to a_{1}^{\dagger} a_{3} + a_{3}^{\dagger} a_{1}

os = OpSum()
os += "a", 1, "a†", 3
os += "a", 3, "a†", 1
ℋ = MPO(os,sites)

Strange things happened, as the particles seemed to be fixed in place and did not oscillate between the first and third sites as expected.


At the same time, I still used TEBD for the same time evolution, and luckily, I got the image I wanted to see.

L = 2
tₜₒₜₐₗ = 10
τ = 0.1
tₛₜₑₚₛ = convert(Int64, tₜₒₜₐₗ /τ)
sites = siteinds("Boson",2L)
states = ["1","1","0","0"]
ψ₀ = MPS(sites,states)

gates=ITensor[]
tg=op("Adag",sites[1])*op("A",sites[3])
tg+=op("Adag",sites[3])*op("A",sites[1])
tevol=exp(-im*τ/2*tg)
push!(gates,tevol)
append!(gates,reverse(gates))

ψₜ = ψ₀
for i in 1:tₛₜₑₚₛ
     N̂=expect(ψₜ,"N") 
     push!( N̂ₛₜₑₚₛ , N̂')
     ψₜ=apply(gates,ψₜ)
end


Therefore, I would like to know where I made mistakes or made some thought-provoking mistakes when using TDVP to calculate Hamiltonians with long-range interactions. Please point them out for me. Thank you very much!

Try with nsite=2 argument in tdvp function, to invoke 2-site tdvp optimization.

Yes, I have modified the function TDVP to

ψₜ = tdvp(ℋ,ψₜ ,-im*τ,ishermitian=true;nsite=2)

based on your suggestion. No modifications have been made to the other parts. But the result is still incorrect.


Thank you very much for your suggestion.

You could try manually increasing the bond dimensions of the initial state MPS before starting the evolution. I tried it, and a bond dimension equal to 2 is already enough to see the right result. I guess even the TDVP2 algorithm can’t “see” long range correlations/interactions if the MPS being evolved isn’t “big” enough, and non-nearest-neighbour terms get lost when the Hamiltonian gets projected.

As for how you can increase the bond dimensions, I don’t know if there is an MPS constructor which allows you to do it directly; I usually multiply each bond of the MPS with a delta ITensor of the desired new dimension.

May I ask if it is convenient for you to provide a simple example code?

This is what I used to enlarge the MPS manually:

for bond in 1:(length(ψ₀)-1)
        bond_index = commonind(ψ₀[bond], ψ₀[bond + 1])
        aux = Index(new_dim; tags=tags(bond_index))
        ψ₀[bond] = ψ₀[bond] * delta(bond_index, aux)
        ψ₀[bond + 1] = ψ₀[bond + 1] * delta(bond_index, aux)
end

You could plug it in your code just after you create the MPS.

2 Likes

Oh yes, I have modified the program according to your suggestions and indeed obtained the correct results. I will continue to follow this approach to modify other issues. Thank you for your help!

1 Like

Hi, the approach posted above to manually enlarge an initial productMPS is not working for me. It is adding the extra bond-dims, but regardless of that the TDVP (2-site) is still starting from bond-dim=1 product state and for some complicated Hamiltonians is forever stuck in that state. Wondering if something else is supposed to be done along with this trick to enlarge an MPS ?

We recently added experimental support for global subspace expansion to ITensorTDVP.jl v0.4.1/ITensorMPS.jl v0.2.1 (GitHub - ITensor/ITensorTDVP.jl: Time dependent variational principle (TDVP) of MPS based on ITensors.jl.), can you try that out to see if it works in your case?

Also, productMPS is deprecated, you should just use MPS instead.

1 Like

Hi, I tried it out with the latest ITensorTDVP (v0.4.3) and ITensorMPS (v.0.2.1) as you suggested, with the appropriate syntactical changes as instructed. It’s still not working !

I also don’t understand why the approach posted above for manually enlarging the initial MPS is not being accepted by the TDVP engine. It’s still only seeing the underlying product MPS and not the one artificially enlarged MPS.

Could you start a new post with more details about what specifically you have tried and what went wrong? Comments like “It’s still not working” without any more details are not helpful for us, and therefore not helpful for you to get the help you are requesting.

Before posting a question, please read and follow the guidelines laid out here: Please Read: Make It Easier to Help You

By “still not working” I just meant that the newer TDVP is also stuck in the initial product state in this particular case (and newer TDVP is working properly in the cases in which the older TDVP was also working fine).

Sure, I’ll make a new post with details of the Hamiltonian, etc.

Edit - the new post TDVP (2-site) stuck in the initial state