Skip to content

Commit b098d44

Browse files
JoeyT1994mtfishman
andauthored
Update src/caches/beliefpropagationcache.jl
Co-authored-by: Matt Fishman <[email protected]>
1 parent 66319b0 commit b098d44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/caches/beliefpropagationcache.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function default_message_update(contract_list::Vector{ITensor}; normalize=true,
2020
sequence = optimal_contraction_sequence(contract_list)
2121
updated_messages = contract(contract_list; sequence, kwargs...)
2222
message_norm = norm(updated_messages)
23-
if !iszero(message_norm) && normalize
23+
if normalize && !iszero(message_norm)
2424
updated_messages /= message_norm
2525
end
2626
return ITensor[updated_messages]

0 commit comments

Comments
 (0)