Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ITensorNetworksNext"
uuid = "302f2e75-49f0-4526-aef7-d8ba550cb06c"
version = "0.10.8"
version = "0.10.9"
authors = ["ITensor developers <support@itensor.org> and contributors"]

[workspace]
Expand Down
12 changes: 0 additions & 12 deletions src/abstracttensornetwork.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Adapt: Adapt, adapt
using DataGraphs: DataGraphs, AbstractDataGraph, AbstractVertexDataGraph, edge_data,
set_vertex_data!, underlying_graph, underlying_graph_type, vertex_data
using Dictionaries: Dictionary
using Graphs: Graphs, AbstractEdge, AbstractGraph, add_edge!, add_vertex!, dst, edges,
edgetype, ne, neighbors, nv, rem_edge!, src, vertices
using ITensorBase: ITensorOperator, NamedUnitRange, inds, inputnames, name, names, nametype,
Expand All @@ -19,17 +18,6 @@ abstract type AbstractITensorNetwork{T, V} <: AbstractVertexDataGraph{T, V} end
# Need to be careful about removing edges from tensor networks in case there is a bond
Graphs.rem_edge!(::AbstractITensorNetwork, _edge) = not_implemented()

function Graphs.weights(graph::AbstractITensorNetwork)
V = vertextype(graph)
es = Tuple.(edges(graph))
ws = Dictionary{Tuple{V, V}, Float64}(es, undef)
for e in edges(graph)
w = log2(dim(linkinds(graph, e)))
ws[(src(e), dst(e))] = w
end
return ws
end

# Overload if needed
Graphs.is_directed(::Type{<:AbstractITensorNetwork}) = false

Expand Down
2 changes: 1 addition & 1 deletion src/tensornetwork.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using DataGraphs: DataGraphs, AbstractDataGraph, DataGraph, edge_data, get_verti
vertex_data, vertex_data_type
using Dictionaries: Dictionaries, AbstractDictionary, Indices, dictionary, set!, unset!
using Graphs: AbstractSimpleGraph, has_vertex, rem_edge!, rem_vertex!
using ITensorBase: ITensorBase, AbstractITensor, dim, name, names, nametype, unnamedtype
using ITensorBase: ITensorBase, AbstractITensor, name, names, nametype, unnamedtype
using NamedGraphs: NamedGraphs, NamedEdge, NamedGraph, decoded_vertex, encoded_graph,
encoded_vertex, vertextype
using SplitApplyCombine: mapview
Expand Down
Loading