Large precision error for TDVP of ITensorInfiniteMPS

Hi ITensor teams

I’m trying to use ITensorInfniteMPS package to do some real time evolution works. As a test, I try to compute a one step real time evolution for a transverse field Ising model first. I do the subspace expansion before applying the tdvp function and set the maxiter = 50 and tol=1e-8. I printed out the information of every tdvp iteration and noticed that the precision error remain to have a magnitude of 10^{-3} after all 50 iterations, much larger than the threshold of tol = 1e-8. Is this normal or I have done something wrong? Here is my code:

using ITensors, ITensorMPS
using ITensorInfiniteMPS

let 
    nsites = 3
    maxiter, tol = 100, 1e-8
    maxdim, cutoff = 100, 1e-14

    initstate(n) = mod(n, nsites) == 1 ? "Up" : "Dn"
    ss = infsiteinds("S=1/2", nsites; initstate)
    psi = InfMPS(ss, initstate)

    model = Model("ising")
    H = InfiniteSum{ITensor}(model, ss; J = 1.0, h=0.8)

    psi = subspace_expansion(psi, H; maxdim=maxdim, cutoff=cutoff)
    psi = tdvp(H, psi; time_step=0.1, tol=tol, maxiter=maxiter)

end

And final 5 iterations

VUMPS iteration 46 (out of maximum 50). Bond dimension = 2, energy = ([1.1599998951234851, 1.1599998072590256, 1.1599999304720359], [1.1600000023866295, 1.1599999278474808, 1.1600000218924635]), ϵᵖʳᵉˢ = 0.0002929457724205573, tol = 1.0e-8, iteration time = 0.0311872 seconds
VUMPS iteration 47 (out of maximum 50). Bond dimension = 2, energy = ([1.1599999284613192, 1.159999865527807, 1.1599999412781012], [1.1600000071743486, 1.1599999380471147, 1.160000019804393]), ϵᵖʳᵉˢ = 0.0002442716886668837, tol = 1.0e-8, iteration time = 0.0323065 seconds
VUMPS iteration 48 (out of maximum 50). Bond dimension = 2, energy = ([1.1599999524411813, 1.1599999055070491, 1.1599999514844401], [1.1600000090453244, 1.1599999502934502, 1.1600000151947742]), ϵᵖʳᵉˢ = 0.00020277009425373363, tol = 1.0e-8, iteration time = 0.0325951 seconds
VUMPS iteration 49 (out of maximum 50). Bond dimension = 2, energy = ([1.1599999683770972, 1.1599999339900078, 1.1599999607334055], [1.160000009286607, 1.1599999611122698, 1.1600000111188806]), ϵᵖʳᵉˢ = 0.00016755121765308476, tol = 1.0e-8, iteration time = 0.0300417 seconds
VUMPS iteration 50 (out of maximum 50). Bond dimension = 2, energy = ([1.159999978373851, 1.159999954691704, 1.1599999688099527], [1.1600000086743296, 1.1599999696367151, 1.1600000083484092]), ϵᵖʳᵉˢ = 0.00013771656666695183, tol = 1.0e-8, iteration time = 0.0337534 seconds
3-element InfiniteCanonicalMPS:
 ((dim=2|id=758|"Link,c=0,l=3"), (dim=2|id=521|"S=1/2,Site,c=1,n=1"), (dim=2|id=611|"Link,c=1,l=1"))
 ((dim=2|id=611|"Link,c=1,l=1"), (dim=2|id=54|"S=1/2,Site,c=1,n=2"), (dim=2|id=903|"Link,c=1,l=2"))
 ((dim=2|id=903|"Link,c=1,l=2"), (dim=2|id=191|"S=1/2,Site,c=1,n=3"), (dim=2|id=758|"Link,c=1,l=3"))

I also have a further question: if I want to do many steps of such time evolution, do I need to do the subspace expansion before each step of tdvp?

I would appreciate any help!

I’m not familiar with VUMPS or infinite MPS more generally, so take this as you will.

First off, I’m pretty sure if you want real time evolution you should use time_step=0.1im. And second, yes, for optimal accuracy you should be performing sub-space expansion after every time step.

I would modify the VUMPS Ising example, which does a ground state calculation to do real time evolution. You’ll notice it also alternates between subspace expansion and time evolution: vumps_subspace_expansion.jl

Corbett

Thanks for your quick response! I tried your suggestion of time_step=0.1im, but unfortunately found that the precision error ϵᵖʳᵉˢ is of larger magnitude (\sim 10^{-1} ) under the same condition and not even decreasing. I found the documentation TDVP and Time Evolution | ITensor/ITensorInfiniteMPS.jl | DeepWiki tells that time_step=0.1 is account for real time evolution, time_step=-0.1 imaginary time evolution and time_step=-Inf to find ground state, so I’m a little bit confused. Do I understand the documentation wrong or the documentation not updated?

Then I increased the iterations by maxiter=100 and then maxiter=200 and surprisingly found that the ϵᵖʳᵉˢreduced under 10^{-8} after 105 iterations if time_step=0.1 used while time_step=0.1im still yields a ϵᵖʳᵉˢof 10^{-1} . So maybe I should just increase iteration times? But 105 seems a little bit more for my problem (the above code is just a test), so my further question is : is there any methods or general guidance to reduce the iterations required to converge?

Best wishes
Zephyr

I wouldn’t necessarily trust that AI generated documentation, which is certainly not maintained or produced by the developers. I also believeITensorInfiniteMPS is still in the development phase and not ready for production, so that could be part of the discrepancy.

However, the time step t in ITensorMPS.tdvp corresponds to e^{t H}, so real time evolution requires an imaginary time step, whereas imaginary time evolution corresponds to a real valued time step. I find it hard to believe they would change these semantics in ITensorInfiniteMPS, and from my quick reading of the code this indeed seems to be the case.

Many thanks for your help! I go through the source code of tdvp() function in ITensorInfiniteMPS ITensorInfiniteMPS.jl/src/vumps_generic.jl and ITensorInfiniteMPS.jl/src/vumps_mpo.jl and found its time_step convention is indeed the same as that of ITensorMPS, with the tdvp_solver(H, t, x) taken as exponentiate function from KrylovKit.jl interpreted as

y = e^{tH} x

But using time_step=0.1im or time_step=-0.1im both get a relatively large precision error even after 200 times of iteration. So it is quite confusing.

I think if you look at the source code the time step is the time step per iteration, in that case it’s not surprising that increasing the number of iterations would increase the error. Try decreasing the time step while increasing the number of iterations to keep the overall evolution time fixed. And intersperse calls to subspace_expansionevery so often, the more the better.