4

This is a follow-up question to solve for parameters of a controlled $U_3$ gate. Suppose I have the unit vector $\hat{n} = (n_x,n_y,n_z)$ and an angle $\xi$ (assume we know both of them). Then, we could calculate $$ \begin{align} \begin{aligned} R_{\hat{n}}(\xi) &= \cos(\frac{\xi}{2})I-i\sin(\frac{\xi}{2})(\hat{n}\cdot\vec\sigma)\\ &= \cos(\frac{\xi}{2})I-i\sin(\frac{\xi}{2})\begin{bmatrix} n_z & n_x-in_y\\ n_x+in_y & -n_z \end{bmatrix}\\ &=\begin{bmatrix} \cos(\frac{\xi}{2})-i\sin(\frac{\xi}{2})n_z & -i\sin(\frac{\xi}{2})(n_x-in_y)\\ -i\sin(\frac{\xi}{2})(n_x+in_y) & \cos(\frac{\xi}{2})+i\sin(\frac{\xi}{2})n_z \end{bmatrix} \end{aligned} \end{align} $$ Then, an arbitrary single qubit rotation could be written as $U = e^{i\alpha}R_{\hat{n}}(\xi)$. Assume we also know the value of $\alpha$, how can we implement the controlled-$U$ in qiskit? I'm really confused with how can I utilize the (controlled) $U_3$ gate, which is defined as \begin{align} U_3(\theta,\phi,\lambda)= \begin{bmatrix} \cos\left(\frac{\theta}{2}\right) & -e^{i\lambda} \sin\left(\frac{\theta}{2}\right) \\ e^{i\phi} \sin\left(\frac{\theta}{2}\right) & e^{i(\lambda + \phi)} \cos\left(\frac{\theta}{2}\right) \end{bmatrix}. \end{align}

More specifically, if we want to implement the controlled version of \begin{align} U = e^{i\alpha}R_{\hat{n}}(\xi) \end{align} Which should be treated as $U_3$? $U$ or $R_{\hat n}(\xi)$? Any suggestions for figuring out the arguments of $U_3$? Do I need to worry about phase kickback?

Thanks a lot for the help!

ZR-
  • 2,388
  • 7
  • 19
  • 2
    Does this answer your question? Also note how the phase in the controlled unitary can be implemented as a phase gate on the control qubit. – JSdJ Feb 28 '21 at 22:06
  • @JSdJ Thanks so much for the comment! That's very helpful, but I'm still wondering in this case, if I proceed from $ e^{i\alpha}R_{\hat{n}}(\xi)$ and implement the phase on the control qubit, then how can I do the rest part (i.e. controlled $R_{\hat{n}}(\xi)$)? I don't know if I could relate the two matrices above. – ZR- Feb 28 '21 at 22:35
  • This question has been solved. Thanks:) – ZR- Mar 02 '21 at 04:55
  • Hi @ZR-. If you solved by yourself the question, could you please write down an answer and mark it as the accepted answer? It may help future people with the same question as you. – Adrien Suau Mar 03 '21 at 08:22
  • @Adrien Suau Yeah of course! I'll do that:) – ZR- Mar 03 '21 at 15:35

0 Answers0