dwave.system.composites.FixedEmbeddingComposite.structure

FixedEmbeddingComposite.structure

Structure of the structured sampler formatted as a namedtuple Structure(nodelist, edgelist, adjacency), where the 3-tuple values are the nodelist and edgelist properties and adjacency() method.

Examples

This example shows the structure of a placeholder structured sampler that samples only from the K3 complete graph, where each of the three nodes connects to all the other nodes.

>>> class K3StructuredClass(dimod.Structured):
...     @property
...     def nodelist(self):
...         return [1, 2, 3]
...
...     @property
...     def edgelist(self):
...         return [(1, 2), (1, 3), (2, 3)]
>>> K3sampler = K3StructuredClass()
>>> K3sampler.structure.edgelist
[(1, 2), (1, 3), (2, 3)]