In the quantum computation circuit for the Deutsch-Jozsa algorithm, it is said that $U_f$ oracle will affect certain specific operations on the qubits using $f(x)$ and finally will give the answer in just one query. My doubts are,
- How does this $U_f$ oracle know what $f(x)$ is?
- Even if there is no need to know $f(x)$ for every $x$, but only what is to be known is whether $f(x)$ is constant or balanced; how is this latter knowledge known to oracle?
If my question is vague, let me put it in another way: I have $f(x)$ with me; I go to a quantum technician who will find out the nature of my function. If I don't tell him, the nature of $f(x)$, how does the technician proceed?