QGAME Language Description

QGAME is a language used to describe quantum programs using the gate model. The syntax that can be parsed by QGame++ follows that used by Lee Spector's original QGAME implementation, and is also described in his soon-to-be-published book "Automatic Quantum Computer Programming: A Genetic Programming Approach" and various material found on Lee's homepage at http://hampshire.edu/lspector . I will give a brief description of the syntax here.

Note:
The current version of the parser is line-oriented, meaning that each instruction must be in a single line. The parser currently also is not very robust when it comes to extra whitespace and so on. Note that libqgame++ does not care for how its QProgram object is created, and you might write your own parser that spills out QInstruction objects, or create a QProgram any way you want. This language description therefore is used mostly to describe what to feed into the command line client 'qgame' rather than how to access libqgame++ itself.

Parameters

The parameters needed for program execution can be supplied on the command line, or specified in the QGAME program file. For the latter, parameter lines are started with a colon, followed by the parameter's name and a space-separated list of values. Note that parameters given on the command line override those found in the text.

QGAME Instructions

After specifying parameters, a list of QGAME instructions should follow, each instruction in a single line (no linebreaks). In addition, you might have comment lines started by a '#'. Note that QGame++ is based on a LISP program and the syntax therefore looks pretty LISPish (i.e. there are a lot of brackets...).

Quantum Gate Instructions

Following is a list of all QGAME instructions that define gates. Note that whenever a qubit list is specified, a list of integers is expected, with the least significant qubit last.

Control Instructions

The following instructions do not specify gates, but rather influence the control flow of the program or help with debugging.


Generated on Sat Apr 3 18:42:28 2004 for QGame++ by doxygen 1.3.5