Search⌘ K
AI Features

Rotating the Qubit State

Explore how to manipulate qubit measurement probabilities by rotating quantum states using Ry gates. This lesson teaches you to calculate rotation angles that account for the qubit's prior state, enabling precise control of measurement outcomes. You'll understand the mathematical relationship between quantum state rotations and probability changes, the impact of the qubit's initial position on these rotations, and why tracking qubit states is critical in quantum algorithms.

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}} ...