dwave_networkx.drawing.chimera_layout.draw_chimera

draw_chimera(G, linear_biases={}, quadratic_biases={}, nodelist=None, edgelist=None, cmap=None, edge_cmap=None, vmin=None, vmax=None, edge_vmin=None, edge_vmax=None, **kwargs)[source]

Draw graph G with a Chimera layout.

If linear_biases and/or quadratic_biases are provided then the biases are visualized on the plot.

Parameters:
  • G (graph) – A networkx graph. Should be a Chimera graph or a subgraph of a Chimera graph.
  • linear_biases (dict (optional, default {})) – A dict of biases associated with each node in G. Should be of the form {node: bias, …}. Each bias should be numeric.
  • biases (quadratic) – A dict of biases associated with each edge in G. Should be of the form {edge: bias, …}. Each bias should be numeric. Self-loop edges are treated as linear biases.
  • kwargs (optional keywords) – See networkx.draw_networkx() for a description of optional keywords, with the exception of the pos parameter which is not used by this function. If linear_biases or quadratic_biases are provided, then any provided node_color or edge_color arguments are ignored.