OptimizationAlgorithm#
- class OptimizationAlgorithm[ソース]#
ベースクラス:
ABC
An abstract class for optimization algorithms in Qiskit optimization module.
Methods
- abstract get_compatibility_msg(problem)[ソース]#
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.
- 戻り値の型:
- is_compatible(problem)[ソース]#
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.
- 戻り値の型:
- abstract solve(problem)[ソース]#
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.
- 戻り値の型: