Hello,
Lately I’ve been trying to understand the ITensorInfiniteMPS package. For example, the one given here on Heisenberg model. I have the following questions:
-
What do \psi.AL and \psi.C mean in the code?
-
In the code for models, for example Ising model, we have the following:
function ITensors.MPO(::Model"ising", s; J, h)
N = length(s)
a = OpSum()
for n in 1:(N - 1)
a .+= -J, “X”, n, “X”, n + 1
end
for n in 1:N
a .+= -h, “Z”, n
end
return splitblocks(linkinds, MPO(a, s))
endfunction ITensors.OpSum(::Model"ising", n1, n2; J, h)
opsum = OpSum()
if J != 0
opsum += -J, “X”, n1, “X”, n2
end
if h != 0
opsum += -h / 2, “Z”, n1
opsum += -h / 2, “Z”, n2
end
return opsum
end
This MPO() here seems to be defined specifically for the Ising model, is it different from the one used in finite system DMRG? Also, it seems that OpSum() is very similar to MPO(). Is there any difference? Is there a reason that .+= is used for one and += is used for the other?
- Where is the model “ising” defined? In the code ising.jl it seems that “ising” is used as an argument in defining the two functions MPO() and OpSum().
Thanks a lot for your time.
-Meng