From 173e19bd6979d83067b8716c50805ceae08171cf Mon Sep 17 00:00:00 2001 From: Joseph Tindall <51231103+JoeyT1994@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:55:30 -0400 Subject: [PATCH] Update src/caches/beliefpropagationcache.jl Co-authored-by: Matt Fishman --- src/caches/beliefpropagationcache.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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