# Phase Kickback and Controlled Operations

I am reading the chapter about phase kickback from "An Introduction to Quantum Computing" by Kaye, Laflamme, Mosca. I understand why $$U_f :|x \rangle |-\rangle \rightarrow (-1)^{f(x)} |x\rangle |-\rangle$$ is correct. But then it is written that $$U_f$$ can be thought as a 1-qubit operator $$\hat{U}_{f(x)}$$ acting on the second qubit controlled by the state $$|x\rangle$$. I don't get why this is true and why the circuits below are equivalent.

For instance if $$f(0)=1$$, then $$U_f:|0\rangle|-\rangle \rightarrow - |0\rangle |-\rangle$$, but this is not the case for the circuit given on the right since if $$|x\rangle=0$$, no operation is applied on the second register.

Can someone show me what I am missing?

Without a bit more context of how they use the notation in the rest of the book, I'm not certain, but the way I would interpret that is saying "if the control qubit is 0, apply unitary $$\hat U_{f(0)}$$ on the target. if the control qubit is 1, apply $$\hat U_{f(1)}$$ on the target".
If this is to be the case, let's see what the action is supposed to be. As you say, $$|x\rangle|-\rangle\rightarrow (-1)^{f(x)}|x\rangle|-\rangle.$$ You also have to check the action on the other basis state, $$|x\rangle|+\rangle\rightarrow|x\rangle|+\rangle.$$ So, to summarise, if $$x$$ is 0, the unitary on the second qubit is $$|+\rangle\langle +|+(-1)^{f(0)}|-\rangle\langle -|.$$ If $$x$$ is 1, the unitary on the second qubit is $$|+\rangle\langle +|+(-1)^{f(1)}|-\rangle\langle -|.$$ So, if we defined $$U_y$$ as $$\hat U_y=|+\rangle\langle +|+(-1)^{y}|-\rangle\langle -|,$$ then this would be consistent with my statement.
• For a qubit, it's an unusual way of defining it. As you say, typically it should be do nothing if the control is 0. However, when you generalise to larger systems, the definition often looks something like $\sum_x|x\rangle\langle x|\otimes U_x$, which this would be consistent with. – DaftWullie Apr 24 '20 at 12:53