Multi-Qubit Gates

Let's take a look at how qubits can interact with each other using multi-qubit gates.

Controlled operations

Controlled operations are the most basic way in which two qubits can interact with each other. Basically, a gate is applied to one qubit based on the current state of the other qubit. The operation can be anything like the X, Y, Z gates. Let’s try to understand with the help of an example.

CNOT gate

This is the controlled-NOT gate. It is a two-qubit gate. It performs a bit flip operation on the target qubit only when the control qubit is 1|1\rangle. This is quite similar to the XOR gate from classical computing.

Now, what are target and control qubits? We’ll have to understand this by looking at the circuit diagram for it.

The control qubit is the qubit that determines if the XX-gate would be applied to the target qubit or not. If q0q_0 is in the 1|1\rangle, the state of q1q_1 would become Xq1X|q_1\rangle. If q0q_0 is in the 0|0\rangle state, nothing will happen. Let’s look at this with some mathematical formalism. The CNOT gate with the second (left) qubit as control and the first (right) qubit as the target is defined as follows:

CNOT=[1000010000010010]CNOT=\begin{bmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{bmatrix}

Let’s see what happens when we apply this to a two-qubit state of 10|10\rangle. The system’s state is represented after taking the tensor-product of the individual states of the qubits.

CNOT10=[10000100 ...