Sampler.sample(bqm: dimod.binary.binary_quadratic_model.BinaryQuadraticModel, **parameters) dimod.sampleset.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()).

  • 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.