- ExactCQMSolver.sample_cqm(cqm: dimod.constrained.constrained.ConstrainedQuadraticModel, rtol: float = 1e-06, atol: float = 1e-08, **kwargs) dimod.sampleset.SampleSet ¶
Sample from a constrained quadratic model.
cqm – Constrained quadratic model to be sampled from.
rtol – Relative tolerance for constraint violation. The fraction of a constraint’s right hand side which any violation must be smaller than for the constraint to be satisfied.
atol – Absolute tolerance for constraint violations. A constant any violation must be smaller than for the constraint to be satisfied.
A sampleset of all possible samples, with the fields
is_satisfiedcontaining total and individual constraint violation information, respectively.