The NOT Gate and Bit Flips
The NOT gate is the simplest reversible operation: it flips a bit, . Applying it twice returns the original value, so NOT is its own inverse — a property it shares with its quantum counterpart, the Pauli-X gate ().
That "apply twice to undo" idea is everywhere in quantum computing: many gates are their own inverse, and recognizing them lets you simplify circuits and design un-computation steps.
Try it
Start from the bit 1, apply NOT twice, and return the result.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.