From 3e875cf08c11b8126c1a2b02453beb1f10378956 Mon Sep 17 00:00:00 2001 From: Joey Date: Tue, 19 Mar 2024 11:52:33 +0000 Subject: [PATCH] Avoid in-place normalization in default_message_update --- 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 81ef80ba..072d9553 100644 --- a/src/caches/beliefpropagationcache.jl +++ b/src/caches/beliefpropagationcache.jl @@ -3,7 +3,7 @@ default_messages(ptn::PartitionedGraph) = Dictionary() function default_message_update(contract_list::Vector{ITensor}; kwargs...) sequence = optimal_contraction_sequence(contract_list) updated_messages = contract(contract_list; sequence, kwargs...) - updated_messages = normalize!(updated_messages) + updated_messages /= norm(updated_messages) return ITensor[updated_messages] end @traitfn default_bp_maxiter(g::::(!IsDirected)) = is_tree(g) ? 1 : nothing