Play with one qubit.
Here, you have a chance to program quantum code to explore some of the actions you can make to manipulate it.
To review qubit is a two level quantum mechanical system.
It allows for superpositions where the qubit can be in superpositions of stateand state . For example, the state , where are parameters to describe the superposition.
A way to visualize one qubit is called the Bloch sphere.
The statecan be represented by any point on the sphere, depending on . However, in quantum mechanics, one cannot observe a quantum state directly. One can only do a measurement, and from that, find the probability of it being on a state. For example, a measurement to determine if it is or
A qubit by itself is not very useful unless we can control it. For this, we
Right, it rotatesby about the Y-axis. Similarly the Z gate would rotate by around the Z-axis.
There's one more gate we should discuss, the Hadamard gate. It's a combination of two rotations, about the Z-axis and about the Y-axis. The H gate takes a state and creates a equal superpositions of and .
When you look at quantum circuits, note this gate appears often at the beginning of many circuits, as creating superpositions is a common step to start doing quantum computations.
There are a few other common single-qubit gates such as S and T, among others.
In the project linked her, you can get started with one-qubit quantum circuit operations using QASM. Yeah, go ahead. All you need start playing with qubits is to change with the code there.
For more details on QASM, check out its documentation here.
Here is a list of some of the one-qubit gates featured in this exercise.
z // pi rotation about the Z-axis x // pi rotation about the X-axis y // pi rotation about the Y-axis h // The combination of two rotations, pi about the Z-axis followed by pi/2 about the Y-axis s // S-gate, square root of Z gate sdg // conjugate of S-gate t // Phase-gate, conjugate of square root of S-gate tdg // conjugate of Phase-gate x(0) // rotation around X-axis y(0) // rotation around Y-axis z(0) // rotation around Z axis
Think you've got the hang of it? Try solving the RubiQ's Sphere!