I'm studying Deutsch's algorithm and I keep coming across the phrase along the lines of "There is a unitary transform (a sequence of quantum gates) $U_f$ that transforms the state $|x\rangle |y\rangle \rightarrow |x\rangle |y \oplus f(x)\rangle$".
I was trying to figure out how this $U_f$ would be implemented as a sequence of quantum gates.
I originally thought that there would be some sort of transform that takes $|x\rangle \rightarrow |f(x)\rangle$ and then apply the CNOT transformation to obtain the result. However, I believe this way of thinking is incorrect and I wouldn't obtain the state desired.
So how is the transform $U_f$ realised or does it depend upon the function $f$?