# SampleSet energy

Hey everyone, how does dwave calculated sampleSet energy? I know that when we sample using (say) sample_ising(), we get a sampleSet object with: samples, energy of each sample and number of occurrences. My question is how does dwave find the energy associated with a particular sample?

I couldn't find many references on this online. Thanks!

## Comments

Tanvi M(Report)Hi Sehmimul,

The energy landscape is defined by the linear and quadratic biases of a problem formulation.

For example, consider an example where the objective function is

-2a+b-4abanda,bare binary variables. The solution space for this example is:Submitting this problem to the QPU:

As expected, the example above returns the lowest energy solution with

a=b=1and energy-5.0.You might also find our getting started guide helpful: https://docs.dwavesys.com/docs/latest/doc_getting_started.html

Please sign in to leave a comment.