Browse Subversion Repository
Contents of /trunk/calcunits/QC_rot.h
Parent Directory
| Revision Log
Revision 1 -
( show annotations)
( download)
( as text)
Wed Aug 3 10:14:23 2011 UTC
(12 years, 8 months ago)
by kaityo
File MIME type: text/x-chdr
File size: 974 byte(s)
First commit
| 1 |
//--------------------------------------------------------------------------- |
| 2 |
// Rotate Gate |
| 3 |
//--------------------------------------------------------------------------- |
| 4 |
#ifndef QC_rotH |
| 5 |
#define QC_rotH |
| 6 |
//--------------------------------------------------------------------------- |
| 7 |
#include "QCalcUnit.h" |
| 8 |
#include "QBits.h" |
| 9 |
//--------------------------------------------------------------------------- |
| 10 |
|
| 11 |
class QC_rot : public QCalcUnit |
| 12 |
{ |
| 13 |
private: |
| 14 |
int TargetBit; |
| 15 |
double Theta;// Degree of rotation(Radian) |
| 16 |
public: |
| 17 |
|
| 18 |
QC_rot(int _TargetBit,double degree); |
| 19 |
static void calc(int target, double theta, double R[], double I[], int N); |
| 20 |
virtual void Calc(QBits *QBits); |
| 21 |
virtual std::string GetName(void) const { |
| 22 |
return "Rot"; |
| 23 |
} |
| 24 |
|
| 25 |
#ifdef __USE__MPI |
| 26 |
static void calcmpi(int t1, double theta, double R[], double I[], int N); |
| 27 |
#endif |
| 28 |
}; |
| 29 |
//--------------------------------------------------------------------------- |
| 30 |
#endif |
|