German
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.algorithms.Grover.optimal_num_iterations

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

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

Parameter
  • num_solutions (int) – The number of solutions.

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

Rückgabetyp

int

Rückgabe

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