View on GitHub
Open this notebook in GitHub to run it yourself
grover_operator
Arguments:
-
oracle: QCallable[QArray[QBit]] - Oracle representing , accepting quantum state to apply on.
-
space_transform: QCallable[QArray[QBit]] - State preparation operator , accepting quantum state to apply on.
-
packed_vars: QArray[QBit] - Packed form of the variable to apply the grover operator on.
Example
The following example implements a grover search algorithm using the grover operator for a specific oracle, with a uniform superposition over the search space. The circuit starts with a uniform superposition on the search space, followed by 2 applications of the grover operator.Output: