//---------------------------------------------------------------------------
// Cotroled controled not gate
//---------------------------------------------------------------------------
#ifndef QC_ccnotH
#define QC_ccnotH

#include "QCalcUnit.h"
//---------------------------------------------------------------------------
class QC_ccnot : public QCalcUnit
{
private:
    int ControlBit1;
    int ControlBit2;
    int TargetBit;

public:

    QC_ccnot(int TargetBit,int ControllBit1, int ControlBit2);

    static  void calc(int t, int c1, int c2, double R[], double I[], int bits);
    virtual void Calc(QBits *QBits);
    virtual std::string GetName(void) const {
        return "Toffoli";
    }


#ifdef __USE__MPI
    static void calcmpi(int t1, int c1, int c2, double R[], double I[], int N);
#endif
};
#endif
