= Solution
Prepare an <ancilla qubit> in $|0\rangle$. To measure $X\otimes X$, 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 $0$ corresponds to eigenvalue $+1$ and outcome $1$ to eigenvalue $-1$. The data register is projected by $[I+(-1)^sX\otimes X]/2$, so its complete <post-measurement state> is retained. For $Z\otimes X$, perform the same <ancilla-assisted Pauli measurement> but apply the basis-changing Hadamard gates only to the second data qubit.
Back to article page