Skip to content

Commit

Permalink
Replaced occurances of promote_itensor_eltype by scalartype
Browse files Browse the repository at this point in the history
  • Loading branch information
tipfom authored Nov 15, 2024
1 parent 58cfe83 commit f56dd19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ function sample(rng::AbstractRNG, m::MPS)
error("sample: MPS is not normalized, norm=$(norm(m[1]))")
end

ElT = promote_itensor_eltype(m)
ElT = scalartype(m)

result = zeros(Int, N)
A = m[1]
Expand Down Expand Up @@ -751,7 +751,7 @@ function correlation_matrix(
end_site = last(sites)

N = length(psi)
ElT = promote_itensor_eltype(psi)
ElT = scalartype(psi)
s = siteinds(psi)

Op1 = _Op1 #make copies into which we can insert "F" string operators, and then restore.
Expand Down Expand Up @@ -985,7 +985,7 @@ updens, dndens = expect(psi, "Nup", "Ndn") # pass more than one operator
function expect(psi::MPS, ops; sites=1:length(psi), site_range=nothing)
psi = copy(psi)
N = length(psi)
ElT = promote_itensor_eltype(psi)
ElT = scalartype(psi)
s = siteinds(psi)

if !isnothing(site_range)
Expand Down

0 comments on commit f56dd19

Please sign in to comment.