I don’t seem to be able to edit the original post for some reason, but here is a formatted version of the code:
using ITensorTDVP
using ITensors
@show(pkgversion(ITensorTDVP))
@show(pkgversion(ITensors))
N = 50
sites = siteinds("S=1/2",N)
os = OpSum()
for j=1:N-2
os += "Sz",j,"Sz",j+2
os += 1/2,"S+",j,"S-",j+2
os += 1/2,"S-",j,"S+",j+2
end
H = MPO(os,sites)
psi0 = randomMPS(sites;linkdims=10)
nsweeps = 5
maxdim = 50
cutoff = [1E-10]
if pkgversion(ITensorTDVP) == v"0.3.0"
t = 0.02
else
t = 0.1
end
ITensorTDVP.tdvp(H,-t*im,psi0;nsweeps,maxdim,cutoff,outputlevel=0)
@time psi = ITensorTDVP.tdvp(H,-t*im,psi0;nsweeps,maxdim,cutoff,outputlevel=1)
When using v"0.3.0", the output is
pkgversion(ITensorTDVP) = v"0.3.0"
pkgversion(ITensors) = v"0.5.8"
After sweep 1: maxlinkdim=33 maxerr=9.98E-11 current_time=0.0 - 0.02im time=3.346
After sweep 2: maxlinkdim=48 maxerr=9.88E-11 current_time=0.0 - 0.04im time=6.234
After sweep 3: maxlinkdim=49 maxerr=9.99E-11 current_time=0.0 - 0.06im time=6.667
After sweep 4: maxlinkdim=50 maxerr=9.97E-11 current_time=0.0 - 0.08im time=7.068
After sweep 5: maxlinkdim=50 maxerr=1.21E-10 current_time=0.0 - 0.1im time=7.084
30.581937 seconds (4.28 M allocations: 23.469 GiB, 8.43% gc time)
When using v"0.4.9", the output is
pkgversion(ITensorTDVP) = v"0.4.9"
pkgversion(ITensors) = v"0.6.19"
After sweep 1: maxlinkdim=33 maxerr=9.84E-11 current_time=0.0 - 0.02im time=16.549
After sweep 2: maxlinkdim=46 maxerr=9.96E-11 current_time=0.0 - 0.04im time=33.129
After sweep 3: maxlinkdim=48 maxerr=9.76E-11 current_time=0.0 - 0.06im time=37.469
After sweep 4: maxlinkdim=50 maxerr=1.00E-10 current_time=0.0 - 0.08im time=40.801
After sweep 5: maxlinkdim=50 maxerr=1.06E-10 current_time=0.0 - 0.1im time=43.797
172.581258 seconds (60.85 M allocations: 152.748 GiB, 11.50% gc time, 0.41% compilation time: 21% of which was recompilation)
This is using julia 1.9.2 but the discrepancy also arises using later versions.