...

/

Rotating the Qubit State

Rotating the Qubit State

Learn how we can rotate the qubit state and its implementation.

Probabilities of the rotated qubit state

We initialize our qubit with the state 0|0\rangle (line 4). Then, we apply the RyR_y gate on the qubit and pass as the first parameter the result of calling prob_to_angle with the probability value of 0.6 (line 13). The rest of the code remains unchanged.

In line 4, we initialize our qubit with the state 0|0\rangle. Then, we apply the RyR_y gate on the qubit and pass as the first parameter the result of calling prob_to_angle with the probability value of 0.6 in line 13. The rest of the code remains unchanged.

As a result, we see a 60%60\% chance to measure the qubit as the value 1. We have found an effective way to control the probabilities of measuring 0 and 1, respectively.

Let’s see what happens if we apply the RyR_y gate on a qubit in another state, for instance, in

+=0+12|+\rangle=\frac{|0\rangle+|1\rangle}{\sqrt{2}}.

Access this course and 1400+ top-rated courses and projects.