Skip to content

Commit

Permalink
Changed BP ordering to sequential for a test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Oct 2, 2023
1 parent d0dda47 commit 54604ac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/test_belief_propagation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ ITensors.disable_warn_order()

Z = partition(ψψ; subgraph_vertices=collect(values(group(v -> v[1], vertices(ψψ)))))
mts = message_tensors(Z)
mts = belief_propagation(ψψ, mts; contract_kwargs=(; alg="exact"), target_precision=1e-8)
mts = belief_propagation(
ψψ,
mts;
contract_kwargs=(; alg="exact"),
target_precision=1e-8;
update_order="Sequential",
)

numerator_network = approx_network_region(
ψψ, mts, [(v, 1)]; verts_tn=ITensorNetwork(ITensor[apply(op("Sz", s[v]), ψ[v])])
Expand Down

0 comments on commit 54604ac

Please sign in to comment.