Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/calcunits/QC_crot.h

Parent Directory Parent Directory | Revision Log 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: 1018 byte(s)
First commit
1 //---------------------------------------------------------------------------
2 // Controlled Rotate Gate
3 //---------------------------------------------------------------------------
4 #ifndef QC_crotH
5 #define QC_crotH
6 //---------------------------------------------------------------------------
7 #include "QCalcUnit.h"
8 #include "QBits.h"
9 //---------------------------------------------------------------------------
10
11 class QC_crot : public QCalcUnit
12 {
13 private:
14 int ControlBit;
15 int TargetBit;
16 double Theta;// Degree of rotation(Radian)
17 public:
18
19 QC_crot(int _TargetBit,int _ControllBit,double degree);
20 static void calc(int t, int c, double theta, double R[], double I[], int N);
21 virtual void Calc(QBits *QBits);
22 virtual std::string GetName(void) const {
23 return "Controlled Rot";
24 }
25
26 #ifdef __USE__MPI
27 static void calcmpi(int t1, int c1, double theta, double R[], double I[], int N);
28 #endif
29
30 };
31 //---------------------------------------------------------------------------
32 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26