Hi, everyone
I am trying to perform some DMRG calculations for spinless p-wave Kitaev chain. Specifically, I want to calculate the entanglement entropy of this chain, but I can’t always get the convergent results through changing the the number of sweeps, maximal bond dimensional, cutoff and noise paramerters. A typical code is given as follows
using ITensors
let
N = 40
t=1.0
mu = 1.0
delta = 1.0
f = open(“Kitaev-test.dat”,“w”)
s = siteinds(“Electron”,N)
b=20
for nn = 1200 : 100 : 2000
@show nn
ampo = OpSum()
for j = 1 : N-1
ampo += -t ,"Cdagup",j,"Cup",j+1
ampo += -t ,"Cdagup",j+1,"Cup",j
ampo += delta ,"Cup",j,"Cup",j+1
ampo += delta ,"Cdagup",j+1,"Cdagup",j
end
for j = 1 : N
ampo += -mu ,"Cdagup",j,"Cup",j
end
H = MPO(ampo, s)
sweeps = Sweeps(30)
setmaxdim!(sweeps, 100,200,400,800,1000,nn)
setcutoff!(sweeps, 1E-5,1E-6,1E-7,1E-8,1E-8)
setnoise!(sweeps, 1E-5,1E-6,1E-7,1E-8,1E-10)
#@show sweeps
Initialize wavefunction to be bond
dimension 10 random MPS with number
of particles the same as state
psi0 = randomMPS(s, 40)
Start DMRG calculation:
energy, psi = dmrg(H, psi0, sweeps)
function entropyvonneumann(psi::MPS, b::Int)
s = siteinds(psi)
orthogonalize!(psi, b)
_,S = svd(psi[b], (linkind(psi, b-1), s[b]))
SvN=0.0
for n in 1: dim(S, 1)
p = S[n,n]^2
SvN -= p * log(p)
end
return SvN
end
SvN = entropyvonneumann(psi, b)
println("$nn $energy $(SvN)")
write(f,"$nn $energy $(SvN)\n")
end
close(f)
end
I want to get the entanglement entropy as a function of maximal bond dimension. But my results always show oscillating behavior just like following picture and can’t obtain a convergent stable value.
I also test other parameters including the number of sweep, noise etc. but the results are similar. Who can help me to fix it or explain why ?