I saw in a qiskit document that said $Ry(\pi/2)\sigma_zRy(-\pi/2)=\sigma_x$ To confirm this I decided to create the matrix representations of these operations and multiply them together to see if I get the correct matrix, but when I did this in numpy I didn't get the correct matrix
import numpy as np
sig_z = np.array([[1,0],[0,-1]])
rz = np.array([[np.exp(-1j*np.pi/4), 0],[0,np.exp(1j*np.pi/4)]])
print(np.matmul(rz, np.matmul(sig_z, -rz)))
This outputs
array([[-2.22044605e-16+1.j, 0.00000000e+00+0.j],
[ 0.00000000e+00+0.j, 2.22044605e-16+1.j]])
While I was expecting
array([[0+0.j, 1+0.j],
[1+0.j, 0+0.j]])
Am I doing something wrong? For my $Rz$ gate I used the following model $$ Rz(\theta)= \begin{pmatrix} \mathrm{e}^{-i\frac{\theta}{2}} & 0 \\ 0 & \mathrm{e}^{i\frac{\theta}{2}} \\ \end{pmatrix} $$ and the $\sigma_x$ and $\sigma_z$ are supposed to be just standard Pauli operators.