dimod.reference.samplers.ExactCQMSolver.sample_cqm#
- ExactCQMSolver.sample_cqm(cqm: ConstrainedQuadraticModel, *, rtol: float = 1e-06, atol: float = 1e-08, **kwargs) SampleSet [source]#
Sample from a constrained quadratic model.
- Parameters:
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.
- Returns:
A sampleset of all possible samples, with the fields
is_feasible
andis_satisfied
containing total and individual constraint violation information, respectively.