next up previous contents
Next: About this document ... Up: A tutor on the Previous: Classical components of the   Contents

Quantum components of the QCL

The QCL is started with a set number of qubits in the system. The default number of qubits is 32. Qubits are manipulated by declaring quantum registers of an arbitrary number of qubits. An operator can then be applied to the quantum register.
\begin{lstlisting}[frame=trbl]{}
qureg a[5]; // Initialise a quantum register of...
...its
Mix(a); // Superpose all the qubits in the quantum register
\end{lstlisting}


The QCL provides many operators for quantum registers, a few examples are provided here;

The QCL provides two non-unitary operators as well. These operators are allowed, because they destructively interfere with the machine state instead of modifying it. The first operator, measure, is the equivalent of observing a qubit. It forces the qubit in question to decompose into one of it's base states. The second operator is reset. This serves to reinitialise every qubit in the system.


next up previous contents
Next: About this document ... Up: A tutor on the Previous: Classical components of the   Contents
Colm O hEigeartaigh 2003-05-30