dimod.reference.samplers.IdentitySampler.sample_ising#

IdentitySampler.sample_ising(h: Mapping[Hashable, float | floating | integer] | Sequence[float | floating | integer], J: Mapping[Tuple[Hashable, Hashable], float | floating | integer], **parameters) SampleSet[source]#

Sample from an Ising model using the implemented sample method.

This method is inherited from the Sampler base class.

Converts the Ising model into a BinaryQuadraticModel and then calls sample().

Parameters:
  • h – Linear biases of the Ising problem. If a list, indices are the variable labels.

  • J – Quadratic biases of the Ising problem.

  • **kwargs – See the implemented sampling for additional keyword definitions.

Returns: Samples from the Ising model.