netket.graph.Hypercube¶

class
netket.graph.
Hypercube
¶ A hypercube lattice of side L in d dimensions. Periodic boundary conditions can also be imposed.

__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: netket._C_netket.graph.Hypercube, length: int, n_dim: int = 1, pbc: bool = True) > None
Constructs a new
Hypercube
given its side length and dimension. Args:
 length: Side length of the hypercube.
It must always be >=1, but if
pbc==True
then the minimal valid length is 3.
n_dim: Dimension of the hypercube. It must be at least 1. pbc: If
True
then the constructed hypercubewill have periodic boundary conditions, otherwise open boundary conditions are imposed.
 Examples:
A 10x10 square lattice with periodic boundary conditions can be constructed as follows:
>>> import netket >>> g=netket.graph.Hypercube(length=10,n_dim=2,pbc=True) >>> print(g.n_sites) 100
__init__(self: netket._C_netket.graph.Hypercube, length: int, colors: iterable) > None
Constructs a new Hypercube given its side length and edge coloring.
 Args:
 length: Side length of the hypercube.
It must always be >=3 if the hypercube has periodic boundary conditions and >=1 otherwise.
 colors: Edge colors, must be an iterable of
Tuple[int, int, int] where each element (i, j, c) represents an edge `i <> j of color c. Colors must be assigned to all edges.
Methods
__init__
(*args, **kwargs)Overloaded function.
Attributes
The adjacency list of the graph where each node is represented by an integer in [0, n_sites).
The automorphisms of the graph, including translation symmetries only.
The distances between the nodes.
The graph edges.
Whether the graph is bipartite.
Whether the graph is connected.
The number of vertices in the graph.

property
adjacency_list
¶ The adjacency list of the graph where each node is represented by an integer in [0, n_sites).
 Type
list

property
automorphisms
¶ The automorphisms of the graph, including translation symmetries only.
 Type
list[list]

property
distances
¶ The distances between the nodes. The fact that some node may not be reachable from another is represented by 1.
 Type
list[list]

property
edges
¶ The graph edges.
 Type
list

property
is_bipartite
¶ Whether the graph is bipartite.
 Type
bool

property
is_connected
¶ Whether the graph is connected.
 Type
bool

property
n_sites
¶ The number of vertices in the graph.
 Type
int
