The following is an example of creating a 2D-Heisenberg model for VUMPS calculations. However, I don’t quite understand the part where the interaction positions are specified when creating the opsum
.
First, due to the use of mod
, values corresponding to position 0 are included. What does the value 0 for site mean? When width=4, vertical interaction (3, 0) occurs but interaction (3,4) is absent.
Second, vertical hopping is defined only on the first line, but shouldn’t vertical hopping also be specified on the second line?
using ITensorInfiniteMPS
using ITensors, ITensorMPS
N = width # Number of sites in the unit cell
include(
joinpath(
pkgdir(ITensorInfiniteMPS), "examples", "vumps", "src", "vumps_subspace_expansion.jl"
),
)
maxdim = 256 # Maximum bond dimension
cutoff = 1e-6 # Singular value cutoff when increasing the bond dimension
max_vumps_iters = 100 # Maximum number of iterations of the VUMPS algorithm at each bond dimension
vumps_tol = 1e-4
conserve_qns = true
solver_tol = (x -> x / 10)
outer_iters = 10 # Number of times to increase the bond dimension
width = 4
initstate(n) = isodd(n) ? "↑" : "↓"
s = infsiteinds("S=1/2", N; conserve_qns, initstate)
ψ = InfMPS(s, initstate)
function ITensorInfiniteMPS.unit_cell_terms(::Model"heisenberg2D"; width)
opsum = OpSum()
for i in 1:width
# Vertical
opsum += -0.5, "S+", i, "S-", mod(i + 1, width)
opsum += -0.5, "S-", i, "S+", mod(i + 1, width)
opsum += "Sz", i, "Sz", mod(i + 1, width)
# Horizontal
opsum += -0.5, "S+", i, "S-", i + width
opsum += -0.5, "S-", i, "S+", i + width
opsum += "Sz", i, "Sz", i + width
end
return opsum
end