Skip to main content

Plain-Language Intuition

Mode: Simple / School
Adding two bits gives a two-bit answer: a sum bit and a carry bit. 1 + 1 = 10 in binary: sum 0, carry 1. In classical electronics a half adder uses an XOR gate for the sum and an AND gate for the carry. The quantum version uses the same logic with reversible gates: - A Toffoli gate writes "a AND b" onto a fresh carry qubit. - A CNOT writes "a XOR b" onto the b qubit. Read the result from the left: carry (q2q_{2}), then sum (q1q_{1}). Choose "all at once" to feed in a superposition of every input and compute all four additions in a single run. This is the quantum parallelism that arithmetic-heavy algorithms like Shor's rely on.

Quantum Arithmetic

Quantum Half Adder: quick reference

Adds two bits reversibly with one Toffoli (carry) and one CNOT (sum), the building block of quantum arithmetic.

Topic
Quantum Arithmetic
Level
Intermediate
Circuit size
3 Qubits
Key result
Adds every pair of inputs at once in superposition

Concepts covered: Reversible Computing, Quantum Arithmetic, Toffoli Gate, Carry and Sum Logic

How Quantum Half Adder works, step by step

  1. Load the Inputs. Set a (Q0) and b (Q1) to 1. Q2 starts at 0 and will receive the carry.
  2. Compute the Carry with a Toffoli. The Toffoli sets the carry to 1 only when both inputs are 1.
  3. Compute the Sum with a CNOT. A CNOT replaces b with "a XOR b", the sum bit. 1 + 1 gives sum 0.
  4. Read Carry and Sum. Reading left to right: carry 1, sum 0, input a = 1. So 1 + 1 = 10 in binary.

Frequently asked questions

What is Quantum Half Adder?

Adds two bits reversibly with one Toffoli (carry) and one CNOT (sum), the building block of quantum arithmetic. It is a intermediate-level topic in quantum arithmetic.

How many qubits does the Quantum Half Adder circuit use?

The QuanBit tutorial uses a 3 qubits circuit. Key result: Adds every pair of inputs at once in superposition.

Can I simulate Quantum Half Adder online for free?

Yes. The interactive Quantum Half Adder tutorial at https://www.quanbit.tech/learn/half-adder runs free in the browser with nothing to install. You can step through the circuit gate by gate, watch the probabilities, statevector and Bloch spheres update, build the circuit yourself and take a short quiz.