draw_zephyr_embedding(G, *args, **kwargs)[source]

Draws an embedding onto Zephyr graph G.

  • G (NetworkX graph) – A Zephyr graph or a subgraph of a Zephyr graph, as produced by the dwave_networkx.zephyr_graph() function.

  • emb (dict) – Minor-embedding as a dict of form {node: chain, …}, where node are nodes in G and chain are iterables of qubit labels.

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

  • interaction_edges (list (optional, default None)) – A list of edges used as interactions. If given, only these couplers are displayed.

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

  • chain_color (dict (optional, default None)) – Colors as a dict of form {node: rgba_color, …} associated with each key in emb, 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 nodes of G that are not part of chains, and edges that are neither chain edges nor interactions. If None, these nodes and edges are not shown.

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

  • kwargs (optional keywords) – See draw_networkx() for a description of optional keywords, with the exception of the pos parameter, which is unsupported. If the linear_biases or quadratic_biases parameters are provided, any provided node_color or edge_color arguments are ignored.