class Q_StateVector

Quantum State of machine including memory management facilities. [Static]

This is the "Quantum Operating System" This class will manage memory for the declaration of quantum registers. The Q_BitSet class will allow for relative indexing (e.g. bit 0 in a register may be bit 7 of the entire state). All the methods and members of this class are declared static because only one machine state can exist at any given time.

Concepts/Code by: Yan Pritzker, Rafal Podeszwa, Christopher Dawson, Peter Belkner
Additional Contributions by: Joe Nelson

Members

Public
inline static void Initialize () : Default initializer: machine with 1 Qubit.
inline static void Initialize (int nQubits, int seedval=-1) : A state consisting of a specific number of Qubits.
static void Save (char[]) : Dump state to file.
static void Read (char[]) : Read state from file.
static void Print () : Display outcomes by coefficients.
static int States () : Get number of total states.
static int Qubits () : Get number of total qubits.
static Complex& Coef (int i) : Get specified coefficient for modification.

Protected
static int _Allocate (int) throws (Q_Exception::MallocErr) : Memory management facility.
static int _Collapse () : Destructive measure of entire machine state
static int _CollapseBit (int) throws (Q_Exception::RangeErr) : Destructive measure of one bit
static int _CollapseMask (unsigned long) throws (Q_Exception::RangeErr) : Destructive set of bits (specified by bitmask) measure
static int _CollapseRange (int,int) throws (Q_Exception::RangeErr) : Collapse set specified by range
static void _Reset (int s, int e) throws (Q_Exception::RangeErr) : Reset certain part of the state (for Q_BitSet).




Return To Index