OptimizationAlgorithm#

class OptimizationAlgorithm[source]#

Bases: ABC

An abstract class for optimization algorithms in Qiskit optimization module.

Methods

abstract get_compatibility_msg(problem)[source]#

Checks whether a given problem can be solved with the optimizer implementing this method.

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

problem (QuadraticProgram) -- The optimization problem to check compatibility.

রিটার্নস:

Returns the incompatibility message. If the message is empty no issues were found.

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

str

is_compatible(problem)[source]#

Checks whether a given problem can be solved with the optimizer implementing this method.

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

problem (QuadraticProgram) -- The optimization problem to check compatibility.

রিটার্নস:

Returns True if the problem is compatible, False otherwise.

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

bool

abstract solve(problem)[source]#

Tries to solves the given problem using the optimizer.

Runs the optimizer to try to solve the optimization problem.

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

problem (QuadraticProgram) -- The problem to be solved.

রিটার্নস:

The result of the optimizer applied to the problem.

রেইজেস:

QiskitOptimizationError -- If the problem is incompatible with the optimizer.

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

OptimizationResult