The same stabilizer structure that makes a Clifford graph state easy to describe also makes it unusually verifiable. Instead of classically calculating the probability of each sampled bit string, we can ask whether measured Pauli symmetries still have the values required by the target state.
Random stabilizers as test observables
The vertex generators Kv commute and each has expectation +1 on the ideal graph state. Any product of generators is another stabilizer. A random binary mask therefore selects a reproducible test operator:
\[S(\mathbf{a})=\prod_v K_v^{a_v}, \qquad a_v\in\{0,1\}.\]The repository generates these products from the exact Clifford prefix and verifies with Qiskit’s stabilizer representation that every selected Pauli has ideal expectation +1.
How to measure a Pauli string
A stabilizer is a tensor product such as X ⊗ I ⊗ Y ⊗ Z. Each non-identity factor determines a local basis change:
- Z: measure directly;
- X: apply H, then measure;
- Y: apply S† followed by H, then measure.
For every accepted shot, multiply the ±1 eigenvalues of the measured support. Averaging this parity estimates the expectation value:
\[\langle S\rangle \approx \frac{1}{M}\sum_{m=1}^{M} s_m, \qquad s_m\in\{-1,+1\}.\]A noisy state pushes the average away from the ideal value. Measuring many random stabilizers gives a Monte Carlo direct-fidelity estimator for the stabilizer-state prefix. It does not directly certify the later non-Clifford sampling distribution unless additional assumptions connect the two.
Spacetime checks
A final measurement tells us whether a stabilizer is correct at the end of the circuit. A spacetime check is more ambitious: an ancilla coherently records a Pauli relation that spans selected locations and times inside the Clifford circuit. An error that anticommutes with that relation flips the ancilla syndrome.
The checked circuit therefore follows this logic:
- prepare data and ancilla qubits;
- couple each ancilla to the evolving Clifford circuit according to a valid Pauli check;
- measure the ancilla syndrome;
- keep shots with the required syndrome and reject detected errors;
- analyse the data-qubit samples or stabilizer parities on the retained ensemble.
Postselection trades quantity for quality. More checks can detect more errors, but they can also reject almost every shot and add gates that introduce new noise. Fewer checks retain more data, but allow more undetected damage. The check count is therefore an experimental design parameter, not a fidelity dial.
Why the graph-state prefix is checked separately
Valid spacetime Pauli checks are easiest to construct while the circuit is Clifford. The face-state rotation is non-Clifford and generally maps Pauli operators outside the Pauli group. The repository therefore distinguishes two evidence channels:
- full bit strings from the complete non-Clifford sampling circuit;
- stabilizer expectations from the graph-state prefix.
They illuminate the same experiment but are not interchangeable measurements.
What stabilizer folding tests
The project also tried an identity-equivalent folding transformation around selected stabilizer measurements. The purpose was methodological: determine whether a stronger detection pattern improves the physical expectation values, not merely the number of retained shots. The small test did not justify scaling that route further, so the detailed job bookkeeping belongs in the repository rather than in the conceptual story.
Further reading
Part 6 combines these ideas into a practical research workflow: exact small tests, approximate classical baselines, compilation, guarded submission and evidence retrieval.


