GroverOptimizer

class GroverOptimizer(num_value_qubits, num_iterations=3, quantum_instance=None)[source]

Uses Grover Adaptive Search (GAS) to find the minimum of a QUBO function.

Parameters
  • num_value_qubits (int) – The number of value qubits.

  • num_iterations (int) – The number of iterations the algorithm will search with no improvement.

  • quantum_instance (Union[QuantumInstance, BaseBackend, None]) – Instance of selected backend, defaults to Aer’s statevector simulator.

Attributes

GroverOptimizer.quantum_instance

The quantum instance to run the circuits.

Methods

GroverOptimizer.get_compatibility_msg(problem)

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

GroverOptimizer.is_compatible(problem)

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

GroverOptimizer.solve(problem)

Tries to solves the given problem using the grover optimizer.