qgame::QMatrixGate Class Reference
[Quantum Gates]

MATRIX-GATE #2A((row1)(row2)...(rown)): Defines a general matrix gate. More...

#include <qggates.h>

Inheritance diagram for qgame::QMatrixGate:

qgame::QGate qgame::QGateCNOT qgame::QGateCPHASE qgame::QGateCPHASEOLD qgame::QGateH2 qgame::QGateNAND qgame::QGateQNOT qgame::QGateSRN qgame::QGateSWAP qgame::QGateU2 qgame::QGateUTHETA qgame::QOracle List of all members.

Public Member Functions

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

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

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

 QMatrixGate (std::vector< std::vector< Complex > >)
 Construct a matrix gate from a given matrix.


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

MATRIX-GATE #2A((row1)(row2)...(rown)): Defines a general matrix gate.

This is also the base class for all other quantum gates that are defined by a (unitary) matrix.

Definition at line 55 of file qggates.h.


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