The X gate is a two-state ledger operation that swaps the zero and one amplitudes before probabilities are read out. The swap is exact only for the stated input vector and ideal gate; real devices have calibration error, pulse distortion, decoherence, leakage, and readout uncertainty.
The X gate swaps the two amplitudes of a single qubit. 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 X gate swaps amplitudes
The input amplitudes are 3/5 and 4/5. The checked X output swaps them.
X[5354]=[5453]
The probabilities swap too
The output probabilities are 16/25 for zero and 9/25 for one.
Pzero,out=2516,Pone,out=259
Applying X twice returns the input
The swap is reversible. A second X swaps the amplitudes back to the original order.