q5m.js - Quantum Computing Library - v0.1.1
    Preparing search index...

    Function groverIter

    • Calculates the optimal number of iterations for Grover's algorithm.

      This is a convenience wrapper around QAA's theoretical optimal calculation. For more accurate results with custom state preparations, use findOptimalIterations directly.

      Parameters

      • numStates: number

        Total number of states (2^numQubits)

      • markedStates: number

        Number of marked states

      Returns number

      Optimal number of iterations