18.1 Three-party parity products and compatible operator grids
18.1.1 All-versus-nothing parity predictions on a three-qubit GHZ state
Bell’s inequality exposes the conflict between quantum mechanics and local hidden variables statistically, through correlations bounded by \(2\) versus \(2\sqrt{2}\). In 1989, Greenberger, Horne, and Zeilinger (GHZ) showed that for three entangled particles prepared in the state
the conflict becomes an “all-versus-nothing” parity contradiction at the level of unit-probability predictions (\(+1\) versus \(-1\)) when three distant observers each measure local Pauli operators \(X\) or \(Y\).
18.1.2 Compatible measurement contexts in the Peres–Mermin square
A parallel algebraic contradiction arises for every quantum state of a two-qubit (four-level) system via the Kochen–Specker theorem, streamlined by Asher Peres and N. David Mermin into a \(3\times 3\) grid of two-qubit Pauli observables:
\[\begin{array}{c|ccc|c}
& C_1 & C_2 & C_3 & \text{Row product} \\ \hline
R_1 & X\otimes I & I\otimes X & X\otimes X & +I \\
R_2 & I\otimes Y & Y\otimes I & Y\otimes Y & +I \\
R_3 & X\otimes Y & Y\otimes X & Z\otimes Z & +I \\ \hline
\text{Col.\ product} & +I & +I & -I &
\end{array}\]
The three operators in each row \(R_i\) mutually commute, and the three operators in each column \(C_j\) mutually commute, so each row and each column forms a compatible measurement context that can be measured jointly in a single run.
18.1.3 Comparing spatially separated locality tests with noncontextuality tests
In a three-party GHZ experiment, the compatibility of the three local Pauli measurements in contexts such as \(X_1 Y_2 Y_3\) is justified physically by spatial separation (locality): measuring \(Y_2\) at station 2 cannot disturb the outcome of \(X_1\) at station 1. In a single-system or co-located Peres–Mermin square experiment, the assumption tested is noncontextuality: that a sharp observable \(A\) possesses a predetermined outcome \(v(A) \in \{+1, -1\}\) that is the same whether \(A\) is measured alongside commuting partner \(B\) (say, along a row) or alongside a different commuting partner \(C\) (along a column), where \([B, C] \neq 0\).
Visual animation · Section 18.1
Three-party parity products and compatible operator grids
Interactive visual model for 18.1 Three-party parity products and compatible operator grids (All-versus-nothing parity predictions on a three-qubit GHZ state · Compatible measurement contexts in the Peres–Mermin square · Comparing spatially separated locality tests with noncontextuality tests). Use Animate or Step to follow the physical state evolution and quantitative predictions.
18.2 Sign parity contradictions in GHZ and Peres–Mermin tables
18.2.1 Multiplying four three-party Pauli expectations on the GHZ state
Using \(X|0\rangle = |1\rangle\), \(X|1\rangle = |0\rangle\), \(Y|0\rangle = i|1\rangle\), and \(Y|1\rangle = -i|0\rangle\), the state \(|\mathrm{GHZ}\rangle = (|000\rangle + |111\rangle)/\sqrt{2}\) is a simultaneous eigenstate of the four commuting three-qubit operators
Now suppose a local deterministic instruction set assigns six numbers \(x_k, y_k \in \{+1, -1\}\) (\(k = 1,2,3\)) to the six local observables before the settings are chosen. To reproduce the first three quantum eigenvalue equations, those numbers must satisfy \(x_1 y_2 y_3 = -1\), \(y_1 x_2 y_3 = -1\), and \(y_1 y_2 x_3 = -1\). Multiplying these three scalar equations together yields
since \(y_k^2 = +1\). Every local deterministic assignment therefore predicts \(x_1 x_2 x_3 = -1\), in flat contradiction with the quantum prediction \(\langle X_1 X_2 X_3\rangle = +1\).
18.2.2 State-independent row and column operator products in the square
In the Peres–Mermin \(3\times 3\) square, the operator product along every row \(R_1, R_2, R_3\) and along the first two columns \(C_1, C_2\) equals \(+I\otimes I\). In the third column \(C_3\), however, multiplying \((X\otimes X)(Y\otimes Y) = (XY)\otimes(XY) = (iZ)\otimes(iZ) = -Z\otimes Z\) gives the three-operator product
Notice that this \(-I\) product is an operator identity that holds for every two-qubit state \(|\psi\rangle\) or \(\rho\), whether entangled or separable.
18.2.3 Why noncontextual value assignments fail parity accounting
If a noncontextual hidden-variable model assigns a single context-independent value \(v(O_{ij}) \in \{+1, -1\}\) to each of the nine entries \(O_{ij}\) of the Peres–Mermin square, the product of all nine values computed row by row must equal the product computed column by column. Yet the three row products require \(\prod_{i,j} v(O_{ij}) = (+1)(+1)(+1) = +1\), while the three column products require \(\prod_{i,j} v(O_{ij}) = (+1)(+1)(-1) = -1\). Because each entry \(O_{ij}\) appears once in the row product and once in the column product, no noncontextual \(\{\pm 1\}\) table can satisfy all six context rules simultaneously.
Visual animation · Section 18.2
Sign parity contradictions in GHZ and Peres–Mermin tables
Interactive visual model for 18.2 Sign parity contradictions in GHZ and Peres–Mermin tables (Multiplying four three-party Pauli expectations on the GHZ state · State-independent row and column operator products in the square · Why noncontextual value assignments fail parity accounting). Use Animate or Step to follow the physical state evolution and quantitative predictions.
18.3 Mermin inequalities and operational context independence
18.3.1 Converting ideal parity contradictions into noise-tolerant inequalities
Real experiments never achieve unit fidelity \(F = 1\), so experimental tests convert the GHZ and Peres–Mermin parity identities into linear inequalities that tolerate finite noise. For the three-qubit GHZ state, the Mermin witness operator
is bounded in any local hidden-variable model by \(|\langle\hat{\mathcal{M}}\rangle_{\mathrm{LHV}}| \le 2\), because for any \(\{x_k, y_k\} \in \{\pm 1\}^6\) the product of the four terms is \(-(x_1 x_2 x_3)^2(y_1 y_2 y_3)^2 = -1\), so three terms carry one sign and the fourth carries the opposite sign. Quantum mechanics achieves \(\langle\mathrm{GHZ}|\hat{\mathcal{M}}|\mathrm{GHZ}\rangle = 1 - (-1) - (-1) - (-1) = 4\), double the classical ceiling. Similarly, for the Peres–Mermin square, the six-context witness
satisfies \(\mathcal{K}_{\mathrm{NCHV}} \le 4\) for every noncontextual value assignment (at least one of the six contexts must fail), whereas quantum mechanics predicts \(\mathcal{K}_Q = 6\) for every two-qubit input state.
18.3.2 Testing compatibility and non-disturbance in sequential measurements
In a sequential Peres–Mermin experiment on trapped ions, photons, or superconducting qubits, each context (such as \(R_1 = \{X\otimes I, I\otimes X, X\otimes X\}\)) is measured by performing three nondestructive parity measurements in sequence. If an imperfect measurement of \(X\otimes I\) physically disturbs the subsequent measurement of \(X\otimes X\) differently than \(Y\otimes Y\) does in column \(C_3\), a classical model with context-dependent disturbance could mimic \(\mathcal{K} > 4\). Operational contextuality tests therefore measure marginal non-disturbance directly across context permutations and subtract or bound any measured signalling/disturbance terms from the classical threshold.
18.3.3 Consistent quantum context predictions versus global value tables
Quantum mechanics avoids the parity contradiction because operators in different contexts do not commute—for instance, \([X_1 Y_2 Y_3, Y_1 X_2 Y_3] = 0\) globally, but the local single-qubit factors \(X_1\) and \(Y_1\) anticommute (\(X_1 Y_1 = -Y_1 X_1\)). Quantum theory defines joint probability distributions only within each commuting context, never over all noncommuting observables simultaneously.
Visual animation · Section 18.3
Mermin inequalities and operational context independence
Interactive visual model for 18.3 Mermin inequalities and operational context independence (Converting ideal parity contradictions into noise-tolerant inequalities · Testing compatibility and non-disturbance in sequential measurements · Consistent quantum context predictions versus global value tables). Use Animate or Step to follow the physical state evolution and quantitative predictions.
Explore the Apparatus
Inspect the three-qubit GHZ parity contexts and the \(3\times 3\) Peres–Mermin operator square side by side. Try toggling any classical pre-assigned \(\pm 1\) value table and observe how fixing five contexts automatically forces a parity mismatch on the sixth, while the quantum expectations achieve \(\langle\hat{\mathcal{M}}\rangle = 4\,V\) and \(\mathcal{K}_Q = 6\,V\) as a function of experimental visibility \(V\).
Interactive model · Idealized predictions
Follow the product constraints
On a small screen, swipe the diagram to inspect its components. Moving marks illustrate the model; they are not measured trajectories.
Read the values as a table
Can every possible measurement have a context-independent value? The text and worked examples remain available without JavaScript. Animation starts only when requested; Step gives a motion-free way to follow the model.
Worked Check
Problem: A three-qubit processor prepares a noisy GHZ state \(\rho_p = p|\mathrm{GHZ}\rangle\langle\mathrm{GHZ}| + \frac{1-p}{8}I_8\) mixed with white noise. Find the expectation value of the Mermin operator \(\langle\hat{\mathcal{M}}\rangle = \mathrm{Tr}(\rho_p\hat{\mathcal{M}})\) as a function of \(p\), the minimum state fidelity \(F = \langle\mathrm{GHZ}|\rho_p|\mathrm{GHZ}\rangle\) required to violate the local hidden-variable bound \(|\langle\hat{\mathcal{M}}\rangle| \le 2\), and the value of \(\langle\hat{\mathcal{M}}\rangle\) when \(p = 0.78\).
Solution:
1. Because every three-qubit Pauli string in \(\hat{\mathcal{M}}\) is traceless (\(\mathrm{Tr}(I_8\hat{\mathcal{M}}) = 0\)), only the \(|\mathrm{GHZ}\rangle\) component contributes:
3. For \(p = 0.78\), the Mermin witness evaluates to \(\langle\hat{\mathcal{M}}\rangle = 4(0.78) = 3.12 > 2\).
Summary
For the three-qubit Greenberger–Horne–Zeilinger state \(|\mathrm{GHZ}\rangle = (|000\rangle + |111\rangle)/\sqrt{2}\), multiplying the three commuting stabilizers \(X_1Y_2Y_3, Y_1X_2Y_3, Y_1Y_2X_3\) against \(X_1X_2X_3\) yields an algebraic sign contradiction (\(+1 = -1\)) for any noncontextual value assignment.
The Peres–Mermin magic square demonstrates state-independent contextuality on two qubits using nine observables arranged in six commuting rows and columns.
Experimental tests translate ideal deterministic paradoxes into noise-tolerant noncontextuality inequalities that account for finite gate fidelities and imperfect compatibility.
Practice Problems
Problem 18.1: Maximum classical score in the Peres–Mermin game
Verify explicitly that if a classical deterministic model assigns \(v(O_{ij}) = +1\) to every entry of the \(3\times 3\) Peres–Mermin square, five of the six contexts match the quantum product rule and one fails, giving \(\mathcal{K}_{\mathrm{NCHV}} = 4\). Explain why flipping the sign of any single entry \(v(O_{ij}) \mapsto -1\) cannot raise \(\mathcal{K}_{\mathrm{NCHV}}\) above \(4\).
Hint
Each cell \((i,j)\) belongs to exactly one row \(R_i\) and one column \(C_j\).
Solution
With \(v(O_{ij}) = +1\) everywhere, all three row products and all three column products equal \(+1\), so \(R_1, R_2, R_3, C_1, C_2\) each contribute \(+1\) to \(\mathcal{K}\) while \(-C_3\) contributes \(-1\), giving \(\mathcal{K} = 5 - 1 = 4\). Flipping any single cell \(v(O_{ij})\) flips the sign of both its row product \(R_i\) and its column product \(C_j\), changing the number of satisfied contexts by \(0\) or \(-2\), so \(\mathcal{K}_{\mathrm{NCHV}} \le 4\) for all \(2^9 = 512\) tables.
Problem 18.2: Action of \(X_1 Y_2 Y_3\) on \(|\mathrm{GHZ}\rangle\)
Apply the tensor-product operator \(X_1\otimes Y_2\otimes Y_3\) term by term to \(|\mathrm{GHZ}\rangle = (|000\rangle + |111\rangle)/\sqrt{2}\) using \(Y|0\rangle = i|1\rangle\) and \(Y|1\rangle = -i|0\rangle\) to show that the eigenvalue is \(-1\).
Hint
Keep track of the factor \(i^2 = -1\) from the two \(Y\) operators acting on \(|00\rangle\) and \((-i)^2 = -1\) acting on \(|11\rangle\).
Solution
On the first branch, \((X\otimes Y\otimes Y)|000\rangle = |1\rangle\otimes(i|1\rangle)\otimes(i|1\rangle) = i^2|111\rangle = -|111\rangle\). On the second branch, \((X\otimes Y\otimes Y)|111\rangle = |0\rangle\otimes(-i|0\rangle)\otimes(-i|0\rangle) = (-i)^2|000\rangle = -|000\rangle\). Adding both branches gives \(X_1 Y_2 Y_3|\mathrm{GHZ}\rangle = -|\mathrm{GHZ}\rangle\).
Problem 18.3: Peres–Mermin witness on the maximally mixed state
Evaluate the quantum expectation value of the Peres–Mermin witness \(\hat{\mathcal{K}} = R_1 + R_2 + R_3 + C_1 + C_2 - C_3\) on the four-dimensional maximally mixed two-qubit state \(\rho = \frac{1}{4}(I\otimes I)\), assuming ideal compatible sequential measurements.
Because each row and column operator product simplifies to \(\pm I\otimes I\) at the operator level, \(\hat{\mathcal{K}} = 5(I\otimes I) - (-I\otimes I) = 6(I\otimes I)\). Therefore \(\mathrm{Tr}(\rho\hat{\mathcal{K}}) = 6\,\mathrm{Tr}(\rho) = 6\) even for the completely unentangled maximally mixed state \(\rho = \frac{1}{4}I_4\), demonstrating state-independent quantum contextuality.
Key Takeaways
The three-qubit GHZ state \((|000\rangle + |111\rangle)/\sqrt{2}\) produces a sign contradiction between the quantum eigenvalue \(X_1 X_2 X_3 = +1\) and the product \(-1\) forced by any local hidden-variable assignment satisfying \(X_1 Y_2 Y_3 = Y_1 X_2 Y_3 = Y_1 Y_2 X_3 = -1\).
The Peres–Mermin \(3\times 3\) Pauli square demonstrates state-independent Kochen–Specker contextuality: row products multiply to \(+I\) while column products multiply to \(-I\), ruling out noncontextual \(\pm 1\) value tables for every two-qubit state.
Sequential contextuality tests must verify operational non-disturbance across compatible measurements so that context-dependent apparatus crosstalk does not mimic a violation.
Sources and Further Reading
D. M. Greenberger, M. A. Horne, A. Shimony, and A. Zeilinger, Bell’s theorem without inequalities, American Journal of Physics 58, 1131 (1990).