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 (line 4). Then, we apply the 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 . Then, we apply the 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 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 gate on a qubit in another state, for instance, in
.
Get hands-on with 1400+ tech skills courses.