MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / variables

Method variables

dwave/cloud/computation.py:713–726  ·  view source on GitHub ↗

List of active variables in response/answer.

(self)

Source from the content-addressed store, hash-verified

711
712 @property
713 def variables(self):
714 """List of active variables in response/answer."""
715
716 # return variables from sampleset if available
717 sampleset = self._sampleset() if self._sampleset else None
718 if sampleset is not None:
719 return sampleset.variables
720
721 # fallback to variables from SAPI response
722 result = self.result()
723 if 'active_variables' in result:
724 return result['active_variables']
725
726 raise InvalidAPIResponseError("Active variables not present in the response")
727
728 @property
729 def num_occurrences(self):

Callers

nothing calls this directly

Calls 2

resultMethod · 0.95

Tested by

no test coverage detected