RecursiveMinimumEigenOptimizer#

class RecursiveMinimumEigenOptimizer(optimizer, min_num_vars=1, min_num_vars_optimizer=None, penalty=None, history=IntermediateResult.LAST_ITERATION, converters=None)[source]#

Bases: OptimizationAlgorithm

A meta-algorithm that applies a recursive optimization.

The recursive minimum eigen optimizer applies a recursive optimization on top of OptimizationAlgorithm. This optimizer can use MinimumEigenOptimizer as an optimizer that is called at each iteration. The algorithm is introduced in [1].

Examples

Outline of how to use this class:

from qiskit_algorithms import QAOA
from qiskit_optimization.problems import QuadraticProgram
from qiskit_optimization.algorithms import (
    MinimumEigenOptimizer, RecursiveMinimumEigenOptimizer
)

problem = QuadraticProgram()
# specify problem here
# specify minimum eigen solver to be used, e.g., QAOA
qaoa = QAOA(...)
internal_optimizer = MinimumEigenOptimizer(qaoa)

optimizer = RecursiveMinimumEigenOptimizer(internal_optimizer)
result = optimizer.solve(problem)

References

[1] Bravyi et al. (2019), Obstacles to State Preparation and Variational Optimization from Symmetry Protection. arXiv:1910.08980

Initializes the recursive minimum eigen optimizer.

This initializer takes an OptimizationAlgorithm, the parameters to specify until when to to apply the iterative scheme, and the optimizer to be applied once the threshold number of variables is reached.

প্যারামিটার:
রেইজেস:

Methods

get_compatibility_msg(problem)[source]#

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

Checks whether the given problem is compatible, i.e., whether the problem can be converted to a QUBO, and otherwise, returns a message explaining the incompatibility.

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

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

রিটার্নস:

A message describing the incompatibility.

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

str

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.

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

bool

solve(problem)[source]#

Tries to solve the given problem using the recursive 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.

রেইজেস:
রিটার্ন টাইপ:

OptimizationResult