Solution (source code)

= Solution

Use one shared $|\Phi^+\rangle$ pair to measure $Z_AZ_B$, and the other to measure $X_AX_B$. The latter <entanglement-assisted nondemolition parity measurement> is obtained by applying <Hadamard gates> to both system <qubits> before and after the $Z$-parity circuit. Since $ZX=-XZ$ at each site, the two minus signs cancel, giving $[Z_AZ_B,X_AX_B]=0$.

The <Bell states> have joint <eigenvalues>
$$
\begin{array}{c|rrrr}
\text{state}&\Phi^+&\Phi^-&\Psi^+&\Psi^-\\
Z_AZ_B&+1&+1&-1&-1\\
X_AX_B&+1&-1&+1&-1
\end{array}
$$
and are therefore distinguished uniquely by the two meter parities. For records $(u,v)$ and $(r,s)$, the combined <Kraus operator> is
$$
K_{uvrs}=\frac12P_{z,x},\qquad
P_{z,x}=\frac14(I+zZ_AZ_B)(I+xX_AX_B),
\quad z=(-1)^{u\oplus v},\quad x=(-1)^{r\oplus s}.
$$
Each $P_{z,x}$ is the rank-one projector onto the corresponding <Bell state>. This is a <Bell-state nondemolition measurement>: an input <Bell state> remains exactly that state for every possible local record. The local circuits can be scheduled without communication; the identity of the <Bell state> is known only when the classical records are brought together. \b[Two parity bits distinguish all four Bell states without disturbing them.]