A two-qubit quantum logic gate, the CNOT gate, also known as the controlled-NOT gate. It plays a crucial role in quantum computing. This type of quantum logic gate uses the state of a control qubit to switch the state of a target qubit. With the control qubit deciding the NOT operation application on the target qubit, its operation may be considered as a quantum counterpart to a classical XOR gate. Many quantum algorithms rely on it, including quantum teleportation and quantum error correction.
CNOT Gate Operation
Operating on two qubits—the first qubit is a control qubit and the second qubit is a target qubit—the CNOT gate
The truth table of the CNOT gate may be easily stated as:
- The gate changes the target qubit’s state.
- Target qubit stays the same; the control qubit is ∣0⟩.
- The target qubit flips (that is, ∣0⟩→∣1⟩ and ∣1⟩→∣0⟩). The control qubit is ∣1⟩.
Before | After | ||
Control | Target | Control | Target |
|0⟩ | |0⟩ | |0⟩ | |0⟩ |
|0⟩ | ∣1⟩ | |0⟩ | ∣1⟩ |
∣1⟩ | |0⟩ | ∣1⟩ | ∣1⟩ |
∣1⟩ | ∣1⟩ | ∣1⟩ | |0⟩ |
CNOT Gate Matrix
The CNOT gate can be represented by a 4×4 unitary matrix:
This matrix operates on the two-qubit states |00⟩, |01⟩, |01⟩, and |11⟩. In the matrix, the top left quadrant is the 2×2 identity matrix, which is applied when the control qubit is in the state |0⟩. The lower right quadrant is the Pauli-X matrix, which is applied to the target qubit when the control qubit is in state |1⟩.
We may investigate the CNOT gate’s effect on the qubit state by multiplying matrices. Each potential state may be represented by a row in the column vectors since this gate uses two qubits.
Example 1: control qubit is |0〉 and target qubit is |0〉. The result of the combined state will be |00〉, After Applying the CNOT gate to the combined state |00〉, See the above truth table target qubit flip from |0〉to |0〉, it means the target qubit will be the same, the final result will be |10〉
Example 2: control qubit is |0〉 and target qubit is |1〉. The result of the combined state will be |01〉, After Applying the CNOT gate to the combined state |01〉, See the above truth table target qubit flip from |1〉to |1〉, it means the target qubit will be the same, the final result will be |01〉
Example 3: control qubit is |1〉 and target qubit is |0〉. The result of the combined state will be |10〉, After Applying the CNOT gate to the combined state |10〉, See the above truth table target qubit flip from |0〉to |1〉the final result will be |11〉
Example 4: control qubit is |1〉 and target qubit is |1〉. The result of the combined state will be |11〉, After Applying the CNOT gate to the combined state |11〉, See the above truth table target qubit flip from |1〉to |0〉the final result will be |10〉
CNOT gate Circuit Diagram

- Circuit Symbol: In quantum circuit diagrams, the CNOT gate is shown by a circle (representing the control qubit) linked by a line to another circle with a plus sign (indicating the target qubit). The control qubit is generally shown above the target qubit.
- The CNOT gate is crucial for generating entanglement and executing quantum algorithms in quantum circuits. It can facilitate the flow of information across qubits or execute actions unattainable with single-qubit gates.
Superposition: An entangled state is produced by the CNOT gate when the control qubit is in a superposition of |0⟩ and |1⟩. To illustrate the point, the CNOT gate changes the state to α|00⟩ + β|11⟩ if the control qubit is in the state (α|0⟩ + β|1⟩) and the target qubit is in the state |0⟩. In this entangled condition, the qubits are interdependent and cannot be characterized separately.
Universality: The CNOT gate is one of a collection of universal gates that also includes single-qubit gates. When coupled with a set of single-qubit gates, CNOT gates make it possible to do any quantum computation.
Controlled-U Gate
A controlled-U gate, of which the CNOT gate is a subset, can apply, depending on the state of the control qubit, any conceivable single-qubit unitary operation to the target qubit. In a 2n+1 × 2n+1 unitary matrix (I 0; 0 U), the controlled-U gate may be shown, with ‘I’ being the identity matrix, ‘0’ being a 2n zero matrix, and ‘U’ being a 2nx2n unitary matrix.

In cases when U is a Pauli operator (X, Y, or Z), the words “controlled-X,” “controlled-Y,” or “controlled-Z” may be employed. It is possible to abbreviate this to CX, CY, and CZ.
Thus, the controlled-U gate is a gate that uses the first qubit as a control and works on two qubits. What follows is a map of the fundamental states.
- |00⟩=|00⟩
- |01⟩=|01⟩
- |10⟩↦|1⟩⊗U|0⟩=|1⟩⊗(u00|0⟩+u10|1⟩)
- |11⟩↦|1⟩⊗U|1⟩=|1⟩⊗(u01|0⟩+u11|1⟩)
Applications of the CNOT Gate
Quantum Entanglement: The CNOT gate is instrumental in creating entangled states, such as Bell states, which are crucial for quantum communication and cryptography:
∣Φ+⟩=1/√2(∣00⟩+∣11⟩)
Universal Quantum Computation: Combined with single-qubit gates like the Hadamard gate, the CNOT gate forms a universal set of quantum gates capable of constructing any quantum circuit.
Quantum Error Correction: The CNOT gate is used in encoding quantum information redundantly across multiple qubits to detect and correct errors caused by decoherence and noise.
CNOT Gate Importance in Quantum Algorithms
The CNOT gate is a critical component of many quantum algorithms, including:
- Deutsch-Jozsa Algorithm: For solving oracle problems with exponential speedup over classical methods.
- Grover’s Algorithm: Used in quantum search algorithms.
- Shor’s Algorithm: Facilitating integer factorization and posing challenges to classical cryptography