The Elementary Gates

Peter Belkner <pbelkner@snafu.de>

The following figure and it's caption is taken from quant-ph/9511018 (Vedral et.al.: Quantum networks for elementary arithmetic operations).

Truth tables and graphical representations of the elementary quantum gates used for the construction of more complicated quantum networks. The control qubits are graphically represented by a dot, the target qubits by a cross. i) NOT operation. ii) Control--NOT. This gate can be seen as a "copy operation" in the sense that a target qubit (b) initially in the state 0 will be after the action of the gate in the same state as the control qubit. iii) Toffoli gate. This gate can also be seen as a Control--control--NOT: the target bit (c) undergoes a NOT operation only when the two controls (a and b) are in state 1.

1. The Not Gate

EqcsVedral::Not::Not(int bit) : EqcsLambda(0.0, 1.0, 1.0, 0.0, 0)
    { set(0, bit); }
Listing 1: The not gate.

2. The Contolled Not Gate

EqcsVedral::CNot::CNot(int bit, int c) : EqcsLambda(0.0, 1.0, 1.0, 0.0, 1)
{
    set(0, bit);
    set(1, c);
}
Listing 2: The controlled not gate.

3. The Contolled Contolled Not Gate

EqcsVedral::CCNot::CCNot(int bit, int c1, int c0) :
    EqcsLambda(0.0, 1.0, 1.0, 0.0, 2)
{
    set(0, bit);
    set(1, c1);
    set(2, c0);
}
Listing 3: The controlled controlled not gate.


Peter Belkner <pbelkner@snafu.de>