dimod.reference.composites.clipcomposite.ClipComposite.sample¶
-
ClipComposite.
sample
(bqm, lower_bound=None, upper_bound=None, **parameters)[source]¶ Clip and sample from the provided binary quadratic model.
If lower_bound and upper_bound are given variables with value above or below are clipped.
- Parameters
bqm (
dimod.BinaryQuadraticModel
) – Binary quadratic model to be sampled from.lower_bound (number) – Value by which to clip the variables from below.
upper_bound (number) – Value by which to clip the variables from above.
**parameters – Parameters for the sampling method, specified by the child sampler.
- Returns