Skip to content

Commit 16724ff

Browse files
committed
Fix more namespace issues
1 parent 6dd5b51 commit 16724ff

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/infinitemps.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,21 @@ function ITensorMPS.findfirstsiteind(ψ::InfiniteCanonicalMPS, i::Index)
100100
end
101101

102102
function ITensorMPS.findsites::InfiniteCanonicalMPS, is::Union{<:Tuple,<:Vector})
103-
return sort([ITensors.findfirstsiteind(ψ, i) for i in is])
103+
return sort([ITensorMPS.findfirstsiteind(ψ, i) for i in is])
104104
end
105105
function ITensorMPS.findsites::InfiniteMPS, is::Union{<:Tuple,<:Vector})
106-
return sort([ITensors.findfirstsiteind(ψ, i) for i in is])
106+
return sort([ITensorMPS.findfirstsiteind(ψ, i) for i in is])
107107
end
108108
function ITensorMPS.findsites::InfiniteMPS, T::MPO)
109109
s = [noprime(filterinds(T[x]; plev=1)[1]) for x in 1:length(T)]
110-
return sort([ITensors.findfirstsiteind(ψ, i) for i in s])
110+
return sort([ITensorMPS.findfirstsiteind(ψ, i) for i in s])
111111
end
112112
ITensorMPS.findsites::InfiniteCanonicalMPS, T::MPO) = findsites.AL, T)
113113

114114
#Kept for historical reason
115115
function ITensorMPS.findsites::InfiniteMPS, T::ITensor)
116116
s = filterinds(T; plev=0)
117-
return sort([ITensors.findfirstsiteind(ψ, i) for i in s])
117+
return sort([ITensorMPS.findfirstsiteind(ψ, i) for i in s])
118118
end
119119
ITensorMPS.findsites::InfiniteCanonicalMPS, T::ITensor) = findsites.AL, T)
120120

@@ -230,7 +230,7 @@ function ITensorMPS.findfirstsiteind(h::ITensor, i::Index, ncell::Int64)
230230
end
231231
function ITensorMPS.findsites(h::ITensor; ncell::Int64=1)
232232
s = filterinds(h; plev=0)
233-
return sort([ITensors.findfirstsiteind(h, i, ncell) for i in s])
233+
return sort([ITensorMPS.findfirstsiteind(h, i, ncell) for i in s])
234234
end
235235

236236
## HDF5 support for the InfiniteCanonicalMPS type

src/models/models.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ function InfiniteSum{ITensor}(model::Model, s::CelledVector; kwargs...)
3232
end
3333

3434
# Get the first site with nontrivial support of the OpSum
35-
first_site(opsum::OpSum) = minimum(ITensorMPS.sites(opsum))
36-
last_site(opsum::OpSum) = maximum(ITensorMPS.sites(opsum))
35+
first_site(opsum::OpSum) = minimum(ITensors.sites(opsum))
36+
last_site(opsum::OpSum) = maximum(ITensors.sites(opsum))
3737

3838
function set_site(o::Op, s::Int)
3939
return Op(ITensorMPS.which_op(o), s; ITensorMPS.params(o)...)
@@ -66,7 +66,7 @@ function InfiniteSum{MPO}(opsum::OpSum, s::CelledVector)
6666
nrange = 0 # Maximum operator support
6767
opsums = [OpSum() for _ in 1:n]
6868
for o in ITensorMPS.terms(opsum)
69-
js = sort(ITensorMPS.sites(o))
69+
js = sort(ITensors.sites(o))
7070
j1 = first(js)
7171
nrange = max(nrange, last(js) - j1 + 1)
7272
opsums[j1] += o
@@ -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 ITensorMPS.sites, +, opsum)
246+
opsum_cell_dict = groupreduce(minimum ITensors.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))
@@ -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=ITensorMPS.sites)
302+
filtered_term_j = filter_terms(s -> all((n), s), term_j; by=ITensors.sites)
303303
push!(_finite_terms, filtered_term_j)
304304
end
305305
return _finite_terms

0 commit comments

Comments
 (0)