neuralqx.graph.triangular_lattice module

class TriangularLatticeGraph(m, n, periodic=False, *, plot=False, non_planar=False, random_embedding=False, random_embedding_mean=0.0, random_embedding_std=5.0, random_embedding_seed=123)

Bases: Graph

Triangular lattice graph on an \(m\times n\) patch, optionally periodic.

This graph is a two-dimensional lattice obtained from a rectangular grid by adding diagonal connections so that elementary faces become triangles (as in networkx.generators.triangular_lattice_graph()). The periodic flag enables periodic boundary conditions in the NetworkX construction.

NetworkX uses coordinate-labelled vertices for this generator; neuraLQX relabels them to consecutive integers before constructing Graph. If non_planar=True, vertices are relabelled to 3-tuples and may be given a random spatial embedding.

Parameters:
  • m (int) – Lattice size parameter (as interpreted by the NetworkX generator).

  • n (int) – Lattice size parameter (as interpreted by the NetworkX generator).

  • periodic (bool) – If True, impose periodic boundary conditions as supported by NetworkX.

  • plot (bool) – If True, produce a visualisation via the base graph machinery.

  • non_planar (bool) – If True, relabel vertices to 3-tuples to trigger the non-planar pipeline.

  • random_embedding (bool) – If True, assign a random 3D embedding to vertices (non-planar only).

  • random_embedding_mean (float) – Mean of the Gaussian used for the random embedding.

  • random_embedding_std (float) – Standard deviation of the Gaussian used for the random embedding.

  • random_embedding_seed (int) – Seed controlling the random embedding.

property m
property n
property periodic