From 66319b07220c61a3bdcbc4a8782e60194a17d5fa Mon Sep 17 00:00:00 2001 From: Joey Date: Sun, 16 Jun 2024 09:44:16 -0400 Subject: [PATCH] Revert some changes --- src/caches/beliefpropagationcache.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/caches/beliefpropagationcache.jl b/src/caches/beliefpropagationcache.jl index 1345c8bd..2de5fe8c 100644 --- a/src/caches/beliefpropagationcache.jl +++ b/src/caches/beliefpropagationcache.jl @@ -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...) @@ -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...) @@ -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.