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

    Function countMarkedStates

    • Counts the number of marked states for a given oracle. This is a common utility function used by both QAA and Grover algorithms.

      Parameters

      • numQubits: number

        Number of qubits in the system

      • oracle: AmplitudeOracle

        Oracle function identifying marked items

      Returns number

      Number of marked states