Skip to content

Commit

Permalink
Revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Jun 16, 2024
1 parent e1344f0 commit 66319b0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/caches/beliefpropagationcache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ using NamedGraphs.PartitionedGraphs:
unpartitioned_graph
using SimpleTraits: SimpleTraits, Not, @traitfn

#default_message(inds_e) = ITensor[denseblocks(delta(i)) for i in inds_e]
default_message(inds_e) = ITensor[denseblocks(delta(inds_e))]
default_message(inds_e) = ITensor[denseblocks(delta(i)) for i in inds_e]
default_messages(ptn::PartitionedGraph) = Dictionary()
default_message_norm(m::ITensor) = norm(m)
function default_message_update(contract_list::Vector{ITensor}; normalize=true, kwargs...)
Expand Down Expand Up @@ -183,7 +182,6 @@ function update_message(
)
vertex = src(edge)
messages = environment(bp_cache, vertex; ignore_edges=PartitionEdge[reverse(edge)])

state = factor(bp_cache, vertex)

return message_update(ITensor[messages; state]; message_update_kwargs...)
Expand Down Expand Up @@ -269,7 +267,6 @@ Update the tensornetwork inside the cache
"""
function update_factors(bp_cache::BeliefPropagationCache, factors)
bp_cache = copy(bp_cache)
factors = copy(factors)
tn = tensornetwork(bp_cache)
for vertex in eachindex(factors)
# TODO: Add a check that this preserves the graph structure.
Expand Down

0 comments on commit 66319b0

Please sign in to comment.