From f0d6a6fa66b077da616216097c273218f95553d5 Mon Sep 17 00:00:00 2001 From: Matt Fishman Date: Fri, 26 Apr 2024 15:37:15 -0400 Subject: [PATCH] Update to `NamedGraphs` 0.6 (#163) --- Project.toml | 6 +-- README.md | 42 ++++++++++----------- src/abstractitensornetwork.jl | 11 +++--- src/contract.jl | 9 ++--- src/contraction_sequences.jl | 6 +-- src/treetensornetworks/projttns/projttn.jl | 2 +- src/treetensornetworks/treetensornetwork.jl | 2 +- src/visualize.jl | 19 ++++++---- 8 files changed, 50 insertions(+), 47 deletions(-) diff --git a/Project.toml b/Project.toml index 0c144636..bd434c6b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ITensorNetworks" uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7" authors = ["Matthew Fishman and contributors"] -version = "0.10.0" +version = "0.10.1" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" @@ -49,7 +49,7 @@ ITensorNetworksOMEinsumContractionOrdersExt = "OMEinsumContractionOrders" AbstractTrees = "0.4.4" Combinatorics = "1" Compat = "3, 4" -DataGraphs = "0.2.2" +DataGraphs = "0.2.3" DataStructures = "0.18" Dictionaries = "0.4" Distributions = "0.25.86" @@ -61,7 +61,7 @@ ITensors = "0.4" IsApprox = "0.1" IterTools = "1.4.0" KrylovKit = "0.6, 0.7" -NamedGraphs = "0.5.1" +NamedGraphs = "0.6.0" NDTensors = "0.3" Observers = "0.2" OMEinsumContractionOrders = "0.8.3" diff --git a/README.md b/README.md index 629f281f..6ce69026 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ julia> using ITensorNetworks: ITensorNetwork julia> tn = ITensorNetwork(path_graph(4); link_space=2) ITensorNetworks.ITensorNetwork{Int64} with 4 vertices: -4-element Dictionaries.Indices{Int64} +4-element NamedGraphs.OrderedDictionaries.OrderedIndices{Int64} 1 2 3 @@ -93,7 +93,7 @@ julia> using NamedGraphs.NamedGraphGenerators: named_grid julia> tn = ITensorNetwork(named_grid((2, 2)); link_space=2) ITensorNetworks.ITensorNetwork{Tuple{Int64, Int64}} with 4 vertices: -4-element Dictionaries.Indices{Tuple{Int64, Int64}} +4-element NamedGraphs.OrderedDictionaries.OrderedIndices{Tuple{Int64, Int64}} (1, 1) (2, 1) (1, 2) @@ -128,7 +128,7 @@ julia> neighbors(tn, (1, 2)) julia> tn_1 = subgraph(v -> v[1] == 1, tn) ITensorNetworks.ITensorNetwork{Tuple{Int64, Int64}} with 2 vertices: -2-element Dictionaries.Indices{Tuple{Int64, Int64}} +2-element NamedGraphs.OrderedDictionaries.OrderedIndices{Tuple{Int64, Int64}} (1, 1) (1, 2) @@ -142,7 +142,7 @@ with vertex data: julia> tn_2 = subgraph(v -> v[1] == 2, tn) ITensorNetworks.ITensorNetwork{Tuple{Int64, Int64}} with 2 vertices: -2-element Dictionaries.Indices{Tuple{Int64, Int64}} +2-element NamedGraphs.OrderedDictionaries.OrderedIndices{Tuple{Int64, Int64}} (2, 1) (2, 2) @@ -167,7 +167,7 @@ julia> using ITensorUnicodePlots: @visualize julia> s = siteinds("S=1/2", named_grid(3)) ITensorNetworks.IndsNetwork{Int64, ITensors.Index} with 3 vertices: -3-element Dictionaries.Indices{Int64} +3-element NamedGraphs.OrderedDictionaries.OrderedIndices{Int64} 1 2 3 @@ -187,7 +187,7 @@ and edge data: julia> tn1 = ITensorNetwork(s; link_space=2) ITensorNetworks.ITensorNetwork{Int64} with 3 vertices: -3-element Dictionaries.Indices{Int64} +3-element NamedGraphs.OrderedDictionaries.OrderedIndices{Int64} 1 2 3 @@ -204,7 +204,7 @@ with vertex data: julia> tn2 = ITensorNetwork(s; link_space=2) ITensorNetworks.ITensorNetwork{Int64} with 3 vertices: -3-element Dictionaries.Indices{Int64} +3-element NamedGraphs.OrderedDictionaries.OrderedIndices{Int64} 1 2 3 @@ -305,20 +305,20 @@ julia> @visualize Z̃; ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Z̃(3, 1)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠉⠉⠑⠒⠒⠢⠤⠤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈2⠉⠑⠒⠒⠤⠤⠤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀(2)'⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Z̃(3, 2)⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⠊⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀2⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀Z̃(2, 1)⠤⠤⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⢣⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠑⠒2⠢⠤⠤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⣀⠔⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉Z̃(2, 2)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀2⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠤⠤⠒⠊⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⣀⡠⠤2⠒⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⢱⠀⢀⣀⠤⠔⠒⠊⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀Z̃(1, 2)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Z̃(2, 1)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀(2)'⠤⠤⠔⠒⠒⠉⠉⠀⠀⢱⠀⠈⠉⠑⠒⠢⠤⢄⣀2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⣀⣀⠤⠤⠔⠒⠊⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠒⠒⠤⠤⢄⣀⡀⠀⠀⠀⠀⠀ + ⠀Z̃(3, 1)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Z̃(1, 2)⠀⠀ + ⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⡠2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀2⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⢀⠤⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Z̃(2, 2)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡠⠤⠒⠊⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠤2⠒⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⣀⡠⠤⠒⠊⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀Z̃(3, 2)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ diff --git a/src/abstractitensornetwork.jl b/src/abstractitensornetwork.jl index 59c3804a..f38b6988 100644 --- a/src/abstractitensornetwork.jl +++ b/src/abstractitensornetwork.jl @@ -39,8 +39,7 @@ using ITensors: using ITensors.ITensorMPS: ITensorMPS, add, linkdim, linkinds, siteinds using .ITensorsExtensions: ITensorsExtensions, indtype, promote_indtype using LinearAlgebra: LinearAlgebra, factorize -using NamedGraphs: - NamedGraphs, NamedGraph, not_implemented, parent_vertex_to_vertex, vertex_to_parent_vertex +using NamedGraphs: NamedGraphs, NamedGraph, not_implemented using NamedGraphs.GraphsExtensions: ⊔, directed_graph, incident_edges, rename_vertices, vertextype using NDTensors: NDTensors, dim @@ -94,11 +93,11 @@ function DataGraphs.edge_data(graph::AbstractITensorNetwork, args...) end DataGraphs.underlying_graph(tn::AbstractITensorNetwork) = underlying_graph(data_graph(tn)) -function NamedGraphs.vertex_to_parent_vertex(tn::AbstractITensorNetwork, vertex) - return vertex_to_parent_vertex(underlying_graph(tn), vertex) +function NamedGraphs.vertex_positions(tn::AbstractITensorNetwork) + return NamedGraphs.vertex_positions(underlying_graph(tn)) end -function NamedGraphs.parent_vertex_to_vertex(tn::AbstractITensorNetwork, parent_vertex) - return parent_vertex_to_vertex(underlying_graph(tn), parent_vertex) +function NamedGraphs.ordered_vertices(tn::AbstractITensorNetwork) + return NamedGraphs.ordered_vertices(underlying_graph(tn)) end # diff --git a/src/contract.jl b/src/contract.jl index c0229849..0fc575a6 100644 --- a/src/contract.jl +++ b/src/contract.jl @@ -1,8 +1,9 @@ -using NamedGraphs: vertex_to_parent_vertex using ITensors: ITensor, scalar using ITensors.ContractionSequenceOptimization: deepmap using ITensors.NDTensors: NDTensors, Algorithm, @Algorithm_str, contract using LinearAlgebra: normalize! +using NamedGraphs: NamedGraphs +using NamedGraphs.OrdinalIndexing: th function NDTensors.contract(tn::AbstractITensorNetwork; alg="exact", kwargs...) return contract(Algorithm(alg), tn; kwargs...) @@ -15,10 +16,8 @@ function NDTensors.contract( sequence=contraction_sequence(tn; contraction_sequence_kwargs...), kwargs..., ) - # TODO: Use `vertex`. - sequence_linear_index = deepmap(v -> vertex_to_parent_vertex(tn, v), sequence) - # TODO: Use `tokenized_vertex`. - ts = map(pv -> tn[parent_vertex_to_vertex(tn, pv)], 1:nv(tn)) + sequence_linear_index = deepmap(v -> NamedGraphs.vertex_positions(tn)[v], sequence) + ts = map(v -> tn[v], (1:nv(tn))th) return contract(ts; sequence=sequence_linear_index, kwargs...) end diff --git a/src/contraction_sequences.jl b/src/contraction_sequences.jl index f97459f7..896be34d 100644 --- a/src/contraction_sequences.jl +++ b/src/contraction_sequences.jl @@ -2,8 +2,8 @@ using Graphs: vertices using ITensors: ITensor, contract using ITensors.ContractionSequenceOptimization: deepmap, optimal_contraction_sequence using ITensors.NDTensors: Algorithm, @Algorithm_str -using NamedGraphs: parent_vertex_to_vertex using NamedGraphs.Keys: Key +using NamedGraphs.OrdinalIndexing: th function contraction_sequence(tn::Vector{ITensor}; alg="optimal", kwargs...) return contraction_sequence(Algorithm(alg), tn; kwargs...) @@ -11,10 +11,10 @@ end function contraction_sequence(tn::AbstractITensorNetwork; kwargs...) # TODO: Use `token_vertex` and/or `token_vertices` here. - ts = map(pv -> tn[parent_vertex_to_vertex(tn, pv)], 1:nv(tn)) + ts = map(v -> tn[v], (1:nv(tn))th) seq_linear_index = contraction_sequence(ts; kwargs...) # TODO: Use `Functors.fmap` or `StructWalk`? - return deepmap(n -> Key(parent_vertex_to_vertex(tn, n)), seq_linear_index) + return deepmap(n -> Key(vertices(tn)[n * th]), seq_linear_index) end function contraction_sequence(::Algorithm"optimal", tn::Vector{ITensor}) diff --git a/src/treetensornetworks/projttns/projttn.jl b/src/treetensornetworks/projttns/projttn.jl index f0e5d90d..dcf10bbb 100644 --- a/src/treetensornetworks/projttns/projttn.jl +++ b/src/treetensornetworks/projttns/projttn.jl @@ -14,7 +14,7 @@ struct ProjTTN{V,Pos<:Union{Indices{V},NamedEdge{V}}} <: AbstractProjTTN{V} environments::Dictionary{NamedEdge{V},ITensor} end -function ProjTTN(pos::Vector, operator::TTN, environments::Dictionary) +function ProjTTN(pos, operator::TTN, environments::Dictionary) return ProjTTN(Indices(pos), operator, environments) end diff --git a/src/treetensornetworks/treetensornetwork.jl b/src/treetensornetworks/treetensornetwork.jl index 405844fb..cc50230e 100644 --- a/src/treetensornetworks/treetensornetwork.jl +++ b/src/treetensornetworks/treetensornetwork.jl @@ -16,7 +16,7 @@ struct TreeTensorNetwork{V} <: AbstractTreeTensorNetwork{V} end end -function _TreeTensorNetwork(tensornetwork::ITensorNetwork, ortho_region::Vector) +function _TreeTensorNetwork(tensornetwork::ITensorNetwork, ortho_region) return _TreeTensorNetwork(tensornetwork, Indices(ortho_region)) end diff --git a/src/visualize.jl b/src/visualize.jl index ad814cf3..5599ea3c 100644 --- a/src/visualize.jl +++ b/src/visualize.jl @@ -1,9 +1,7 @@ -# TODO: Move to `ITensorNetworksITensors.ITensorVisualizationCoreExt`. -using DataGraphs: AbstractDataGraph, underlying_graph +# TODO: Move to `NamedGraphsITensorVisualizationCoreExt`. using Graphs: vertices -using ITensors.ITensorVisualizationCore: ITensorVisualizationCore, visualize -using NamedGraphs: AbstractNamedGraph, parent_graph - +using NamedGraphs: NamedGraphs, AbstractNamedGraph +using ITensors.ITensorVisualizationCore: ITensorVisualizationCore function ITensorVisualizationCore.visualize( graph::AbstractNamedGraph, args...; @@ -15,9 +13,16 @@ function ITensorVisualizationCore.visualize( vertex_labels = [vertex_labels_prefix * string(v) for v in vertices(graph)] end #edge_labels = [string(e) for e in edges(graph)] - return visualize(parent_graph(graph), args...; vertex_labels, kwargs...) + return ITensorVisualizationCore.visualize( + NamedGraphs.position_graph(graph), args...; vertex_labels, kwargs... + ) end +# TODO: Move to `DataGraphsITensorVisualizationCoreExt`. +using DataGraphs: DataGraphs, AbstractDataGraph +using ITensors.ITensorVisualizationCore: ITensorVisualizationCore function ITensorVisualizationCore.visualize(graph::AbstractDataGraph, args...; kwargs...) - return visualize(underlying_graph(graph), args...; kwargs...) + return ITensorVisualizationCore.visualize( + DataGraphs.underlying_graph(graph), args...; kwargs... + ) end