Skip to content

Commit

Permalink
Format test
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerviou committed Aug 23, 2023
1 parent c0c586e commit ac087d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_iMPOConversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ function ITensors.expect(ψ::InfiniteCanonicalMPS, h::InfiniteMPOMatrix)
Ncell = nsites(h)
L, R = generate_edges(h)
l = commoninds.AL[0], ψ.AL[1])
L = map(a -> contract(a, δ(l, dag(prime(l))) ), L)
L = map(a -> contract(a, δ(l, dag(prime(l)))), L)
r = commoninds.AR[Ncell + 1], ψ.AR[Ncell])
R = map(a -> contract(a, δ(r, dag(prime(r))) ), R)
L = map(a -> contract(a, ψ.C[0], dag(prime.C[0])) ), L)
R = map(a -> contract(a, δ(r, dag(prime(r)))), R)
L = map(a -> contract(a, ψ.C[0], dag(prime.C[0]))), L)
for j in 1:nsites(ψ)
temp = map(a -> contract(a, ψ.AR[j], dag(prime.AR[j])) ), h[j])
temp = map(a -> contract(a, ψ.AR[j], dag(prime.AR[j]))), h[j])
L = L * temp
end
return (L * R)[1][1]#ITensorInfiniteMPS.scalar_product(L, R)[1]
Expand Down

0 comments on commit ac087d9

Please sign in to comment.