dwave_networkx.zephyr_torus#

zephyr_torus(m, t=4, node_list=None, edge_list=None)[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 (int) – Grid parameter for the Zephyr lattice. Connectivity of all nodes is \(4t + min(2m - 1, 4)\).

  • t (int) – Tile parameter for the Zephyr lattice.

  • node_list (iterable (optional, default None)) – 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 (optional, default None)) – 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:

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

Return type:

NetworkX Graph

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 [RH]. 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 = dnx.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