hybrid.utils.min_sample

min_sample(bqm)[source]

Return a sample with all variables set to the minimal value for a binary quadratic model.

Parameters:bqm (BinaryQuadraticModel) – Binary quadratic model (BQM).
Returns:A sample with minimal values for all variables of the BQM.
Return type:dict

Examples

>>> import dimod
>>> bqm = dimod.BQM({}, {'ab': -1, 'bc': -1, 'ca': -1}, 0, 'BINARY')
>>> min_sample(bqm)     # doctest: +SKIP
{'a': 0, 'b': 0, 'c': 0}