OptimizationApplication#

class OptimizationApplication[source]#

Bases: ABC

An abstract class for optimization applications.

Methods

abstract interpret(result)[source]#

Convert the calculation result of the problem (OptimizationResult or a binary array using np.ndarray) to the answer of the problem in an easy-to-understand format.

প্যারামিটার:

result (OptimizationResult | ndarray) -- The calculated result of the problem

static sample_most_likely(state_vector)[source]#

Compute the most likely binary string from state vector.

প্যারামিটার:

state_vector (QuasiDistribution | Statevector | ndarray | Dict) -- state vector or counts or quasi-probabilities.

রিটার্নস:

binary string as numpy.ndarray of ints.

রেইজেস:

ValueError -- if state_vector is not QuasiDistribution, Statevector, np.ndarray, or dict.

রিটার্ন টাইপ:

ndarray

abstract to_quadratic_program()[source]#

Convert a problem instance into a QuadraticProgram

রিটার্ন টাইপ:

QuadraticProgram