dwave_networkx.drawing.pegasus_layout.draw_pegasus_embedding#

draw_pegasus_embedding(G, *args, **kwargs)[source]#

Draws an embedding onto Pegasus graph G.

Parameters:
  • G (NetworkX graph) – Pegasus graph or a subgraph of a Pegasus graph as produced by the dwave_networkx.pegasus_graph() function.

  • emb (dict) – Chains as a dict of the form {qubit: chain, ...}, where qubits are nodes in G and chains are iterables of qubit labels.

  • embedded_graph (NetworkX graph (optional, default None)) – Graph that contains all keys of the emb parameter as nodes. If specified, edges of G are considered interactions if and only if (1) they exist between two chains of the emb parameter and (2) their keys are connected by an edge in this graph. If given, only the couplers between chains based on this graph are displayed.

  • interaction_edges (list (optional, default None)) – Interactions as a list of edges. If specified, only these couplers are displayed.

  • show_labels (boolean (optional, default False)) – If True, each chain in the emb parameter is labelled with its key.

  • chain_color (dict (optional, default None)) – Colors as a dict of the form {node: rgba_color, ...} associated with each key in the emb parameter, where colors are length-4 tuples of floats between 0 and 1, inclusive. If None, each chain is assigned a different color.

  • unused_color (tuple (optional, default (0.9,0.9,0.9,1.0))) – Color for graph G’s nodes that are not part of chains, and edges that are neither chain edges nor interactions. If None, these nodes and edges are not shown.

  • crosses (boolean (optional, default False)) – If True, \(K_{4,4}\) subgraphs are shown in a cross rather than an L configuration. Ignored, if G is defined with nice_coordinates=True.

  • overlapped_embedding (boolean (optional, default False)) – If True, chains in the emb parameter may overlap (contain the same vertices in G), and these overlaps are displayed as concentric circles.

  • kwargs (optional keywords) – Parameters in draw_networkx(), except for the pos parameter. If the linear_biases or quadratic_biases parameters are specified, the draw_networkx() node_color or edge_color parameters are ignored.