Reversible Computation
Every quantum gate is unitary, meaning it is a perfect one-to-one mapping that can be run backwards, so a circuit can never merge two different inputs into the same output. Classical operations such as AND destroy information, so before a quantum circuit can compute them they must be embedded in a reversible form — typically a Toffoli gate writing the answer onto an extra qubit while the inputs survive.
Why must quantum logic be reversible?
Every gate in a quantum circuit is a unitary operation: a transformation that preserves total probability and always has an exact inverse. Run the gate, then run its inverse, and you are back exactly where you started — no exceptions.
A consequence follows immediately: a unitary gate is a one-to-one mapping (mathematicians say a bijection). Two different starting states can never end up as the same final state, because the inverse would then have no way to tell them apart.
Classical logic breaks this rule constantly. Take AND, which outputs 1 only when both inputs are 1. Work through its truth table: inputs (0,0), (0,1) and (1,0) all produce output 0, and only (1,1) produces 1. Four distinct inputs collapse to two outputs. If someone hands you the output 0, you cannot say which of three inputs produced it — the information is destroyed.
No unitary matrix — a matrix is just the table of numbers that writes down a gate's action on each amplitude — can implement that merge directly. So AND, OR and every other information-losing operation must be rebuilt in a reversible form before it can live inside a quantum circuit.
You’ve read the opening of chapter 8 — 8 more sections follow, with worked examples and circuits you can run on the page. A free account unlocks every chapter of every course (paid plans aren’t live yet — early readers get everything free).