From 6d275f125d613c11568ed013ef4ec9700bcefe97 Mon Sep 17 00:00:00 2001 From: Joseph Tindall Date: Tue, 25 Jun 2024 16:30:46 -0400 Subject: [PATCH] Import scalartype from NDTensors --- src/caches/beliefpropagationcache.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/caches/beliefpropagationcache.jl b/src/caches/beliefpropagationcache.jl index 6cc0ef42..3da4ca67 100644 --- a/src/caches/beliefpropagationcache.jl +++ b/src/caches/beliefpropagationcache.jl @@ -12,6 +12,7 @@ using NamedGraphs.PartitionedGraphs: partitionedges, unpartitioned_graph using SimpleTraits: SimpleTraits, Not, @traitfn +using NDTensors: NDTensors default_message(elt, inds_e) = ITensor[denseblocks(delta(elt, i)) for i in inds_e] default_messages(ptn::PartitionedGraph) = Dictionary() @@ -97,7 +98,7 @@ for f in [ end end -ITensorNetworks.scalartype(bp_cache) = scalartype(tensornetwork(bp_cache)) +NDTensors.scalartype(bp_cache) = scalartype(tensornetwork(bp_cache)) function default_message(bp_cache::BeliefPropagationCache, edge::PartitionEdge) return default_message(bp_cache)(scalartype(bp_cache), linkinds(bp_cache, edge))