dwave_networkx.drawing.chimera_layout.draw_chimera_embedding#
- draw_chimera_embedding(G, *args, **kwargs)[source]#
Draws an embedding onto the Chimera graph
G
.- Parameters:
G (NetworkX graph) – Chimera graph or a subgraph of a Chimera graph.
emb (dict) – Embedding for all nodes of
G
as a dict of chains of the form{node: chain, ...}
. where chains are iterables of qubit labels. Qubits are nodes inG
.embedded_graph (NetworkX graph (optional, default None)) – Graph which contains all keys of the
emb
parameter as nodes. If specified, the edges ofG
are considered to be interactions if and only if they exist between two chains of theemb
parameter and if their keys are connected by an edge in theembedded_graph
parameter; only the couplers for edges ofG
that are considered to be interactions are displayed.interaction_edges (list (optional, default None)) – Interactions as a list of edges. If this parameter is specified, only the couplers in the list 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)) – Chain colors associated with each key in the
emb
parameter as a dict of the form{node: rgba_color, ...}
, where colors must be 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 to use for graph
G
’s nodes and edges 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 the
emb
parameter may overlap (contain the same vertices inG
), and the drawing displays these overlaps as concentric circles.kwargs (optional keywords) – Parameters in
draw_networkx()
, except for thepos
parameter. If thelinear_biases
orquadratic_biases
parameters are specified, thedraw_networkx()
node_color
oredge_color
parameters are ignored.