Principles of Superconducting Quantum Computers. Daniel D. Stancil
where the same operator is applied across multiple qubits; i.e., H⊗H is alternatively written H⊗2, H⊗H⊗H=H⊗3, etc.
1.5.3 Controlled-NOT
The gates that we have considered so far involve operations that are independently applied to separate qubits—there is no qubit–qubit interaction. If we are to entangle two qubits, then we need classes of gates where the operation on one qubit depends on the state of another. One of the most important such gates is the controlled-NOT, or CNOT gate. For this gate, one of the input qubits is the “control,” and the other is the “target.” If the control qubit is zero, then nothing is done to the target qubit, but if the control qubit is one, then the target qubit is flipped. For example, if the right qubit in our notation is the control and the left qubit is the target, then the CNOT gate transforms the basis states as follows:
The effect of a CNOT can be compactly represented by UCN|t⟩|c⟩=|c⊕t⟩|c⟩, where ⊕ represents exclusive-OR or modulo-2 addition (e.g., 0+1=1, but 1+1=0). The matrix representation of the CNOT gate is
and the circuit symbol is shown in Figure 1.4.
Figure 1.4 Symbol for a CNOT gate, and its effect on basis states.
It is worth noting at this point that we are putting the least-significant qubit at the top of a circuit diagram, and on the right on the state labels used with kets. This labels states with the natural binary order. However, there are different conventions in use, and this can be a point of confusion. Some authors put the top-most qubit in a circuit diagram on the left when they label kets. In this alternate notation, UCN′|c⟩|t⟩=|c⟩|c⊕t⟩ so that
The matrix representation of the CNOT gate in this alternate convention is
We will consistently use the first convention, with the least-significant qubit (top-most on a circuit diagram) on the right when writing state labels.
1.6 Bell State
Consider the circuit shown in Figure 1.5. The circuit can be described mathematically as UCN (I ⊗ H) |00⟩. Here the expression I⊗H simply means a Hadamard gate is applied to the right qubit, and the identity matrix applied to the left qubit (which leaves the left qubit unchanged). Completing the calculation gives
Figure 1.5 Circuit for creating an entangled state known as a Bell State. When the two qubits are measured, they will either both be 0, or they will both be 1.
Note that there is no way to factor this state into (qubit 1 state) ⊗ (qubit 0 state). This is known as a Bell State, and it is an example of an entangled state, as described in Section 1.1.5.
If we measure the state of one of the qubits in (1.55), then we will obtain either a zero or a one with equal probability, as we would expect. The unusual behavior happens when we measure the second qubit: if we measure |0⟩ on the first qubit, then we know the state has collapsed to |00⟩, so a measurement of the second qubit will also yield |0⟩. Similarly, if the first measurement yields |1⟩, then the state must have collapsed to |11⟩, so a measurement of the second qubit will also yield |1⟩. The measurements are correlated, no matter how far apart the physical qubits might be.
We simulated the Bell circuit using IBM’s Qiskit [2], and also executed the circuit on real IBM Quantum hardware. A histogram illustrating the results of simulating the circuit 1024 times (each execution is referred to as a “shot”) is shown in Figure 1.6. From (1.55), we see that the probability amplitudes of the states |00⟩ and |11⟩ are both equal to 1/2. Since the probability of measuring a state is the absolute magnitude squared of the amplitude, the probability of measuring each state is 1/2. Consistent with this, the measurements from the 1024 shots are roughly equally divided between the