Open mtfishman opened 4 months ago
I also wonder if there could be a nice opt-in for visualization based on certain handling of the vertex data or metadata. Like if the vertices are integer tuples (3,4), (5,6) one can opt in to having them treated as 2D coordinates for graph visualization. And similar for the more general coordinates you are mentioning above. Maybe ITensorVisualization already supports this.
I believe you can already do that in ITensorVisualizationBase.jl by converting the vertex names to positions.
Something that is missing from the current lattice definitions like square/grid, triangular, and hexagonal is the concept of orienting those lattices in different ways, for example rotating them by a certain angle, which can be useful for 1D tensor network algorithms like DMRG where it is common practice to perform the same calculation on cylinders built from wrapping the same lattice in different ways to see how the ground state changes or doesn't change.
This may require adding on some concept of translation vectors. A simple approach could be to add positions as metadata on the vertices of the graph representations of the lattices (say using DataGraphs.jl, where the vertex data storing the positions could be the
Point
type from GeometryBasics.jl). Then, lattice rotations could be geometric operations on those positions, and then lattice wrapping could be done through lattice rotations and then cutting certain edges of the lattice (say by only keeping vertices that have positions that fall within a certain rectangular region of space), and then adding back edges to implement periodic boundary conditions.@JoeyT1994 @emstoudenmire