dwave.system.composites.VirtualGraphComposite.adjacency¶
-
VirtualGraphComposite.
adjacency
= None¶ dict[variable, set] – Adjacency structure for the composed sampler.
Examples
This example uses
VirtualGraphComposite
to instantiate a composed sampler that uses a D-Wave solver selected by the user’s default D-Wave Cloud Client configuration file. Because qubits 0, 5, and coupled qubits {0, 4} are all coupled on the selected D-Wave solver, edges between three nodes, x, y, and z, as specified by the embedding, are available to problems using this composed sampler. However, qubit 8 is in an adjacent unit cell on the D-Wave solver and not directly connected to the other four qubits, so node a does not share an edge with any other nodes.>>> from dwave.system.samplers import DWaveSampler >>> from dwave.system.composites import VirtualGraphComposite >>> embedding = {'x': {1}, 'y': {5}, 'z': {0, 4}, 'a': {8}} >>> sampler = VirtualGraphComposite(DWaveSampler(), embedding) >>> sampler.adjacency {'a': set(), 'x': {'y', 'z'}, 'y': {'x', 'z'}, 'z': {'x', 'y'}}