To draw the bloch sphere, the GNU libplot library is used. Libplot is a freely available C/C++ function library for device-independent 2-D vector graphics. The C++ class library is called libplotter, which provides an object-oriented interface to libplot's functionality, is used in this project. To use libplot, a pointer to a Plotter object is created with the command;
The page size and picture size are set by the following commands;
The line size and colour can be set with the following commands;
The Plotter object can draw strings on the screen with the following command;
The circle for the Bloch Sphere can be drawn with the command;
The axes can be drawn with the command;
The semi-circle ellipse at the center of the sphere can be drawn with the command;
The filled circle which represents the position of the qubit on the bloch sphere, can be drawn with the command;