Prepare an ancilla qubit in . To measure , apply a Hadamard gate to each data qubit, apply a controlled-NOT gate from each data qubit to the ancilla, measure the ancilla in the computational basis, and apply a Hadamard gate to each data qubit again. The ancilla records the parity of the two rotated computational-basis bits, so outcome corresponds to eigenvalue and outcome to eigenvalue . The data register is projected by , so its complete post-measurement state is retained. For , perform the same ancilla-assisted Pauli measurement but apply the basis-changing Hadamard gates only to the second data qubit.
Use the standard ancilla-assisted Pauli measurement. To measure a Pauli , reset the ancilla to , apply , apply the controlled version of every nonidentity factor of with the ancilla as control, apply again, and measure the ancilla in the computational basis. The preceding calculation shows that outcome projects the data with
First use this circuit with , obtaining . Since the measured ancilla is , apply the classically controlled correction to reset it to . Reuse it to measure , obtaining . All controlled Pauli gates and single-qubit corrections are Clifford gates. Since , the final data state isThus one resettable ancilla implements both measurements of the PBC without disturbing the already measured Pauli eigenvalue.