e are called CNOT, CROSSOVER, controlled-U, controlled-SWAP, Toffoli, and CCNOT, which I shall review in the following. Quantum bits and quantum gates x)=a0)+B1> x)=a0++B1> Figure 16.2 CNOT gate with control qubit |a) and target qubit /x), with truth table and gate output |a), |x') resulting from target qubit superposition /x) = a|0) + B|1). CNOT gate Consider first the CNOT gate, whose diagram is shown in Fig. 16.2. The gate has a control qubit |a) = |0) or |a) = |1), and a target qubit |x) = a|0) + B|1). Here, we shall assume that the control qubits are in pure states, namely, |0), |1). The figure shows the action of the CNOT gate with the corresponding truth table. It is seen from the figure that the target qubit |x) is left unchanged when the control qubit is |a) = |0) while in the case |a) = |1) the amplitudes a, B of /x) are swapped which, as we have seen in the previous section, represents the quantum NOT version of a qubit. But how can we define the CNOT gate matrix, since here we have a control qubit? To answer this, recall that in the case of 1-qubit gates, the matrix is defined in the computational base |0), |1). In the case of the CNOT gate, the matrix must be defined in the extended computational base, noted {|a>| |x)} = {|0>|0), |0)|1), |1) |0), |1)|1}}, which covers all possible gate inputs according to the truth table shown in Fig. 16.2, with |a) = |0) or |a) = |1) and |x) = |0) or /x) = |1) (the matrix applying to any superposition thereof). As will be described further on in this chapter, the state |a) |x) is referred to as the tensor product of the kets |a) and lx>. In the computational base {|0>|1}}, the input tensor state |a>|x) is represented by a four-dimensional column-vector with coordinates U1, U2, U3, U4, (16.28) which = 1. The output state of the gate is then given by the matrix-vector relation |a')|x') = A\a) xx, where A is the gate's 4 X 4 matrix. In the case of the CNOT gate, and as expressed in the tensor base 16.3 Quantum gates with multiple inputs and outputs Table 16.2 Transform