dwave.embedding.adjacency_to_edges#

adjacency_to_edges(adjacency)[source]#

Convert an adjacency object to an edge iterator.

Parameters:

adjacency (dict/networkx.Graph/dimod.BQM) – Adjacency object as a dict of form {s: Ns, ...}, where s is a variable in the graph and Ns is the set of neighbors of s; or a NetworkX graph; or a binary quadratic model.

Yields:

tuple – A 2-tuple, corresponding to an edge in the provided graph.