Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Refactor Product-Chain contraction with overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Sánchez Ramírez committed Jun 25, 2024
1 parent 266ae52 commit 369dcc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ansatz/Chain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -748,5 +748,5 @@ function overlap(::State, a::Chain, ::State, b::Chain)
end

# TODO optimize
overlap(a::Product, b::Chain) = overlap(convert(Chain, a), b)
overlap(a::Chain, b::Product) = overlap(a, convert(Chain, b))
overlap(a::Product, b::Chain) = contract(TensorNetwork(merge(Quantum(a), Quantum(b)')))
overlap(a::Chain, b::Product) = contract(TensorNetwork(merge(Quantum(a), Quantum(b)')))

0 comments on commit 369dcc8

Please sign in to comment.