class QOperator

Procedural models of several quantum gates.

Several gates have been given multiple names
either for convenience (C2Not == Tof) or for
standardization according to Barenco et al.
See Below:

----------
Rx == Deutsch
Ry == Rot
Rz == Phase
C2Not == Tof


Concepts/Code by: Rafal Podeszwa, Christopher Dawson
Additional Contributions by: Yan Pritzker

Members

Public
static void CNot (QState &q, int c, int f) : Controlled NOT (a.k.a XOR).
static void C2Not (QState &q, int c1, int c2, int f) : Double Controlled NOT (a.k.a Toffoli Gate)
static void Tof (QState &q, int c1, int c2, int f) : Toffoli Gate (see C2Not)
static void Ry (QState &q, int i, double theta) : Bit rotation on y axis by angle [theta] on bit [i]
static void Rot (QState &q, int i, double theta) : Standard [see Barenco, et al] name for Ry
static void Rx (QState &q, int i, double theta) : Bit rotation (x axis) by angle [theta] on bit [i]
static void Deutsch (QState &q, int i, double theta) : Deutsch Gate (a.k.a Rx)
static void Rz (QState &q, int i, double alpha) : Phase rotation (z axis) by angle [alpha] on bit [i]
static void Phase (QState &q, int i, double alpha) : Standard name for Rz (see Barenco, et al)
static void Scale (QState &q, double delta) : Phase Shift (scale on z axis) by angle [delta]
static void Hadamard (QState &q, int i) : Hadamard gate (|0> -> |0>+|1>, |1> -> |0>-|1>)
static void WalshHadamard (QState &q) : Set up a Walsh-Hadamard state (Hadamard gate on all bits)




Return To Index