Skip to content

Commit 0228aa1

Browse files
committed
Fix Bug in Expect
1 parent 5b9266e commit 0228aa1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/expect.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ function ITensorMPS.expect(
2525
(cache!)=nothing,
2626
update_cache=isnothing(cache!),
2727
cache_update_kwargs=default_cache_update_kwargs(alg),
28-
cache_construction_function=tn ->
29-
cache(alg, tn; default_cache_construction_kwargs(alg, tn)...),
28+
cache_construction_kwargs=default_cache_construction_kwargs(alg, inner_network(ψ, ψ)),
3029
kwargs...,
3130
)
3231
ψIψ = inner_network(ψ, ψ)
3332
if isnothing(cache!)
34-
cache! = Ref(cache_construction_function(ψIψ))
33+
cache! = Ref(cache(alg, ψIψ; cache_construction_kwargs...))
3534
end
3635

3736
if update_cache

0 commit comments

Comments
 (0)