dwave.graphs.zephyr_torus#

zephyr_torus(m: int, t: int = 4, node_list: Iterable[Hashable] | None = None, edge_list: Iterable[tuple[Hashable, Hashable]] | None = None) Graph[source]#

Creates a Zephyr graph modified to allow for periodic boundary conditions and translational invariance.

The graph matches the local connectivity properties of a standard Zephyr graph, but with modified periodic boundary condition. Tiles of \(8t\) nodes are arranged on an \(m\) by \(m\) torus.

Parameters:
  • m – Grid parameter for the Zephyr lattice. Connectivity of all nodes is \(4t + min(2m - 1, 4)\).

  • t – Tile parameter for the Zephyr lattice.

  • node_list – Iterable of nodes in the graph. If None, nodes are generated for an undiluted torus calculated from m and t as described below. The node list must describe a subset of the torus nodes to be maintained in the graph using the coordinate node labeling scheme.

  • edge_list – Iterable of edges in the graph. If None, edges are generated for an undiluted torus calculated from m and t as described below. The edge list must describe a subgraph of the torus, using the coordinate node labeling scheme.

Returns:

A Zephyr torus with grid parameter m and tile parameter t, with Zephyr coordinate node labels.

A Zephyr torus is a generalization of the standard Zephyr graph whereby degree-twenty connectivity is maintained, but the boundary condition is modified to enforce an additional translational-invariance symmetry [Ray2023]. Local connectivity in the Zephyr torus is identical to connectivity for Zephyr graph nodes away from the boundary. A tile consists of \(8t\) nodes, and the torus has \(m\) by \(m\) tiles. Tile displacement modulo \(m\) defines an automorphism.

See zephyr_graph() for additional information.

Examples

>>> G = dwave.graphs.zephyr_torus(3)  # a 3x3 tile pegasus torus (connectivity 15)
>>> len(G) # 3*3*24
288
>>> any([len(list(G.neighbors(n))) != 20 for n in G.nodes])
False