dwave_networkx.chimera_torus#

chimera_torus(m, n=None, t=None, node_list=None, edge_list=None)[source]#

Creates a defect-free Chimera lattice of size \((m, n, t)\) subject to periodic boundary conditions.

Parameters:
  • m (int) – Number of rows in the Chimera torus lattice. If \(m<3\) translational invariance already applies in the rows. If \(m>=3\) additional external couplers are added, reestablishing translational invariance. Connectivity of all horizontal qubits is \(min(m - 1, 2) + 2t\).

  • n (int (optional, default m)) – Number of columns in the Chimera torus lattice. If \(n<3\) translational invariance already applies in the columns. If \(n>=3\) additional external couplers are added, reestablishing translational invariance. Connectivity of all vertical qubits is \(min(n - 1, 2) + 2t\).

  • t (int (optional, default 4)) – Size of the shore within each Chimera tile.

  • node_list (iterable (optional, default None)) – Iterable of nodes in the graph. If None, nodes are generated for an undiluted torus calculated from m, n 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, n and t as described below. The edge list must describe a subgraph of the torus, using the coordinate node labeling scheme.

Returns:

G – A Chimera torus with shape (m, n, t), with Chimera coordinate node labels.

Return type:

NetworkX Graph

A Chimera torus is a generalization of the standard chimera graph whereby degree-six connectivity is maintained, but the boundary condition is modified to enforce an additional translational-invariance symmetry [RH]. Local connectivity in the Chimera torus is identical to connectivity for chimera graph nodes away from the boundary. The graph has V=8*m*n nodes, and min(6, 4 + m)V//2 + min(6, 4 + n)V/2 edges. With the standard \(K_{t, t}\) Chimera tile definition, any tile displacement \((x, y)\) modulo \((m, n)\), rows and columns respectively, that is, (i, j, u, k) -> ((i + x)%m, (i + y)%n, u, k), defines an automorphism.

See chimera_graph() for additional information.

Examples

>>> G = dnx.chimera_torus(3, 3, 4)  # a 3x3 tile chimera graph (connectivity 6)
>>> len(G)
72
>>> any([len(list(G.neighbors(n))) != 6 for n in G.nodes])
False