diff --git a/src/caches/beliefpropagationcache.jl b/src/caches/beliefpropagationcache.jl index 3b77a0b1..79ac1249 100644 --- a/src/caches/beliefpropagationcache.jl +++ b/src/caches/beliefpropagationcache.jl @@ -39,7 +39,7 @@ end function message_diff(message_a::Vector{ITensor}, message_b::Vector{ITensor}) lhs, rhs = contract(message_a), contract(message_b) - f = abs(dot(lhs / norm(lhs), rhs / norm(rhs)))^2 + f = abs2(dot(lhs / norm(lhs), rhs / norm(rhs))) return 1 - f end