$O_f^\pm$
circuit-level n qubits dimension $p$
Phase Oracle
Encodes a Boolean function as phases on computational basis states.
hermitian
A phase oracle is a variant of the standard oracle that acts on a single register $|x\rangle$, encoding the value of a classical Boolean function $f: \{0, 1\}^n \to \{0, 1\}$ as a relative phase: $$ |x\rangle \xmapsto{O_f^\pm} (-1)^{f(x)}|x\rangle $$ This construction is particularly useful in algorithms like Grover's search, where interference between states allows the amplitudes of marked states to be amplified.
Properties
- Diagonal in the computational basis; unitary and Hermitian for Boolean $f$.
- Can be implemented from a standard oracle via phase kickback.
Usage
- Grover search and amplitude amplification.
- Encoding classical predicates into quantum phases.
References
SDK support
How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.
| SDK | Name |
|---|---|
| Qiskit | qiskit.circuit.library.PhaseOracleGate ⓘ |
| PennyLane | — ⓘ |
| Cirq | — |
| Q# | — |
| PyQuil | — |
| Braket | — |
| BQSKit | — |
| Qibo | — |
| pytket | — ⓘ |
| Stim | — |
| OpenQASM | — |