dimod.bqm.adjarraybqm.AdjArrayBQM.energy

AdjArrayBQM.energy(sample, dtype=None)[source]

Determine the energy of the given sample.

Parameters
  • samples_like (samples_like) – Raw sample. samples_like is an extension of NumPy’s array_like structure. See as_samples().

  • dtype (data-type, optional, default=None) – Desired NumPy data type for the energy. Matches dtype by default.

Returns

The energy.