# How can one show that Alice's and Bob's answers agree at the intersection cells of Mermin-Peres' "magic square"?

This question is along the lines of Problems in understanding the solution for "Mermin–Peres Magic Square Game"

How can one show that Alice's and Bob's answers agree at the intersection cells of Magic Square? Is it reasonable to expect the following to give the right answer?

Could we show that the expected value of the product of measurement outcomes of Alice and Bob is 1? Let the operator applied by both Alice and Bob at location (i,j) be $$D_{ij}$$. Can this be shown by understanding $$Tr[\rho^A D_{ij}]\cdot Tr[\rho^B D_{ij}]$$ where $$\rho^A,\rho^B$$ are density matrices corresponding to Alice's and Bob's entangled quantum state?

Even though Alice and Bob use the "same" observable, it acts on different systems. To avoid confusion it's better to denote observables as $$D_{ij}^A, D_{ij}^B$$ and $$D_{ij} = D_{ij}^A \otimes D_{ij}^B$$ for the joint observable that acts on 4 qubit space.

$$\text{Tr}(\rho^A D_{ij}^A)$$ and $$\text{Tr}(\rho^B D_{ij}^B)$$ are average values (expectations) of the observables $$D_{ij}^A, D_{ij}^B$$. The product has no information about correlations.

In any single measurement the joint state $$\rho=|\psi\rangle\langle\psi|$$ collapses to some eigenstate $$s^A \otimes s^B$$ of $$D_{ij} = D_{ij}^A \otimes D_{ij}^B$$. We need to check that in any case we have $$\text{Tr}(s^AD_{ij}^A) = \text{Tr}(s^BD_{ij}^B)$$, which is $$1$$ or $$-1$$.

Actually, we can just check that $$\text{Tr}(s^AD_{ij}^A)\text{Tr}(s^BD_{ij}^B)=1$$, i.e. the eigenvalue of $$s^A \otimes s^B$$ is always $$1$$. But this is equivalent to saying that $$\rho$$ is itself an eigenstate of $$D_{ij}$$ with eigenvalue $$1$$. So, it's enough to check that $$D_{ij}|\psi\rangle=|\psi\rangle$$ (or, equivalently, $$\text{Tr}(\rho D_{ij})=1$$).

### General setup


So given $$\rho$$, we have a collection of joint probability distributions $$p^{(j)}_{ab}$$ representing the probability of finding the outcomes $$a$$ and $$b$$ when using the $$j$$-th measurement. For Peres-Mermin's square we actually use different measurements for the different parties, and thus we have $$p_{ab}^{(j)} = \tr[(\mu_a^{(j,A)}\otimes\mu_b^{(j,B)})\rho],$$ where $$\mu_b^{(j,A)}$$ gives the probability of Alice getting the $$b$$-th outcome, when using the $$j$$-th measurement choice. Same goes for $$\mu_b^{(j,B)}$$. It is worth pointing out that this expression does not factorise, unless $$\rho$$ is a product state, in which case there is no correlation at all between the measurement outcomes.

The overall goal (or at least part of it) of the protocol is to find $$\{\bs\mu^{(j)}\}_j$$ and $$\rho$$ such that $$p_{ab}^{(j)}$$ is fully correlated for all $$j$$. Generally speaking, fully correlated here means that $$p^{(j)}_{a,b}=\delta_{a,f_j(b)}$$ for some bijective function $$f_j$$. In other words, it means that knowing one of the outcomes allows to deterministically predict the other one (e.g. both outcomes are equal).

### Specialising the formalism

More specifically, the protocol at hand requires that

1. The initial state is pure, call it $$|\Psi\rangle$$, and each party holds two qubits, so that $$|\Psi\rangle\in(\mathbb C^2)^{\otimes 4}$$. Let us say that the first two degrees of freedom represent Alice's states, and the other two Bob's. An initial state that works is one where first and third, and second and fourth qubits are maximally entangled, that is $$\langle i,j,k,\ell|\Psi\rangle = \frac12 \delta_{i k}\delta_{j\ell}.$$

2. There are three possible choices of measurements, $$j=1,2,3$$. All measurements are projective, with four possible outcomes. The choices for Alice are:

1. If $$j=1$$, both qubits are measured in the $$Z$$ eigenbasis. The four possible outcomes are thus $$\{|0,0\rangle,|0,1\rangle, |1,0\rangle,|1,1\rangle\}.$$
2. If $$j=2$$, both qubits are measured in the $$X$$ eigenbasis. The four possible outcomes are thus $$\{|+,+\rangle,|+,-\rangle, |-,+\rangle,|-,-\rangle\}.$$
3. If $$j=3$$, the qubits are measured in an entangled basis, whose four possible outcomes correspond to the states: $$\{|0,+\rangle + |1,-\rangle, |0,+\rangle - |1,-\rangle,|0,-\rangle + |1,+\rangle, |0,-\rangle - |1,+\rangle\}.$$ Bob's choices are similar, modulo a local operation applied to one of the qubits.

Note that this is just another way to write the different choices of observables. Each choice of observable amounts to attaching a $$\pm1$$ sign to different pairs of outcomes, in each measurement basis.

### Correlation between the answers

The trick to understand how Alice's and Bob's answers are correlated is in their sharing maximally entangled states. A maximally entangled state has a specific kind of symmetry: if $$|\Psi\rangle\in\mathbb C^d\otimes\mathbb C^d$$ is maximally entangled and $$U\in\mathrm U(\mathbb C^d)$$ is an arbitrary unitary operation, then $$(U\otimes \bar U)|\Psi\rangle = |\Psi\rangle.$$ In particular, this means that for two-qubit states one can write $$|\Psi\rangle = \frac{1}{\sqrt2}(|00\rangle+|11\rangle) = \frac{1}{\sqrt2}(|++\rangle+|--\rangle) = \frac1{\sqrt2}\sum_{i=1}^2 |u_i,u_i\rangle,$$ for any choice of orthonormal basis $$\{|u_1\rangle,|u_2\rangle\}$$. Consequently, if say Alice measures both her qubits in the $$Z$$ or $$X$$ basis, and finds the outcomes $$(p,q)$$ then Bob's post-measurement state will always be $$|p,q\rangle$$. Thus, provided Bob also measures in the same basis as Alice, their outcomes will be fully correlated. The same holds for the third entangled basis, albeit I haven't found a straightforward way to show it that doesn't involve just doing the calculation.

The statement about agreeing answers on intersections is actually more general than this: we are saying that even if they use different measurement choices, the "outcomes at the intersections" agree. These outcomes correspond to different ways to attach $$\pm1$$ signs to the measurement outcomes. It's probably easier to show what I mean with a few examples:

1. Say Alice measures in the $$ZZ$$ basis ($$j=1)$$, and finds the outcome $$|0,0\rangle$$. Bob's state is thus also $$|0,0\rangle$$. Suppose, however, Bob measures in the $$XZ$$ basis (his version of $$j=1$$). He can thus get as outcome either $$|+,0\rangle$$ or $$|-,0\rangle$$, with balanced probabilities. Observe that both Alice assigns the number $$+1$$ to the outcome $$|0,0\rangle$$, and Bob assign the number $$+1$$ to either of the outcomes $$|\pm,0\rangle$$, hence they agree.

2. Suppose Alice measures in the $$j=3$$ entangled basis, and gets the outcome $$|0,+\rangle+|1,-\rangle$$. Bob's state will then also be the same. To verify agreeing answers, you now have to find the possible outcomes of Bob's $$j=3$$ measurement, and then verify that the corresponding observables always produce the same answers.