ITensorNetworks.jl icon indicating copy to clipboard operation
ITensorNetworks.jl copied to clipboard

Implement `Graphs.union` for `ITensorNetwork` (or general `DataGraph`s)

Open mtfishman opened this issue 3 years ago • 0 comments

Implement overloads of Graphs.union for DataGraphs, like ITensorNetwork and IndsNetwork (see the definition on Wikidedia as the graph resulting from taking the union of the vertices and edges of the two graphs).

An application is merging the indices of two IndsNetworks (i.e. unioning the indices of shared vertices and edges), for example functionality being added in #9.

A generic interface will have to handle how to merge the metadata of vertices and edges that are shared by the two graphs being unioned, such as passing a custom function that defines how the merge will happen.

Originally posted by @mtfishman in https://github.com/mtfishman/ITensorNetworks.jl/pull/9#discussion_r1010417820

mtfishman avatar Nov 01 '22 18:11 mtfishman