Hey miles
Thanks for your reply. I still have some doubts about “gates” and function “sample!”. Here is my minimal runable code
function ITensors.op(::OpName"expτSS9", ::SiteType"Boson", n1::Index, n2::Index; τ)
h =
t * op("Adag", n1) * op("A", n2) +
t * op("Adag", n2) * op("A", n1) -
U2/2 * op("N * N", n1) * op("Id", n2) +
U2/2 * op("N", n1) * op("Id", n2) -
V2 * op("N", n1) * op("N", n2) -
miu2 * op("N", n1) * op("Id", n2)
return exp(τ * h)
end
so = siteinds("Boson", N, dim=3)
gates10 = ops([("expτSS9", (n, n + 1), (τ=-δτ / 2,)) for n in 1:(N - 1)], so)
append!(gates10, reverse(gates10));
psi = randomMPS(so)
τ_range = δτ:δτ:(beta / 2)
for τ in τ_range
psi10 = apply(gates10, psi10; cutoff)
normalize!(psi10)
@show sample!(psi10)
end
There is not indicate an error, but the output of this part of code is
sample!(psi10) = [3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 1, 3, 2, 3]
sample!(psi10) = [3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 2]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
sample!(psi10) = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
I do not know the number 3 refers to whether the number of particles per site is 0 or 2. Why is psi10 like this?
Yuanyu