
Learn Quantum Computing with Python and IBM Quantum
By :

Before we start digging into the description of quantum gates, let’s simplify the format so it’s easy to both understand and reference. Intuitively, the easiest way to imagine the operation of each gate is by rotating the vector that ends on the surface of the Bloch sphere around a specified axis. Recall as well that the Bloch sphere always starts with the unit vector set to the initial state. The initial state is set when the quantum circuit is first created; in this case, it is initialized to the basis state (the north pole of the Bloch sphere), as illustrated in the following diagram:
Figure 6.2: Bloch sphere representation of the basis state
One thing that will help us understand some of the labels we will see in the gate’s truth table is to define the values of each axis, where each axis is referred to as basis elements. For example, we can see from the previous figure that the z axis has the north pole labeled...