ArticleslgStudy

physics

Controlled NOT gate

Controlled NOT gate is a physics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Controlled NOT gate rather than just read about it. In short: In computer science, the controlled NOT gate (also C-NOT or CNOT), controlled-X gate, controlled-bit-flip gate, Feynman gate or controlled Pauli-X is a quantum logic gate that is an essential component in the construction of a gate-based quantum computer. It can be used to entangle and disentangle Bell states.

Controlled NOT gate — main illustration
Controlled NOT gate — illustration

Key takeaways

  • Controlled NOT gate belongs to physics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Controlled NOT gate to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Controlled NOT gate from memory before moving on to harder problems.

Reference excerpt

In computer science, the controlled NOT gate (also C-NOT or CNOT), controlled-X gate, controlled-bit-flip gate, Feynman gate or controlled Pauli-X is a quantum logic gate that is an essential component in the construction of a gate-based quantum computer. It can be used to entangle and disentangle Bell states. Any quantum circuit can be simulated to an arbitrary degree of accuracy using a combination of CNOT gates and single qubit rotations. The gate is sometimes named after Richard Feynman who developed an early notation for quantum gate diagrams in 1986. The CNOT can be expressed in the Pauli basis as:

CNOT=eiπ4(I1−Z1)(I2−X2)=e−iπ4(I1−Z1)(I2−X2). Being both unitary and Hermitian, CNOT has the property eiθU=(cos⁡θ)I+(isin⁡θ)U and U=eiπ2(I−U)=e−iπ2(I−U), and is involutory. The CNOT gate can be further decomposed as products of rotation operator gates and exactly one two qubit interaction gate, for example

CNOT=e−iπ4Ry1(−π/2)Rx1(−π/2)Rx2(−π/2)Rxx(π/2)Ry1(π/2). In general, any single qubit unitary gate can be expressed as U=eiH, where H is a Hermitian matrix, and then the controlled U is CU=ei12(I1−Z1)H2. The CNOT gate is also used in classical reversible computing.

Operation The CNOT gate operates on a quantum register consisting of 2 qubits. The CNOT gate flips the second qubit (the target qubit) if and only if the first qubit (the control qubit) is |1⟩.

If {|0⟩,|1⟩} are the only allowed input values for both qubits, then the TARGET output of the CNOT gate corresponds to the result of a classical XOR gate. Fixing CONTROL as |1⟩, the TARGET output of the CNOT gate yields the result of a classical NOT gate. More generally, the inputs are allowed to be a linear superposition of {|0⟩,|1⟩}. The CNOT gate transforms the quantum state: a|00⟩+b|01⟩+c|10⟩+d|11⟩ into: a|00⟩+b|01⟩+c|11⟩+d|10⟩ The action of the CNOT gate can be represented by the matrix (permutation matrix form):

CNOT⁡=[1000010000010010]. The first experimental realization of a CNOT gate was accomplished in 1995. Here, a single Beryllium ion in a trap was used. The two qubits were encoded into an optical state and into the vibrational state of the ion within the trap. At the time of the experiment, the reliability of the CNOT-operation was measured to be on the order of 90%. In addition to a regular controlled NOT gate, one could construct a function-controlled NOT gate, which accepts an arbitrary number n+1 of qubits as input, where n+1 is greater than or equal to 2 (a quantum register). This gate flips the last qubit of the register if and only if a built-in function, with the first n qubits as input, returns a 1. The function-controlled NOT gate is an essential element of the Deutsch–Jozsa algorithm.

Behaviour in the Hadamard transformed basis When viewed only in the computational basis {|0⟩,|1⟩}, the behaviour of the CNOT appears to be like the equivalent classical gate. However, the simplicity of labelling one qubit the control and the other the target does not reflect the complexity of what happens for most input values of both qubits.

Insight can be gained by expressing the CNOT gate with respect to a Hadamard transformed basis {|+⟩,|−⟩}. The Hadamard transformed basis of a one-qubit register is given by

|+⟩=12(|0⟩+|1⟩),|−⟩=12(|0⟩−|1⟩), and the corresponding basis of a 2-qubit register is

