Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Oct 3, 2023
1 parent 6fdd8d8 commit 6e0f152
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/beliefpropagation/sqrt_beliefpropagation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ function sqrt_belief_propagation_iteration(
"Specified update order is not currently implemented. Choose parallel or sequential."
)
end
incoming_mts = update_order == "parallel" ? mts : new_mts
incoming_sqrt_mts = update_order == "parallel" ? sqrt_mts : new_sqrt_mts
c = 0.0
for e in edges
environment_tensornetworks = ITensorNetwork[
sqrt_mts[e_in] for
e_in in setdiff(boundary_edges(sqrt_mts, [src(e)]; dir=:in), [reverse(e)])
incoming_sqrt_mts[e_in] for
e_in in setdiff(boundary_edges(incoming_sqrt_mts, [src(e)]; dir=:in), [reverse(e)])
]

new_sqrt_mts[src(e) => dst(e)] = update_sqrt_message_tensor(
tn, sqrt_mts[src(e)], environment_tensornetworks;
tn, incoming_sqrt_mts[src(e)], environment_tensornetworks;
)

# if compute_norm
Expand Down

0 comments on commit 6e0f152

Please sign in to comment.