Hello everyone,
I am trying to reproduce the results from a paper on the Anyon Hubbard model.
(ImageSource:DOI: 10.1103/PhysRevB.97.115126)
After defining the operators, I encountered an issue: when summing terms in the Hamiltonian using the following expressions:
os += -J,"adag",j,"a",j+1,"ExpIθn",j
os += -J,"adag",j+1,"a",j,"ExpIθndag",j
my program identifies the Hamiltonian as a non-Hermitian Hamiltonian. However, in theory, the Hamiltonian should be Hermitian.
Due to my limited programming experience, I couldn’t find a solution on the forum. Additionally, I am not sure if my ExpIθn
function is implemented correctly.
Any suggestions or guidance would be greatly appreciated! Thank you all for your help.
this is a code demo:
using ITensors, ITensorMPS
let
function ITensors.op(::OpName"ExpIθn", ::SiteType"Qudit", d::Int)
mat = zeros(ComplexF64, d, d)
for k in 1:d
mat[k, k] = exp(im *1*pi * (k - 1))
end
return mat
end
function ITensors.op(::OpName"ExpIθndag", ::SiteType"Qudit", d::Int)
mat = zeros(ComplexF64, d, d)
for k in 1:d
mat[k, k] = exp(im *1*pi * (k - 1))
end
return mat'
end
#----------------------------parameter---------------------
N=60
L_list = collect(Int64, 1:1:N)
U=10
J=1.0
V=10
alpha=1/3
delta=2*pi/3
#----------------------------parameter dmrg----------------
maxdim = [10,10,20,20,30,30,40,40,80,80,200,200,400,400,600,600]
nsweeps=40
cutoff = [1E-9]
noise=[1E-6,1E-6,1E-6,1E-7,1E-7,1E-7,1E-7,1E-7,1E-7,1E-8,1E-8,1E-8,1E-9,1E-9,1E-9,1E-9,1E-9,1E-9,1E-10,1E-10,1E-10,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,1E-11,0.0]
etol=1E-7
#---------------------------- dmrg----------------
state = [ n % 3 == 0 ? "1" : "0" for n=1:N]
sites = siteinds("Boson",N,conserve_qns=true,dim=5)
psi0 = random_mps(sites,state)
@show flux(psi0)
os = OpSum()
for j=1:N-1
os += -J,"adag",j,"a",j+1,"ExpIθn",j
os += -J,"adag",j+1,"a",j,"ExpIθndag",j
end
for j=1:N
os += U/2,"n",j, "n",j
os -= U/2,"n",j
end
for j=1:N
os += V*cos(2*pi*alpha*j+delta),"n",j
end
#pbc
os += -J,"adag",N,"a",1,"ExpIθn",N
os += -J,"ExpIθndag",N,"adag",1,"a",N
H = MPO(os,sites)
#----------------------------strat calculate---------------
energy,psi = dmrg(H,psi0;nsweeps,noise,maxdim,cutoff)
end