Treat the residual as a new comparison number, not a rewrite of the state model.
The baseline expects 57 zero reads and 23 one reads, while the new counts 52 and
28 leave residuals of 5 and 5; real residual flags depend on shot noise,
readout calibration, drift, and threshold choices.
A residual compares new counts with the calibrated prediction without changing the state model. 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 baseline prediction is exact
The calibrated baseline expects 57 zero reads and 23 one reads.
Nzero=57,None=23
Residual rows compare expected and new counts
The residual is computed as a count difference; it does not rewrite the quantum state model.