The Z gate changes a sign that matters only when amplitudes later interfere. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
The Z gate changes one sign
The Z gate changes the sign of the one amplitude but leaves the zero amplitude alone.
Z[5354]=[53−54]
A sign alone is not directly visible here
Squaring removes the sign, so direct measurement probabilities stay 9/25 and 16/25. The sign matters only when a later operation recombines amplitudes.
(−54)2=2516
The square is the same before and after
The table isolates the one-amplitude sign. The probability is unchanged; the sign becomes visible only when a later gate recombines amplitudes.