2
$\begingroup$

I don't understand how to apply a Pauli Gate on a qubit.
Lets say 8 got a qubit with in state:

$$|\psi\rangle = 0.891 |0\rangle+ 0.454i |1\rangle$$

How would I compute e.g. rotating it 90 degrees about the z-axis? And how would I get the angles theta and azimuth from the result vector? So for the qubit above the angles are:

$\theta=3\pi/10 $ and $\phi=6\pi/12$

as we can also write $|\psi\rangle = \cos{(3\pi/20)}|0\rangle + \sin{(3\pi/20)}\exp(i 6\pi/12)|1\rangle$

derived by $\psi = \cos{(\theta/2)}|0\rangle + \sin{(\theta/2)}\exp(i \phi)|1\rangle$

$\endgroup$

1 Answer 1

2
$\begingroup$

I don't know what do you mean by pauli gatter but if you want to apply a $Z$-gate to your state, or any gate, then first write the the state as vector in a particular basis. Your state in computational basis in vector form will be

$$\left|\psi\right\rangle = \left(\begin{array}{cc} 0.891\\ 0.454𝑖\\ \end{array}\right)$$

Now, to perform rotation, just multiply this vector to its left by a rotation matrix (a unitary matrix). To flip it around $Z$-axis, apply $Z$-gate.

Say your new state is $|\phi\rangle$.

$$\therefore |\phi\rangle = Z \left|\psi\right\rangle$$ $$\therefore |\phi\rangle = \left(\begin{array}{cc} 1&0\\ 0&-1\\ \end{array}\right)\left(\begin{array}{cc} 0.891\\ 0.454𝑖\\ \end{array}\right) $$ $$\therefore |\phi\rangle =\left(\begin{array}{cc} 0.891\\ -0.454𝑖\\ \end{array}\right) $$

writing it back in computational basis $\{|0\rangle, |1\rangle\}$,

$$|\phi\rangle = 0.891|0\rangle -0.454𝑖|1\rangle$$

Now, if you want to find bloch sphere angles $\phi$ and $\theta$ for any state, again, first write that state in the vector form and then compare it with

$$ \left(\begin{array}{cc} \cos\frac{\theta}{2}\\ e^{i\phi}\sin\frac{\theta}{2} \end{array}\right) $$

and you will have two equations to solve. First will give you $\theta$ and second will give you $\phi$ .

Remember, general state you can write where $\phi$ and $\theta$ are bloch sphere angles is

$$\left|{\psi}\right\rangle = \cos\frac{\theta}{2}\left|0\right\rangle+ e^{i\phi}\sin\frac{\theta}{2}\left|1\right\rangle$$

$\endgroup$
4
  • $\begingroup$ Ahh makes sense! And how would i now get the angles theta and azimuth from that? $\endgroup$ May 2, 2023 at 6:43
  • 1
    $\begingroup$ what do you mean by theta and azimuth? can you explain what exactly are you saying? $\endgroup$
    – FDGod
    May 2, 2023 at 7:25
  • $\begingroup$ i edited the question above: So i can also articulate a qubit by its angles theta and phi and i would like to know what are the values for the angles after the rotation $\endgroup$ May 2, 2023 at 9:01
  • $\begingroup$ Okay, I think I get what you are asking. I have edited my answer. Check if this what you are asking for. $\endgroup$
    – FDGod
    May 2, 2023 at 15:35

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.