|++⟩=|+⟩⊗|+⟩=12(|0⟩+|1⟩)⊗(|0⟩+|1⟩)=12(|00⟩+|01⟩+|10⟩+|11⟩), etc. Viewing CNOT in this basis, the state of the second qubit remains unchanged, and the state of the first qubit is flipped, according to the state of the second bit. (For details see below.) "Thus, in this basis the sense of which bit is the control bit and which the target bit has reversed. But we have not changed the transformation at all, only the way we are thinking about it." The "computational" basis {|0⟩,|1⟩} is the eigenbasis for the spin in the Z-direction, whereas the Hadamard basis {|+⟩,|−⟩} is the eigenbasis for spin in the X-direction. Switching X and Z and qubits 1 and 2, then, recovers the original transformation." This expresses a fundamental symmetry of the CNOT gate. The observation that both qubits are (equally) affected in a CNOT interaction is of importance when considering information flow in entangled quantum systems.

Details of the computation We now proceed to give the details of the computation. Working through each of the Hadamard basis states, the results on the right column show that the first qubit flips between |+⟩ and |−⟩ when the second qubit is |−⟩:

A quantum circuit that performs a Hadamard transform followed by CNOT then another Hadamard transform, can be described as performing the CNOT gate in the Hadamard basis (i.e. a change of basis): (H1 ⊗ H1)−1 . CNOT . (H1 ⊗ H1) The single-qubit Hadamard transform, H1, is Hermitian and its own inverse. The tensor product of two Hadamard transforms operating (independently) on two qubits is labelled H2. We can therefore write the matrices as: H2 . CNOT . H2 When multiplied out, this yields a matrix that swaps the |01⟩ and |11⟩ terms over, while leaving the |00⟩ and |10⟩ terms alone. This is equivalent to a CNOT gate where qubit 2 is the control qubit and qubit 1 is the target qubit: 12[11111−11−111−1−11−1−11].[1000010000010010].12[11111−11−111−1−11−1−11]=[1000000100100100]

Constructing a Bell state

A common application of the CNOT gate is to maximally entangle two qubits into the |Φ+⟩ Bell state; this forms part of the setup of the superdense coding, quantum teleportation, and entangled quantum cryptography algorithms. To construct |Φ+⟩, the inputs A (control) and B (target) to the CNOT gate are

12(|0⟩+|1⟩)A and |0⟩B. After applying CNOT, the resulting Bell state 12(|00⟩+|11⟩) has the property that the individual qubits can be measured using any basis and will always present a 50/50 chance of resolving to each state. In effect, the individual qubits are in an undefined state. The correlation between the two qubits is the complete description of the state of the two qubits; if we both choose the same basis to measure both qubits and compare notes, the measurements will perfectly correlate. When viewed in the computational basis, it appears that qubit A is affecting qubit B. Changing our viewpoint to the Hadamard basis demonstrates that, in a symmetrical way, qubit B is affecting qubit A. The input state can alternately be viewed as

… excerpt ends here. Continue reading the full article.

Illustrations

Controlled NOT gate: The classical analog of the CNOT gate is a reversible XOR gate.
The classical analog of the CNOT gate is a reversible XOR gate.
Controlled NOT gate: How the CNOT gate can be used (with Hadamard gates) in a computation.
How the CNOT gate can be used (with Hadamard gates) in a computation.
Controlled NOT gate: CNOT gate in Hadamard transformed basis.
CNOT gate in Hadamard transformed basis.

Worked examples

Example 1 — a first encounter with Controlled NOT gate

Start with the simplest possible case. Write down what Controlled NOT gate claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In physics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Controlled NOT gate before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Controlled NOT gate ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Controlled NOT gate

In research
Controlled NOT gate appears in physics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Controlled NOT gate in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Controlled NOT gate is common in secondary-school and first-year university syllabi. It links to neighbouring topics Quantum gates, Quantum information science, so understanding it makes those chapters shorter.
In everyday life
Look for Controlled NOT gate outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Controlled NOT gate” →

How to study Controlled NOT gate in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Controlled NOT gate means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Controlled NOT gate out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Controlled NOT gate in simple terms?

In computer science, the controlled NOT gate (also C-NOT or CNOT), controlled-X gate, controlled-bit-flip gate, Feynman gate or controlled Pauli-X is a quantum logic gate that is an essential component in the construction of a gate-based quantum computer. It can be used to entangle and disentangle…

Why does Controlled NOT gate matter?

Because it connects several physics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Controlled NOT gate?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Controlled NOT gate.

Tags

  • Quantum gates
  • Quantum information science

Keep exploring