@@ -32,20 +32,20 @@ function InfiniteSum{ITensor}(model::Model, s::CelledVector; kwargs...)
3232end
3333
3434# Get the first site with nontrivial support of the OpSum
35- first_site (opsum:: OpSum ) = minimum (ITensors . sites (opsum))
36- last_site (opsum:: OpSum ) = maximum (ITensors . sites (opsum))
35+ first_site (opsum:: OpSum ) = minimum (ITensorMPS . sites (opsum))
36+ last_site (opsum:: OpSum ) = maximum (ITensorMPS . sites (opsum))
3737
3838function set_site (o:: Op , s:: Int )
39- return Op (ITensors . which_op (o), s; ITensors . params (o)... )
39+ return Op (ITensorMPS . which_op (o), s; ITensorMPS . params (o)... )
4040end
4141
4242function shift_site (o:: Op , shift:: Int )
43- return set_site (o, ITensors . site (o) + shift)
43+ return set_site (o, ITensorMPS . site (o) + shift)
4444end
4545
4646function shift_sites (term:: Scaled{C,Prod{Op}} , shift:: Int ) where {C}
47- shifted_term = ITensors . coefficient (term)
48- for o in ITensors . terms (term)
47+ shifted_term = ITensorMPS . coefficient (term)
48+ for o in ITensorMPS . terms (term)
4949 shifted_term *= shift_site (o, shift)
5050 end
5151 return shifted_term
5555# By default, it shifts
5656function shift_sites (opsum:: OpSum , shift:: Int )
5757 shifted_opsum = OpSum ()
58- for o in ITensors . terms (opsum)
58+ for o in ITensorMPS . terms (opsum)
5959 shifted_opsum += shift_sites (o, shift)
6060 end
6161 return shifted_opsum
@@ -65,8 +65,8 @@ function InfiniteSum{MPO}(opsum::OpSum, s::CelledVector)
6565 n = cell_length (s)
6666 nrange = 0 # Maximum operator support
6767 opsums = [OpSum () for _ in 1 : n]
68- for o in ITensors . terms (opsum)
69- js = sort (ITensors . sites (o))
68+ for o in ITensorMPS . terms (opsum)
69+ js = sort (ITensorMPS . sites (o))
7070 j1 = first (js)
7171 nrange = max (nrange, last (js) - j1 + 1 )
7272 opsums[j1] += o
@@ -222,7 +222,7 @@ function InfiniteBlockMPO(model::Model, s::CelledVector, translator::Function; k
222222 return mpos
223223end
224224
225- function ITensors . MPO (model:: Model , s:: Vector{<:Index} ; kwargs... )
225+ function ITensorMPS . MPO (model:: Model , s:: Vector{<:Index} ; kwargs... )
226226 opsum = opsum_finite (model, length (s); kwargs... )
227227 return splitblocks (linkinds, MPO (opsum, s))
228228end
@@ -243,7 +243,7 @@ function infinite_terms(opsum::OpSum; kwargs...)
243243 # contains the terms with support starting on that
244244 # site of the unit cell, i.e. `opsum_cell[i]`
245245 # stores all terms starting on site `i`.
246- opsum_cell_dict = groupreduce (minimum ∘ ITensors . sites, + , opsum)
246+ opsum_cell_dict = groupreduce (minimum ∘ ITensorMPS . sites, + , opsum)
247247 nsites = maximum (keys (opsum_cell_dict))
248248 # check that we don't have terms we will ignore
249249 dropped = filter (x -> x <= 0 , keys (opsum_cell_dict))
286286
287287function filter_terms (f, opsum:: OpSum ; by= identity)
288288 filtered_opsum = OpSum ()
289- for t in ITensors . terms (opsum)
289+ for t in ITensorMPS . terms (opsum)
290290 if f (by (t))
291291 filtered_opsum += t
292292 end
@@ -299,7 +299,7 @@ function finite_terms(model::Model, n::Int; kwargs...)
299299 _finite_terms = OpSum[]
300300 for j in 1 : n
301301 term_j = _infite_terms[j]
302- filtered_term_j = filter_terms (s -> all (≤ (n), s), term_j; by= ITensors . sites)
302+ filtered_term_j = filter_terms (s -> all (≤ (n), s), term_j; by= ITensorMPS . sites)
303303 push! (_finite_terms, filtered_term_j)
304304 end
305305 return _finite_terms
0 commit comments