= Solution
Use the standard <ancilla-assisted Pauli measurement>. To measure a Pauli $P$, reset the ancilla to $|0\rangle$, apply $H$, apply the controlled version of every nonidentity factor of $P$ with the ancilla as control, apply $H$ again, and measure the ancilla in the computational basis. The preceding calculation shows that outcome $s$ projects the data with
$$
\Pi_s(P)=\frac{I+(-1)^sP}{2}.
$$
First use this circuit with $P_1=Z\otimes I$, obtaining $s_1$. Since the measured ancilla is $|s_1\rangle$, apply the classically controlled correction $X^{s_1}$ to reset it to $|0\rangle$. Reuse it to measure $P_2=Z\otimes X$, obtaining $s_2$. All controlled Pauli gates and single-qubit corrections are <Clifford gates>. Since $P_1P_2=P_2P_1$, the final data state is
$$
\boxed{
|\Psi_{\rm out}\rangle
=\frac{\Pi_{s_2}(P_2)\Pi_{s_1}(P_1)|A\rangle^{\otimes2}}
{\|\Pi_{s_2}(P_2)\Pi_{s_1}(P_1)|A\rangle^{\otimes2}\|}}.
$$
Thus one resettable ancilla implements both measurements of the PBC without disturbing the already measured Pauli eigenvalue.
Back to article page