- ConstrainedQuadraticModel.iter_constraint_data(sample_like) Iterator[dimod.constrained.ConstraintData] ¶
Yield information about the constraints for the given sample.
sample_like – A sample.
labelis the constraint label.
lhs_energyis the energy of the left hand side of the constraint.
rhs_energyis the energy of the right hand side of the constraint.
dimod.sym.Senseof the constraint.
lhs_energy - rhs_energy
violationis determined by the type of constraint. If
violationis positive, that means that the constraint has been violated by that amount. If it is negative, that means that the constraint has been satisfied by the amount.