At the top is the pure state |0>
and at the bottom is the pure state |1>
.
Normal computers use bits with only these two states: 0 and 1.
Quantum computers use the whole range of states, including the
intermediate states that are "superpositions" of |0>
and |1>
.
At the top right, click Register, as shown below.
Create an account, as shown below.
Read your email. Click the link to activate your account.
The "My Projects" page opens, as shown below.
Click the green "New project" button.
Set the Visibility to Private and give your project any name, as shown below.
Click Continue.
The Drag & Drop editor page appears, as shown below.
On the left there are square icons called
"Measurement Gates". On the right,
the "Edit QASM" pane shows one Qubit
named q0, with an initial state of
|0>
, which
is a certain state of zero.
|0>
and
|1>
only.
These quantum programs do the same thing normal digital computers do.
In the Drag & Drop editor, on the left side, find the icon that looks like an umbrella, as shown below.
This is a "Measurement Gate".
Drag the "Measurement Gate" and drop it on the q0 line, as shown below.
A second line appears, labelled c,
with an initial state of
0
. This is a
classical bit, with a value
of zero.
This quantum program takes a qubit with a state
of 0
and
measures it, creating a "classical"
(non-quantum) bit with a value of 0.
At the top center, click the Simulate button.
The quantum program runs. The result is a single bit, which is always zero. This is indicated by showing that the "Probability of 1" is 0, as shown below.
Perform these three operations:
This program takes two qubits, each with an initial state of
0
, and rotates them 180 degrees
about the X-axis, which flip each qubit to a state of
1
. It then measures them,
using a classical bit, which has the value 1 both times
it is used.
At the top center, click the Simulate button.
The quantum program runs. The result is two bits, both with a "Probability of 1" of 1, as shown below.
The result shows the five resulting bits, covered by a green box in the image below.
The flag is those five bits, like 00000.
|0>
becomes an uncertain state
in between
|0>
and
|1>
,
as shown by the orange arrow in the
figure below.
At the top left, find the "Undo" button, as shown below.
Click the "Undo" button enough times to clear your previous calculation, and compose the program shown below.
Simulate it. The qubits are now in uncertain states, sometimes 0 and sometimes 1, so the "Probability of 1" is .5, as shown below.
Simulate it. The result shows the five resulting probabilities, covered by a green box in the image below.
The flag is those five probabilities, separated by spaces, like 0 0.1 0.2 0.5 1.
Compose the experiment shown below.
To make the entanglement, first drop an X gate on the top line, and then drop a round dot icon on the lower line.
Simulate it. T Both bits are now 1, as shown below.
The X gate flipped q1
to
|1>
,
and the +
gate entangled q0
with q1, so they
both flipped together.
This is a fundamental, strange property of quantum mechanics, which Einstein called "spooky action at a distance," because there's no obvious physical link between the qubits.
Simulate it. The result shows the five resulting probabilities, covered by a green box in the image below.
The flag is those five probabilities, separated by spaces, like 0 0.1 0.2 0.5 1.