8. [4 marks] Stabilizer measurements
Consider the 5-qubit phase error correcting code, where $|0\rangle$ is encoded as $|+\rangle|+\rangle|+\rangle|+\rangle|+\rangle$ and $|1\rangle$ is encoded as $|-\rangle|-\rangle|-\rangle|-\rangle|-\rangle$.
Note that this codespace is stabilized by the operators XXIII, XIXII, XIIXI and XIIIX.
(a) [1 mark] Suppose an adversary performs a phase-flip (i.e. a Z gate) on at most one of the five qubits. Suppose you perform stabilizer measurements, and obtain -1 for XXIII, and +1 for each of XIXII, XIIXI and XIIIX. Which qubit did the adversary phase-flip?
(b) [3 marks] Suppose an adversary performs phase flips (i.e. Z gates) on exactly 2 of the five qubits. Suppose you perform a stabilizer measurement, and obtain -1 for XXIII, +1 for XIXII, -1 for XIIXI and -1 for XIIIX. Which two qubits did the adversary phase-flip?