Write and . Before measurement, the three controlled-NOT gates map a computational-basis component to
The measured bit is therefore . For , the unnormalized state of the first qubit is
For , it is
Each branch has probability ; after normalization and removal of the irrelevant global phase , the two outputs are
with equal probability. This is probabilistic phase-gate injection.