Skip to content

Commit 66319b0

Browse files
committed
Revert some changes
1 parent e1344f0 commit 66319b0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/caches/beliefpropagationcache.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ using NamedGraphs.PartitionedGraphs:
1313
unpartitioned_graph
1414
using SimpleTraits: SimpleTraits, Not, @traitfn
1515

16-
#default_message(inds_e) = ITensor[denseblocks(delta(i)) for i in inds_e]
17-
default_message(inds_e) = ITensor[denseblocks(delta(inds_e))]
16+
default_message(inds_e) = ITensor[denseblocks(delta(i)) for i in inds_e]
1817
default_messages(ptn::PartitionedGraph) = Dictionary()
1918
default_message_norm(m::ITensor) = norm(m)
2019
function default_message_update(contract_list::Vector{ITensor}; normalize=true, kwargs...)
@@ -183,7 +182,6 @@ function update_message(
183182
)
184183
vertex = src(edge)
185184
messages = environment(bp_cache, vertex; ignore_edges=PartitionEdge[reverse(edge)])
186-
187185
state = factor(bp_cache, vertex)
188186

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

0 commit comments

Comments
 (0)