qgame::QGateU2 Class Reference
[Quantum Gates]

U2 <q> <phi> <theta> <psi> <alpha>: A general rotation gate for a single qubit with four real-valued parameters. More...

#include <qggates.h>

Inheritance diagram for qgame::QGateU2:

qgame::QMatrixGate qgame::QGate List of all members.

Public Member Functions

 QGateU2 (double phi, double theta, double psi, double alpha)
 Construct U2 gate with given params.

std::string dump () const
 Return a string describing the gate.

virtual unsigned int numQb ()
 Number of qubits manipulated, NOT amplitudes.

virtual void apply (QuSubReg &) throw (Error)
 Apply gate to given qubits.


Protected Attributes

int numQubits
 Number of affected Qubits.

int numAmps
 Number of amplitudes, generally 2^numQubits.

std::vector< std::vector<
Complex > > 
matrix
 Unitary matrix [numAmps x numAmps] defining the gate.


Detailed Description

U2 <q> <phi> <theta> <psi> <alpha>: A general rotation gate for a single qubit with four real-valued parameters.

See the QGame++ language description for details.

Definition at line 141 of file qggates.h.


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