Modular-oracle inversion by negation
= Modular-oracle inversion by negation
Let $S_M|y\rangle=|-y\bmod M\rangle$. The <modular-addition quantum oracle> obeys
$$
U_h^{-1}=(I\otimes S_M)U_h(I\otimes S_M).
$$
The three steps replace $y$ by $-y$, then $-y+h(x)$, then $y-h(x)$. Thus a query to the inverse costs one forward query and two known <unitary operators>. The negation operator is a <permutation matrix> with $S_M^2=I$.