Skip to content

Commit

Permalink
Better fidelity def
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Jun 25, 2024
1 parent 6eb3ced commit b23f5a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/caches/beliefpropagationcache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ function message_diff(message_a::Vector{ITensor}, message_b::Vector{ITensor})
rhs *= c
lhs /= norm(lhs)
rhs /= norm(rhs)
return 1 - sqrt(abs(dot(lhs, rhs)))
f = abs(dot(lhs, rhs))^2
return 1 - f
end

struct BeliefPropagationCache{PTN,MTS,DM}
Expand Down

0 comments on commit b23f5a6

Please sign in to comment.