dimod.Sampler.sample#

Sampler.sample(bqm: BinaryQuadraticModel, **parameters) SampleSet[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()).

Parameters:
  • bqm – A binary quadratic model.

  • **parameters – See the implemented sampling for additional keyword definitions. Unknown keywords are accepted with a warning raised.

Returns: Samples from the binary quadratic model.