You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using ITensors: MPO, OpSum, dmrg, randomMPS, siteinds
using Metal: mtl
using Random: Random
functionham(n)
os =OpSum()
for j=1:n
os +=1.0,"Nup",j
os +=1.0,"Ndn",j
endfor j=1:n-1
os +=1.0,"Cdagup",j,"Cup",j+1
os +=1.0,"Cdagup",j+1,"Cup",j
os +=1.0,"Cdagdn",j,"Cdn",j+1
os +=1.0,"Cdagdn",j+1,"Cdn",j
endreturn os
endfunctionmain(; n, device, conserve_qns, nsweeps, maxdim)
s =siteinds("Electron", n; conserve_nfparity=conserve_qns)
Random.seed!(1234)
ψ =device(randomMPS(s, j ->isodd(j) ?"↑":"↓"; linkdims=4))
cutoff = [1e-3, 1e-13]
outputlevel =1
H =device(MPO(ham(n), s))
energy, ψ =dmrg(H, ψ; nsweeps, maxdim, cutoff, outputlevel)
end
mtfishman
changed the title
[NDTensors] [BUG] Bug running DMRG on Metal
[NDTensors] [BUG] Bug running DMRG on Metal with small cutoffs and large bond dimensions
Nov 16, 2023
Running either of these:
after some random small number of sweeps leads to the following error:
It doesn't seem to occur at smaller bond dimensions, and also is fixed by user a larger cutoff, i.e.
so seems to be related to the condition number of the MPS.
The text was updated successfully, but these errors were encountered: