You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tensors= [ITensor(model, s, n; kwargs...) for n in1:N] #slightly improved version. Note: the current implementation does not really allow for staggered potentials for example
28
-
returnInfiniteITensorSum(tensors)
27
+
mpos= [MPO(model, s, n; kwargs...) for n in1:N] #slightly improved version. Note: the current implementation does not really allow for staggered potentials for example
28
+
returnInfiniteITensorSum(mpos)
29
29
end
30
30
31
-
#Version accepting IndexSet
32
-
function ITensors.ITensor(model::Model, s::CelledVector, n::Int64; kwargs...)
31
+
#MPO building version
32
+
function ITensors.MPO(model::Model, s::CelledVector, n::Int64; kwargs...)
33
33
n1, n2 =1, 2
34
34
opsum =OpSum(model, n1, n2; kwargs...)
35
-
returnprod(MPO(opsum, [s[x] for x in n:(n +nrange(model) -1)])) #modification to allow for more than two sites per term in the Hamiltonians
35
+
returnMPO(opsum, [s[x] for x in n:(n +nrange(model) -1)]) #modification to allow for more than two sites per term in the Hamiltonians
36
+
end
37
+
38
+
# Version accepting IndexSet
39
+
function ITensors.ITensor(model::Model, s::CelledVector, n::Int64; kwargs...)
40
+
returnprod(MPO(model, s, n; kwargs...)) #modification to allow for more than two sites per term in the Hamiltonians
0 commit comments