ITensor / NamedGraphs.jl

Extension of `Graphs.jl` to graphs with named vertices.
MIT License
6 stars 3 forks source link

Introduce `cartesian_graph(...)` #42

Open mtfishman opened 10 months ago

mtfishman commented 10 months ago

Introduce cartesian_graph(dims...) for making a NamedGraph with cartesian vertex names, i.e.:

cartesian_graph(2, 2)

would have vertices [(1, 1), (1, 2), (2, 1), (2, 2)].

Additionally,

cartesian_graph(grid((2, 2)), (2, 2))

to wrap a SimpleGraph in a NamedGraph with cartesian vertices.