The Bloch Sphere code allows you to view the state of a single qubit inside the QCL. A windowing system
such as XFree86 must be in use to allow the viewing of the bloch sphere, this code cannot be run from
a console, unless the graphical output is being redirected to an x-server somewhere.
First of all, start up the Quantum Computing language. To use the test program detailed below, initialise
the QCL like this;
A test program to show the usage of the bloch sphere code, is provided in the "bloch.qcl" file in the
lib subdirectory.
This procedure initialises a quantum register of size 1 qubit. The qubit is superposed with the Mix
operation, ie. the Hadamard operation, with the qubit being in the resultant state of;
![]() |
(1) |