OptimizationAlgorithm#
- class OptimizationAlgorithm[fuente]#
Bases:
ABC
An abstract class for optimization algorithms in Qiskit optimization module.
Methods
- abstract get_compatibility_msg(problem)[fuente]#
Checks whether a given problem can be solved with the optimizer implementing this method.
- Parámetros:
problem (QuadraticProgram) – The optimization problem to check compatibility.
- Devuelve:
Returns the incompatibility message. If the message is empty no issues were found.
- Tipo del valor devuelto:
- is_compatible(problem)[fuente]#
Checks whether a given problem can be solved with the optimizer implementing this method.
- Parámetros:
problem (QuadraticProgram) – The optimization problem to check compatibility.
- Devuelve:
Returns True if the problem is compatible, False otherwise.
- Tipo del valor devuelto:
- abstract solve(problem)[fuente]#
Tries to solves the given problem using the optimizer.
Runs the optimizer to try to solve the optimization problem.
- Parámetros:
problem (QuadraticProgram) – The problem to be solved.
- Devuelve:
The result of the optimizer applied to the problem.
- Muestra:
QiskitOptimizationError – If the problem is incompatible with the optimizer.
- Tipo del valor devuelto: