# qiskit.aqua.algorithms.Grover.optimal_num_iterations¶

static Grover.optimal_num_iterations(num_solutions, num_qubits)[source]

Return the optimal number of iterations, if the number of solutions is known.

Paramètres
• num_solutions (int) – The number of solutions.

• num_qubits (int) – The number of qubits used to encode the states.

Type renvoyé

int

Renvoie

The optimal number of iterations for Grover’s algorithm to succeed.