Hello everyone!
I want to use DMRG to get the groundstate of topological SSH model.
It’s Hamilitonian has been posted below.
For the case that j_1>j_2, the system is topologically trivial; for the case that j_1<j_2, it is topological.
It’s groundstate density distribution should be homogeneous for both trivial and non-trivial case.
In my tests, the density of topological case can not converge to be homogeneous and have large difference between the left egde and right edge (with open condition) even after many sweeps. The
trivial case is homogeneous after several sweeps.
Here is the density after after 10 sweeps when the length of sites is 12, j1=0.2, j2=1 and inital state is “1010…”,
After 20 sweeps, it converge to a almost homogenous state.
It seems like much sweeps brings better results.
But when the length of sites goes up to 24, even after 100 sweeps, its density is still not homogenous.
This situation also occurs in other initial states like “0101”, “1001”
So did DMRG stuck in a locally optimal solution?
Here is my code and other parameters.
using ITensors
using Parsers
let
L=Parsers.parse(Int,ARGS[1])
t1=Parsers.parse(Float64,ARGS[2])
ratio=Parsers.parse(Float64,ARGS[3])
filling=ARGS[4]
dimerization=Parsers.parse(Int,ARGS[5])
condition=ARGS[6]
additional=Parsers.parse(Int,ARGS[7])
t2=t1*ratio
@show t1
sites=siteinds("Fermion",L;conserve_qns=true)
state=[]
if filling=="1010"
for n=1:L
if isodd(n)
push!(state,"1")
elseif iseven(n)
push!(state,"0")
end
end
if additional==1
state[Int(L/2)]="1"
end
if additional==-1
state[Int(L/2-1)]="0"
end
@show state
elseif filling=="0101"
for n=1:L
if isodd(n)
push!(state,"0")
elseif iseven(n)
push!(state,"1")
end
end
if additional==1
state[Int(L/2-1)]="1"
end
if additional==-1
state[Int(L/2)]="0"
end
@show state
elseif filling=="1001"
for n=1:L/2
if isodd(n)
push!(state,"1")
elseif iseven(n)
push!(state,"0")
end
end
for n=L/2+1:L
if isodd(n)
push!(state,"0")
elseif iseven(n)
push!(state,"1")
end
end
if additional==1
state[Int(L/2)]="1"
end
if additional==-1
state[Int(L/2-1)]="0"
end
@show state
elseif filling=="0110"
for n=1:L/2
if isodd(n)
push!(state,"0")
elseif iseven(n)
push!(state,"1")
end
end
for n=L/2+1:L
if isodd(n)
push!(state,"1")
elseif iseven(n)
push!(state,"0")
end
end
if additional==1
state[Int(L/2-1)]="1"
end
if additional==-1
state[Int(L/2)]="0"
end
@show state
elseif filling=="1100"
for n=1:L/2
push!(state,"1")
end
for n=L/2+1:L
push!(state,"0")
end
if additional==1
state[Int(L/2+1)]="1"
end
if additional==-1
state[Int(L/2)]="0"
end
@show state
end
psi0=MPS(sites,state)
@show flux(psi0)
if dimerization==1
j1=t1
j2=t2
elseif dimerization==2
j1=t2
j2=t1
end
ampo=OpSum()
for i=1:L-1
if isodd(i)
ampo += -j1,"Cdag",i+1,"C",i
ampo += -j1,"Cdag",i,"C",i+1
elseif iseven(i)
ampo += -j2,"Cdag",i+1,"C",i
ampo += -j2,"Cdag",i,"C",i+1
end
end
if condition=="periodic"
ampo += -j2,"Cdag",1,"C",L
ampo += -j2,"Cdag",L,"C",1
elseif condition=="open"
end
H=MPO(ampo,sites)
# @show H
sweep=Sweeps(10)
setmaxdim!(sweep,120,250,400,600,800,1200,2000,2400,2600,3000)
setcutoff!(sweep,1e-8,1e-9,1e-9,1e-10,1e-11,1e-12,1e-14,1e-14,1e-14)
energy,psi=dmrg(H,psi0,sweep)
density=expect(psi,"N")
@show density
total=0
for i in eachindex(density)
total += density[i]
end
@show total
return
end