A phase gate can make a later basis measurement come out differently. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.

highlighted = computed this step

A phase gate creates a y-basis state

After the phase gate, the state has equal direct probabilities but a different phase relation.

S+x=+yS\lvert +x\rangle = \lvert +y\rangle
Phase gate outputThe output ket carries the imaginary branch.state1/sqrt(2) zero1/sqrt(2) onestate1/sqrt(2) zero1/sqrt(2)i oneSgate

The gate keeps direct balance and changes the y readout

The scan separates direct balance from the later y-basis result.

questionplusminustotaldirect12121y basis101\begin{array}{c|c|c|c}\text{question}&\text{plus}&\text{minus}&\text{total}\\\text{direct}&\frac{1}{2}&\frac{1}{2}&1\\\text{y basis}&1&0&1\\\end{array}
Phase-to-y scanThe y-basis bars reveal the stored phase.state1/sqrt(2) up1/sqrt(2)i downy basis1plusy0minusy

The y-basis reveals that phase relation

Measured in the y basis, the probabilities are 1 and 0.

P+y=1,Py=0P_{+y}=1,\quad P_{-y}=0
Phase then y-basis measurementThe y-basis probabilities are computed from phase.state1/sqrt(2) up1/sqrt(2)i downy basis1plusy0minusy