7

This is the exercise 4.23 from Nielsen and Chuang, asking that if it is possible to construct $C^1(U)$ for $U=R_{x,y}(\theta)$ with TWO single qubit gates and CNOT gate. My answer is no, and I would like to argue in the following way.

First, we do have such a construction for $U=R_z(\theta)$ which is the following (sorry that I have to draw it by hand)

where the (reverse) CNOT has the matrix representation

$$ \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ \end{bmatrix} $$ such that we have the matrix representation of the circuit as $$ \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ \end{bmatrix} \big( \begin{bmatrix} 1 & 0 \\ 0 & e^{-i\theta/2} \end{bmatrix} \otimes \begin{bmatrix} 1 & 0 \\ 0 & e^{i\theta/2} \end{bmatrix} \big) \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & e^{-i\theta/2} & 0 \\ 0 & 0 & 0 & e^{i\theta/2} \\ \end{bmatrix} $$

which is the desired matrix for $C^1(R_z(\theta))$. Thus we do a have a circuit with only two single qubit gates and CNOT for $U=R_z(\theta)$. Now for the rotation $U=R_x(\theta) = VR_z(\theta)V^\dagger$, which differ from $R_z$ by a unitary transformation V, we will need to "sandwich" the above circuit by some other gate. However, that is not possible by just one single qubit gate as we need unitary transformation on both sides of the circuit, despite we may merge two gates into one. Thus I feel that it is not possible for $U=R_{x,y}$. However, on the other hand, physically there is no difference between various rotation operators, it feels not right that only $R_z$ has such circuit construction but not for others. So I may have missed sth here, and any help and clarification is appreciated.

glS
  • 27,670
  • 7
  • 39
  • 126
fagd
  • 975
  • 5
  • 12

2 Answers2

5

The question comes in two parts. Firstly, for the top circuit, can you find the gates $A$, $B$ and $C$ such that $ABC=I$ and $CXBXA=R_x(\theta)$ or $R_y(\theta)$. Secondly, can you reduce either of these to the lower circuit with $AB=I$ and $XBXA=R_x(\theta)$ or $R_Y(\theta)$.

enter image description here

The first of these is detailed in the bit of Nielsen and Chuang just before the exercise, so I won't go through it here. (Equally, if I can do the second part, that's like the first part but setting $C=I$.)

For the second part, I'll do specifically for the $Y$ version. We know that we need $B=A^\dagger$, which means that $A^\dagger XA$ squares to $I$. So, we can certainly choose an $A$ such that $A^\dagger XA=\cos\theta X+\sin\theta Z$. Hence, $XBXA=\cos\theta I-i\sin\theta Y=R_Y(2\theta)$.

To identify $A$ in this case, note that we can write $X$ in the form $|+\rangle\langle +|-|-\rangle\langle -|$ and the target unitary $\cos\theta X+\sin\theta Z$ as $|u\rangle\langle u|-|v\rangle\langle v|$ with $\langle u|v\rangle=0$. So, we simply define $$ A=|+\rangle\langle u|+|-\rangle\langle v|, $$ and this achieves the desired transformation. Alternatively, I could predict (this comes with experience. The reliable way is the way I just stated.) that $A$ would be of the form $R_Y(\phi)$. Then we'd see $$ A^\dagger XA=XA^2=XR_Y(2\phi)=X\cos\phi-\sin\phi Z, $$ and you just have to choose the correct value of $\phi$ to give you the $\theta$ that you want.

On the other hand, note that we cannot achieve the controlled-$X$ rotation. Here, you would need $BA=I$ (i.e. $B=A^\dagger$) and $XBXA=R_x(\theta)$. Now observe that these two conditions could be rewritten as $BA=I$ and $BXA=R_x(\theta+\pi)$, so if you could achieve it, you would be able to achieve it with only a single c-not gate. However, the seqeunce with only a single c-NOT gate squares to $I$, meaning the $R_x(\theta+\pi)$ would have to have eigenvalues $\pm 1$, meaning $\theta=0$ or $\pi$ are the only possible values (which is exactly the do nothing and controlled-not gates up to some possible permutations).

DaftWullie
  • 63,351
  • 4
  • 57
  • 142
1

You can also use Exercise 4.7 in Nielsen and Chuang which shows that:

\begin{equation} XR_y(\theta)X=R_y(-\theta) \end{equation}

The above leads to a very natural $C(U)$ gate for $U=R_Y(\theta)$ based on the following decomposition:

\begin{equation} A=R_y(\theta/2)\\ B=R_y(-\theta/2)\\ C=I\\ R_y(\theta)=R_Y(\theta/2)XR_y(-\theta/2)X \end{equation}

Note that the above would work also for $R_z(\theta)$.

In the case of $U=R_x(\theta)$, observe the above trick no longer works, i.e. $XR_x(\theta)X=R_x(\theta)$. This means that for CNOTs to be useful for a $C(U)$ gate, we first have to rotate U into an orthogonal plane, then apply the CNOTs, and finally rotate back to $R_x$, e.g. $R_x(\theta)=R_z(\pi/2)R_y(\theta/2)XR_y(-\theta/2)XR_z(-\pi/2)$. That implies 3 separate unitary operations.

Martin Vesely
  • 15,398
  • 4
  • 32
  • 75
Sasho
  • 11
  • 3