Skip to main content
added 599 characters in body
Source Link
FDGod
  • 2.6k
  • 2
  • 6
  • 31

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$$

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$$

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$$

Source Link
FDGod
  • 2.6k
  • 2
  • 6
  • 31

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$$