dimod.BinaryQuadraticModel.energies

BinaryQuadraticModel.energies(samples_like, dtype=<class 'float'>)[source]

Determine the energies of the given samples.

Parameters:
  • samples_like (samples_like) – A collection of raw samples. samples_like is an extension of NumPy’s array_like structure. See as_samples().
  • dtype (numpy.dtype) – The data type of the returned energies.
Returns:

The energies.

Return type:

numpy.ndarray