**Inputs:**
1. $N$ qubits in an arbitrary state.
2. An operation $P$ that prepares an $N$-qubit state $\ket{\psi}$ from the state $\ket{0...0}$.
**Goal:**
Reflect the state of the given qubits about the state $\ket{\psi}$.
In other words, implement an operation $2\ket{\psi}\bra{\psi} - I$.
This operation allows you to implement the "reflection about the mean" operation, if you use the operation that prepares the mean as the input.microsoft/qdk
Publicmirrored from https://github.com/microsoft/qdkAvailable
katas/content/grovers_search/reflection_about_state/index.md
11lines · modepreview