egtry / Quantum States & Qubits Step by Step

CNOT Basis Map

CNOT is a two-qubit physical state map; this first book uses only basis states.

Calculate the baseline

With control zero, CNOT leaves the target unchanged. Change target to one to check the other control-zero row.

CNOT receives control 0 and target 0. What is the output target bit?

  1. Control stays fixed; target′ = control XOR target — Only basis inputs are represented here.
  2. target′ = (0 + 0) mod 2 — Flip the target if and only if control is one.
  3. |0,0⟩ → |0,0⟩ — The answer is the output target bit, dimensionless unit 1.
  4. ✓ — Independent check: Apply CNOT again to recover the initial target bit.

Enable JavaScript to control the model and practise.

Compare a second case

With control one, a zero target flips to one. The control itself is unchanged.

CNOT receives control 1 and target 0. What is the output target bit?

  1. Control stays fixed; target′ = control XOR target — Only basis inputs are represented here.
  2. target′ = (1 + 0) mod 2 — Flip the target if and only if control is one.
  3. |1,0⟩ → |1,1⟩ — The answer is the output target bit, dimensionless unit 1.
  4. ✓ — Independent check: Apply CNOT again to recover the initial target bit.

Enable JavaScript to control the model and practise.

Test the boundary and practise

With control one, a one target flips to zero. These four basis cases form a reversible permutation; this calculator does not infer entanglement from a basis input.

CNOT receives control 1 and target 1. What is the output target bit?

  1. Control stays fixed; target′ = control XOR target — Only basis inputs are represented here.
  2. target′ = (1 + 1) mod 2 — Flip the target if and only if control is one.
  3. |1,1⟩ → |1,0⟩ — The answer is the output target bit, dimensionless unit 1.
  4. ✓ — Independent check: Apply CNOT again to recover the initial target bit.

Enable JavaScript to control the model and practise.

Recap