Thank you @VinceNeede for good comments.
Now, my code well operates, but the result of DMRG is weird.
the sweep result look like oscillation between some eigenstates which are near the lowest imaginary part, and also it has different with the ED results (attached picture is ED result of 10 eigenvalues and the sweep procedure).
However, the result of real-valued case (hermitian) is well-matched with ED(converge to ground state, and also eigenvalue is same with ED).
Is it intrinsic limitation of DMRG for non-hermitian cases?
or if not, would you mind to correct some parts of my codes?
This is my full code,
using ITensors, ITensorMPS
let
len = 15
Nbosons = 3
U = 2-0.5im
J = 1.
maxdim = [10, 10, 20, 20, 30, 30, 40, 40, 80, 80]
nsweeps = 300
cutoff = 1.e-13
function constructBoseHubbardHamiltonian(J::Float64, U::Complex, length::Int, pbc::Bool)::OpSum
os = OpSum()
for j = 1:length-1
os += -J, "adag", j, "a", j + 1
os += -J, "adag", j + 1, "a", j
end
for j = 1:length
os += U / 2, "n", j, "n", j
os += -U / 2, "n", j
end
if pbc
os += -J, "adag", length, "a", 1
os += -J, "adag", 1, "a", length
end
return os
end
function constructBoseHubbardHamiltonian(J::Float64, U::Complex, length::Int, pbc::Bool, sites::Vector{<:Index})::MPO
os = constructBoseHubbardHamiltonian(J, U, length, pbc)
return MPO(os, sites)
end
function constructInitialState(length::Int, Nbosons::Int, sites::Vector{<:Index})
state = [n <= Nbosons ? "1" : "0" for n = 1:length]
psi0 = random_mps(sites, state)
return psi0
end
sites = siteinds("Boson", len, conserve_qns=true, dim=4)
psi0 = constructInitialState(len, Nbosons, sites)
H = constructBoseHubbardHamiltonian(J, U, len, false, sites)
energy, psi = dmrg(H, psi0; nsweeps=nsweeps, maxdim=maxdim, cutoff=cutoff, ishermitian=false, eigsolve_which_eigenvalue = :SI)
end
Thank you!