From b296277b2874ed6d962abc9ea5b3b769f58df247 Mon Sep 17 00:00:00 2001 From: Joseph Tindall <51231103+JoeyT1994@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:14:48 -0400 Subject: [PATCH] Update src/caches/beliefpropagationcache.jl Co-authored-by: Matt Fishman --- src/caches/beliefpropagationcache.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/caches/beliefpropagationcache.jl b/src/caches/beliefpropagationcache.jl index 77302637..85ab766d 100644 --- a/src/caches/beliefpropagationcache.jl +++ b/src/caches/beliefpropagationcache.jl @@ -157,9 +157,9 @@ function environment(bp_cache::BeliefPropagationCache, verts::Vector) return vcat(messages, central_tensors) end -function factors(bp_cache::BeliefPropagationCache, vertices::Vector) +function factors(bp_cache::BeliefPropagationCache, vertices) tn = tensornetwork(bp_cache) - return ITensor[tn[vertex] for vertex in vertices] + return map(vertex -> tn[vertex], vertices) end function factor(bp_cache::BeliefPropagationCache, vertex)