OSDN Git Service

removes destructor of QCalcUnit
[qcad/qcad.git] / calcunits / QC_ccnot.h
1 //---------------------------------------------------------------------------
2 // Cotroled controled not gate
3 //---------------------------------------------------------------------------
4 #ifndef QC_ccnotH
5 #define QC_ccnotH
6
7 #include "QCalcUnit.h"
8 //---------------------------------------------------------------------------
9 class QC_ccnot : public QCalcUnit
10 {
11 private:
12     int ControlBit1;
13     int ControlBit2;
14     int TargetBit;
15
16 public:
17
18     QC_ccnot(int TargetBit,int ControllBit1, int ControlBit2);
19
20     static  void calc(int t, int c1, int c2, double R[], double I[], int bits);
21     virtual void Calc(QBits *QBits);
22     virtual std::string GetName(void) const {
23         return "Toffoli";
24     }
25
26
27 #ifdef __USE__MPI
28     static void calcmpi(int t1, int c1, int c2, double R[], double I[], int N);
29 #endif
30 };
31 #endif