We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66319b0 commit b098d44Copy full SHA for b098d44
src/caches/beliefpropagationcache.jl
@@ -20,7 +20,7 @@ function default_message_update(contract_list::Vector{ITensor}; normalize=true,
20
sequence = optimal_contraction_sequence(contract_list)
21
updated_messages = contract(contract_list; sequence, kwargs...)
22
message_norm = norm(updated_messages)
23
- if !iszero(message_norm) && normalize
+ if normalize && !iszero(message_norm)
24
updated_messages /= message_norm
25
end
26
return ITensor[updated_messages]
0 commit comments