dwave.system.composites.TilingComposite.sample#
- TilingComposite.sample(bqm, **kwargs)[source]#
Sample from the specified binary quadratic model.
- Parameters:
bqm (
BinaryQuadraticModel
) – Binary quadratic model to be sampled from.**kwargs – Optional keyword arguments for the sampling method, specified per solver.
- Returns:
Examples
This example submits a simple Ising problem of just two variables on a D-Wave system. Because the problem fits in a single Chimera unit cell, it is tiled across the solver’s entire Chimera graph, resulting in multiple samples (the exact number depends on the working Chimera graph of the D-Wave system).
>>> from dwave.system import DWaveSampler, EmbeddingComposite >>> from dwave.system import TilingComposite ... >>> sampler = EmbeddingComposite(TilingComposite(DWaveSampler(), 1, 1, 4)) >>> sampleset = sampler.sample_ising({},{('a', 'b'): 1}) >>> len(sampleset) > 1 True
See Ocean Glossary for explanations of technical terms in descriptions of Ocean tools.