Finite gate loops are checked by applying the gate twice and comparing the exact output state with the starting state. 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 first gate can move the amplitudes away

Start from amplitudes 3/5 and 4/5. One X gate swaps the two slots, so a closed-loop audit must check the second gate too.

X[3545]=[4535]X\begin{bmatrix}\frac{3}{5}\\\frac{4}{5}\end{bmatrix}=\begin{bmatrix}\frac{4}{5}\\\frac{3}{5}\end{bmatrix}
Second X gateThe rendered gate is the second swap back.state4/5 zero3/5 onestate3/5 zero4/5 oneXgate

The second gate closes the loop

The rendered row is the second X. It takes the swapped state and returns the original amplitudes, so the two-gate sequence acts like the identity on this state.

X[4535]=[3545]X\begin{bmatrix}\frac{4}{5}\\\frac{3}{5}\end{bmatrix}=\begin{bmatrix}\frac{3}{5}\\\frac{4}{5}\end{bmatrix}
Closed X loopThe output matches the original state.state4/5 zero3/5 onestate3/5 zero4/5 oneXgate

Several finite gate loops return to their starts

The audit table is not a new gate rule. It checks three finite closed loops: two X-X basis rows and one Z-Z signed-amplitude row.

auditstartafter twoX200X211Z2[3545][3545]\begin{array}{c|c|c}\text{audit}&\text{start}&\text{after two}\\X^2&\lvert 0\rangle&\lvert 0\rangle\\X^2&\lvert 1\rangle&\lvert 1\rangle\\Z^2&\begin{bmatrix}\frac{3}{5}\\\frac{-4}{5}\end{bmatrix}&\begin{bmatrix}\frac{3}{5}\\\frac{-4}{5}\end{bmatrix}\end{array}
Gate-loop scanThe diagram shows a non-basis X-X worked example.state4/5 zero3/5 onestate3/5 zero4/5 oneXgate

A reversible-looking box still needs a checked output

For this book, a gate box is honest only because the output state is computed and compared. The scan makes the closed-loop claim a row-by-row arithmetic statement.

X2=I,Z2=Ion these checked rowsX^2=I,\quad Z^2=I\quad\text{on these checked rows}
Gate identity auditThe rendered output is structurally checked.state4/5 zero3/5 onestate3/5 zero4/5 oneXgate