The Quantum Computing Language contains a number of classical programming components. The term classical refers to non-quantum components. These components are very similar to programming components found in a language like "C". The QCL has 5 data types; int, string complex, boolean real, all of which are fairly self-explanatory. The QCL also implements a full range of logic and arithmetic operators, as well as a large amount of mathematical functions, eg. sin(), cos() etc. The following example shows conditional branching in the QCL;
The QCL provides three types of loops. The for loop is similar to a for loop in C.
It also provides two conditional loops, a while loop and an until loop. The following
piece of code is an example of a QCL for loop;
The QCL also provides a means of grouping statements into blocks and functions. The following is an example
of calling a function from another piece of code;