Skip to content

Commit

Permalink
Import scalartype from NDTensors
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Jun 25, 2024
1 parent 754e46c commit 6d275f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/caches/beliefpropagationcache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 6d275f1

Please sign in to comment.