ITensor / ITensor/NamedGraphs.jl
Throw an error if `named_hexagonal_lattice_graph(n, m; periodic = true)` is called with `n` or `m` = 2
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 10
- Forks
- 5
- Avg merge
- 6h 43m
- Merged PRs (30d)
- 17
Description
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).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at named_hexagonal_lattice_graph(n, m; periodic = true) and inspect how periodic dimensions are validated. Add the requested error for n or m equal to 2, then verify that those inputs no longer produce the misleading ladder-shaped graph.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100