The banner at the top shows a Title, a button to Load from file (file type .qco) a sequence of operations (example), and a button to pop up a window showing the running history of operations.
Below the banner is a set of buttons for various quantum operations. Clicking a button selects its operation. When a selected operation requires the specification of one or more qubits, it is highlighted until the requisite number of qubits is selected.
Below the buttons is a set of qubits (initially a single qubit) numbered starting at 0, with each qubit shown above its number as a vertical bar whose height indicates the probability that it will be read as a 1.
For operations that require the specification of one or more qubits, the qubits can be clicked; if more qubits must be specified, the already-selected qubits are highlighted. Some operations allow all (remaining) qubits to be selected; the All button performs that function.
Below the qubits is shown the actual state of the quantum computer as a set of amplitudes, one for each conventional bit configuration, and labeled in binary (big-endian) or hex (little-endian) with that bit configuration. The squared magnitudes of all the amplitudes sum to 1. Each amplitude is a complex number, and is shown as a partially filled in unit circle with a white-and-gray radial line showing the phase. The radius of the filled-in portion of the circle is the magnitude of the amplitude, so the filled-in area is the probability of the corresponding bit configuration. The length of the white portion of the phase line is a sigmoid function of the probability, allowing a more precise differentiation of probabilities close to 0 or 1.
Description of operations | |
---|---|
Mark | place a mark in the history so that subsequent operations can be handled as a group |
Repeat from Mark | perform the sequence of operations starting with the last mark |
Undo to Mark | undo the sequence of operations starting with the last mark |
Redo to Mark | redo the sequence of operations that were undone. |
Undo | undo the last operation |
Redo | redo the operation just undone |
Undo Set | undo a sequence of the same operation applied to multiple qubits |
Redo Set | redo a sequence of the same operation applied to multiple qubits |
Undo All | undo all operations |
Redo All | redo all operations |
+qubit | add a qubit, initialized to Hadamard(0) |
Read | read a qubit, causing it to be either 0 or 1. |
Clear | read a qubit, and if the result is 1, apply Not. |
Hadamard | apply a Hadamard gate to a qubit, i.e., the amplitude of 0 becomes the normalized sum of the amplitudes of 0 and 1, while the amplitude of 1 becomes the normalized difference of the amplitudes of 0 and 1. |
Not | apply a Not gate to a qubit, i.e., invert the qubit, i.e., swap the amplitudes of 0 and 1 |
Y | apply a Y gate, i.e., swap the amplitudes of 0 and 1 then rotate 0 by -pi/2 and 1 by pi/2. |
Pi/2 | apply a Pi/2 gate to a qubit, i.e., rotate the amplitude of 1 by pi. |
Pi/4 | apply a Pi/4 gate to a qubit, i.e., rotate the amplitude of 1 by pi/2. |
Pi/8 | apply a Pi/8 gate to a qubit, i.e., rotate the amplitude of 1 by pi/4. |
Not/2 | apply "half" a Not gate to a qubit. (Applying this twice is the same as applying Not once.) |
Negate0 | negate the amplitude of the 0 state of a qubit. |
CNot | apply Controlled Not gate to a pair of qubits, i.e., invert the second qubit if the first is 1. |
Swap | swap a pair of qubits. |
Swap/2 | apply "half" a Swap gate to a pair of qubits. |
iSwap | like swap, but rotate the phase of the 01 and 10 states by pi/2. |
iSwap/2 | apply "half" an iSwap gate to a pair of qubits. |
CCNot | apply a Toffoli gate to a triple of qubits, i.e., invert the third qubit if the first two are 1. |
CSwap | swap the second and third qubits if the first is 1. |
NotIf0 | apply Not to selected qubit if all other qubits are 0. |
QFT | apply Quantum Fourier Transform to selected qubits. Select lo order then hi order qubit. |
Negate | negate the amplitude of the selected bit configuration. Select by clicking a state circle. |
Example of a file containing one step of Grover's Algorithm:
Grover(5,0xa)
+qubit
+qubit
+qubit
+qubit
+qubit
Clear 5
Mark
Not 1
Not 3
NotIf0 5
Pi/2 5
NotIf0 5
Not 1
Not 3
Hadamard 0
Hadamard 1
Hadamard 2
Hadamard 3
Hadamard 4
NotIf0 5
Not 5
Pi/2 5
Not 5
NotIf0 5
Hadamard 0
Hadamard 1
Hadamard 2
Hadamard 3
Hadamard 4
Mark