Composites¶
The dwave-greedy package currently includes just one composite,
SteepestDescentComposite
.
SteepestDescentComposite¶
Class¶
- class SteepestDescentComposite(child_sampler)[source]¶
Runs greedy local optimization (steepest descent) on input problem, seeded with samples from the sampler.
- Parameters
child_sampler (
dimod.Sampler
) – A dimod sampler, such as aDWaveSampler
.
Examples
>>> from dwave.system import DWaveSampler >>> from greedy import SteepestDescentComposite ... >>> sampler = SteepestDescentComposite(DWaveSampler()) >>> h = {0: -1, 4: 2} >>> J = {(0, 4): 1.5} >>> sampleset = sampler.sample_ising(h, J) >>> sampleset.first.energy -4.5
Attributes¶
Properties in the form of a dict. |
|
Parameters in the form of a dict. |
Methods¶
|
Sample from the provided binary quadratic model. |
|
Sample from an Ising model using the implemented sample method. |
Sample from a QUBO using the implemented sample method. |