dwave_networkx.drawing.chimera_layout.chimera_node_placer_2d#

chimera_node_placer_2d(m, n, t, scale=1.0, center=None, dim=2)[source]#

Generates a function that converts Chimera indices to x- and y-coordinates for a plot.

Parameters:
  • m (int) – Number of rows in the Chimera lattice.

  • n (int) – Number of columns in the Chimera lattice.

  • t (int) – Size of the shore within each Chimera tile.

  • scale (float (default 1.)) – Scale factor. If scale = 1, all positions fit within [0, 1] on the x-axis and [-1, 0] on the y-axis.

  • center (None or array (default None)) – Coordinates of the top left corner.

  • dim (int (default 2)) – Number of dimensions. If dim > 2, all extra dimensions are set to 0.

Returns:

xy_coords – Function that maps a Chimera index (i, j, u, k) in an (m, n, t) Chimera lattice to x- and y-coordinates.

Return type:

Function