qat.opt.results.CombinatorialResult

For a combinatorial optimization problem, the batch generator can return a parsed result that includes a parsed version of the best Sample.

class qat.opt.results.CombinatorialResult(problem, sample, result=None, inverse=False)

This class describe the result of sampling of a combinatorial optimization problem. In addition to the result of samplings, it assigns a score to the sample, using an internal cost function of the combinatorial problem.

Parameters
  • problem (CombinatorialProblem) – The combinatorial optimization problem that is solved and produced this result

  • sample (Sample) – The sample which this result represents

  • result (BatchResult, optional) – BatchResult containing the list of samples from which this sample is extracted

  • inverse (bool, optional) – If True, a truthy value will represented by “0” in the bitstring, and falsy value as “1”