dimod.Sampler.sample

Sampler.sample(bqm, **parameters)[source]

Sample from a binary quadratic model.

This method is inherited from the Sampler base class.

Converts the binary quadratic model to either Ising or QUBO format and then invokes an implemented sampling method (one of sample_ising() or sample_qubo()).

:param BinaryQuadraticModel: A binary quadratic model. :param **kwargs: See the implemented sampling for additional keyword definitions.

Returns:SampleSet