qgame::QProgram Class Reference
[Quantum Programs]

A quantum program. More...

#include <qgprog.h>

List of all members.

Public Member Functions

unsigned int length () const
 The length of the program (number of instructions).

QProgramSettings read (std::istream &stream) throw (Error)
 Read a program from a stream.

bool addInstruction (const std::string &line) throw (Error)
 Append an instruction given as a line of text.

bool addInstruction (QInstr *) throw (Error)
 Append an instruction given as a QInstr object.

void installOracle (const std::string &oracleTT)
 Install the given truth table to all oracle gates in the program.

QInstroperator[] (unsigned int) throw (Error)
 Return a reference to the addressed instruction.


Friends

std::ostream & operator<< (std::ostream &, const QProgram &)


Detailed Description

A quantum program.

Basically this stores a vector if QInstr objects and provides functions to read a QProgram from a string or a file. The interface functions as well as the syntax will most likely be changed in the future!

Definition at line 80 of file qgprog.h.


Member Function Documentation

QProgramSettings QProgram::read std::istream &  stream  )  throw (Error)
 

Read a program from a stream.

Settings provided will be returned. Note that the QProgramSettings object returned may contain empty settings!

Definition at line 89 of file qgprog.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Apr 3 18:42:38 2004 for QGame++ by doxygen 1.3.5