My question is highly related to this one.

I am trying to understand the relationship between rotational gates $R_P(\theta)$, where $P \in \{X,Y,Z\}$.

As stated here, $\exp(iPx)=\cos(x)I+i\sin(x)P$. Therefore, since $R_P(\theta) = \exp(-iP\cdot\theta/2)$, $R_P(\pi) \cong P$. In words, a rotational gate $R_P(\pi)$ is equivalent to $P$, up to a global phase.

I can't verify this through a simple check on Wolfram|alpha.

Specifically, I give as input


But get in output $$ \begin{bmatrix} 1 & -i \\ -i & 1 \end{bmatrix} $$ instead of $$ \begin{bmatrix} 0 & -i \\ -i & 0 \end{bmatrix}.$$

What am I mistaking?

  • 2
    $\begingroup$ This gives component-wise exponentiation. You instead need to use the expm function, which gives the desired result. $\endgroup$
    – nippon
    Sep 19, 2022 at 10:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.