Implement the function f {\displaystyle f} as a quantum transform.
以量子變換實作函數f。