Browse Subversion Repository
Contents of /trunk/calcunits/QC_pauliZ.h
Parent Directory
| 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: 982 byte(s)
First commit
| 1 |
//--------------------------------------------------------------------------- |
| 2 |
// Pauli Z gate |
| 3 |
//--------------------------------------------------------------------------- |
| 4 |
#ifndef QC_pauliZH |
| 5 |
#define QC_pauliZH |
| 6 |
//--------------------------------------------------------------------------- |
| 7 |
//--------------------------------------------------------------------------- |
| 8 |
#include "QCalcUnit.h" |
| 9 |
//--------------------------------------------------------------------------- |
| 10 |
|
| 11 |
class QC_pauliZ : public QCalcUnit |
| 12 |
{ |
| 13 |
private: |
| 14 |
int Target;//Target bit of calculation |
| 15 |
|
| 16 |
public: |
| 17 |
|
| 18 |
QC_pauliZ(int _Target);// Constructor |
| 19 |
static void calc(int target, double R[], double I[], int N); |
| 20 |
virtual void Calc(QBits *QBits);// Calclation |
| 21 |
virtual std::string GetName(void) const { |
| 22 |
return "Pauli-Z"; |
| 23 |
} |
| 24 |
|
| 25 |
#ifdef __USE__MPI |
| 26 |
static void calcmpi(int t1, double R[], double I[], int N); |
| 27 |
#endif |
| 28 |
|
| 29 |
}; |
| 30 |
//--------------------------------------------------------------------------- |
| 31 |
|
| 32 |
#endif |
|