EmbeddingComposite

Class

Because the D-Wave System is Chimera-structured but most problems of application interest are not, it is convenient to be able to map from a structured sampler to an unstructured one.

A structured sampler is one that can only solver problems that map to a specific graph (see structured)

The EmbeddingComposite uses the minorminer library to map unstructured problems to a structured sampler.

class EmbeddingComposite(child_sampler)[source]

Composite to map unstructured problems to a structured sampler.

Parameters:sampler (dimod.Sampler) – A structured dimod sampler.

Sampler Properties

EmbeddingComposite.properties dict – Contains one key 'child_properties' which has a copy of the child sampler’s properties.
EmbeddingComposite.parameters dict[str, list] – The keys are the keyword parameters accepted by the child sampler.

Composite Properties

EmbeddingComposite.children list – Contains the single wrapped structured sampler.
EmbeddingComposite.child The first child in children.

Methods

EmbeddingComposite.sample(bqm, **parameters) Samples from the given bqm using the instantiated sample method.
EmbeddingComposite.sample_ising(h, J, …) Sample from the provided unstructured Ising model.
EmbeddingComposite.sample_qubo(Q, **parameters) Samples from the given QUBO using the instantiated sample method.