Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/calcunits/QC_cnot.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, 9 months ago) by kaityo
File MIME type: text/x-chdr
File size: 924 byte(s)
First commit
1 //---------------------------------------------------------------------------
2 // Controlled Not gate
3 //---------------------------------------------------------------------------
4 #ifndef QC_cnotH
5 #define QC_cnotH
6 //---------------------------------------------------------------------------
7 #include "QCalcUnit.h"
8 #include "QBits.h"
9 //---------------------------------------------------------------------------
10 class QC_cnot : public QCalcUnit
11 {
12 private:
13 int ControlBit;
14 int TargetBit;
15
16 public:
17 QC_cnot(int TargetBit,int ControllBit);
18 static void calc(int t, int c, double R[], double I[], int N);
19 virtual void Calc(QBits *QBits);
20 virtual std::string GetName(void) const {
21 return "Controlled Not";
22 }
23
24
25 #ifdef __USE__MPI
26 static void calcmpi(int t1, int c1, double R[], double I[], int N);
27 #endif
28
29 };
30 //---------------------------------------------------------------------------
31 #endif

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