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
e^{i*{{0,1},{1,0}}*(-pi/2)}
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?
expm
function, which gives the desired result. $\endgroup$