ITensor / NamedGraphs.jl

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

Throw an error if `named_hexagonal_lattice_graph(n, m; periodic = true)` is called with `n` or `m` = 2 #59

Open JoeyT1994 opened 6 months ago

JoeyT1994 commented 6 months ago

We should throw an error if named_hexagonal_lattice_graph(n, m; periodic = true) is called with n =2 or m = 2 because this will output a graph that essentially is a ladder (with shortest loop size 4) and resembles nothing like a hexagonal graph so may be misleading to the user.

This is likely an issue implicitly tied to the hexagonal lattice itself (hexagonal_lattice_graph for Networkx in Python also has the same output).