Documentation

CslibFrontier.Computability.PCP.TwoProverGame.MagicSquare

The magic square game #

The magic square game in the row–column form of Brassard, Broadbent and Tapp, §5.1–5.3 (arXiv:quant-ph/0407221v3, PDF pp. 21–23): the referee picks a row r and a column c of a 3 × 3 grid uniformly. Alice fills row r with three bits of even parity, Bob fills column c with three bits of odd parity, and they win when they agree on the shared cell (r, c) (Cslib.PCP.TwoProverGame.magicSquare). The square of two-qubit Pauli observables behind it is due to Mermin and Peres, who used it for the contextuality of a single system; Aravind, §2–3 made it a game for two observers who are each asked one of all six lines.

No classical strategy wins with certainty: a grid whose rows have even parity has an even total, and one whose columns have odd parity has an odd total, so every deterministic strategy loses on some question. The classical value is exactly 8/9 (Cslib.PCP.TwoProverGame.value_magicSquare).

Entangled provers win with certainty. An operator solution replaces the bits by ±1 observables: self-adjoint involutions X_{rc} that commute along each row and each column, whose rows multiply to 1 and whose columns multiply to -1. If Bob holds observables Y_{rc} that commute with Alice's and agree with them perfectly in the shared state, X_{rc} ≈ Y_{rc} with error 0, then measuring the rows and columns jointly wins with probability 1 (Cslib.PCP.TwoProverGame.MagicSquareSolution.commutingWinProb_strategy). This holds in every commuting-operator model. It is an algebraic formulation, for this row–column game, of the direction "operator solution ⇒ perfect strategy" that Cleve and Mittal, §2 (arXiv:1209.2729v1, pp. 2–3) prove for constraint–variable games with the finite-dimensional maximally entangled transpose strategy. The two-qubit Pauli square of Mermin and Peres is an operator solution, and two EPR pairs make the agreement perfect, so the entangled value of the magic square is 1 (Cslib.PCP.TwoProverGame.quantumValue_magicSquare).

Main definitions #

Main results #

References #

The parity a₀ ⊕ a₁ ⊕ a₂ of three bits.

The entry i of three bits.

The magic square game: uniform row r and column c; Alice answers a row of even parity and Bob a column of odd parity, and they win when they agree on the cell (r, c).

theorem Cslib.PCP.TwoProverGame.exists_not_accepts_magicSquare (ha hb : Fin 3 → Bool × Bool × Bool) :
∃ (r : Fin 3) (c : Fin 3), ¬magicSquare.accepts r c (ha r) (hb c)

Every deterministic strategy loses on some question: rows of even parity and columns of odd parity cannot agree on all nine cells.

Every deterministic strategy wins the magic square with probability at most 8/9.

A deterministic strategy that loses only on the cell (2, 2).

The classical value of the magic square is at most 8/9.

The classical value of the magic square is 8/9.

Operator solutions #

theorem Cslib.PCP.signProj₃_eq_zero {𝒜 : Type u_1} [Ring 𝒜] [Algebra ℂ 𝒜] {O₀ O₁ O₂ : 𝒜} (h₀ : O₀ * O₀ = 1) (h₁ : O₁ * O₁ = 1) (h₂ : O₂ * O₂ = 1) (c₀₁ : Commute O₀ O₁) (c₀₂ : Commute O₀ O₂) (c₁₂ : Commute O₁ O₂) {t : Bool} (hprod : O₀ * O₁ * O₂ = ↑(BitString.signVal t) • 1) {a : Bool × Bool × Bool} (ha : TwoProverGame.xor₃ a ≠ t) :
Quantum.signProj₃ O₀ O₁ O₂ a = 0

The joint projection onto outcomes whose sign differs from the product of three commuting involutions vanishes: if O₀O₁O₂ = σ_t, then P_{a₀}P_{a₁}P_{a₂} = 0 unless a₀ ⊕ a₁ ⊕ a₂ = t.

structure Cslib.PCP.TwoProverGame.MagicSquareSolution (𝒜 : Type u_1) [Ring 𝒜] [StarRing 𝒜] :
Type u_1

An operator solution of the magic square: ±1 observables commuting along each row and each column, the rows multiplying to 1 and the columns to -1.

  • op : Fin 3 → Fin 3 → 𝒜

    The observable in row r and column c.

  • isSelfAdjoint (r c : Fin 3) : IsSelfAdjoint (self.op r c)
  • mul_self (r c : Fin 3) : self.op r c * self.op r c = 1
  • commute_row (r c c' : Fin 3) : Commute (self.op r c) (self.op r c')
  • commute_col (r r' c : Fin 3) : Commute (self.op r c) (self.op r' c)
  • row_mul (r : Fin 3) : self.op r 0 * self.op r 1 * self.op r 2 = 1
  • col_mul (c : Fin 3) : self.op 0 c * self.op 1 c * self.op 2 c = -1

The joint measurement of the observables of row r.

The joint measurement of the observables of column c.

A row is measured with even parity: the other outcomes have effect 0.

A column is measured with odd parity: the other outcomes have effect 0.

noncomputable def Cslib.PCP.TwoProverGame.MagicSquareSolution.strategy {𝒜 : Type u_1} [Ring 𝒜] [StarRing 𝒜] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [Algebra ℂ 𝒜] [StarModule ℂ 𝒜] (X Y : MagicSquareSolution 𝒜) (φ : Quantum.AlgState 𝒜) (hXY : ∀ (r c r' c' : Fin 3), Commute (X.op r c) (Y.op r' c')) :

The commuting-operator strategy of two operator solutions: Alice measures the rows of X, Bob the columns of Y, in the state φ; Alice's observables commute with Bob's.

theorem Cslib.PCP.TwoProverGame.MagicSquareSolution.apply_mul_signProj₃_eq {𝒜 : Type u_1} [Ring 𝒜] [StarRing 𝒜] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [Algebra ℂ 𝒜] [StarModule ℂ 𝒜] [SelfAdjointDecompose 𝒜] (φ : Quantum.AlgState 𝒜) {Xc Yc : Fin 3 → 𝒜} (h : ∀ (i : Fin 3), φ.Approx 0 (Xc i) (Yc i)) (hc : ∀ (i j : Fin 3), Commute (Yc i) (Xc j)) (E : 𝒜) (b : Bool × Bool × Bool) :
φ (E * Quantum.signProj₃ (Yc 0) (Yc 1) (Yc 2) b) = φ (E * (Quantum.signProj (Xc 2) (entry₃ b 2) * Quantum.signProj (Xc 1) (entry₃ b 1) * Quantum.signProj (Xc 0) (entry₃ b 0)))

Transfer of a column: if Bob's observables Y_i agree perfectly in the state with Alice's X_i and commute with them, Bob's joint projection can be replaced by Alice's, in reverse order.

theorem Cslib.PCP.TwoProverGame.MagicSquareSolution.apply_effect_mul_effect_eq_zero {𝒜 : Type u_1} [Ring 𝒜] [StarRing 𝒜] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [Algebra ℂ 𝒜] [StarModule ℂ 𝒜] (X : MagicSquareSolution 𝒜) [SelfAdjointDecompose 𝒜] (Y : MagicSquareSolution 𝒜) (φ : Quantum.AlgState 𝒜) (hXY : ∀ (r c r' c' : Fin 3), Commute (X.op r c) (Y.op r' c')) (hagree : ∀ (r c : Fin 3), φ.Approx 0 (X.op r c) (Y.op r c)) {r c : Fin 3} {a b : Bool × Bool × Bool} (hrej : ¬magicSquare.accepts r c a b) :
φ ((X.rowMeasurement r).effect a * (Y.colMeasurement c).effect b) = 0

In the strategy of two perfectly agreeing operator solutions, the answers are rejected with probability 0.

theorem Cslib.PCP.TwoProverGame.MagicSquareSolution.commutingWinProb_strategy {𝒜 : Type u_1} [Ring 𝒜] [StarRing 𝒜] [PartialOrder 𝒜] [StarOrderedRing 𝒜] [Algebra ℂ 𝒜] [StarModule ℂ 𝒜] (X : MagicSquareSolution 𝒜) [SelfAdjointDecompose 𝒜] [TopologicalSpace 𝒜] [ContinuousFunctionalCalculus ℝ 𝒜 IsSelfAdjoint] [NonnegSpectrumClass ℝ 𝒜] (Y : MagicSquareSolution 𝒜) (φ : Quantum.AlgState 𝒜) (hXY : ∀ (r c r' c' : Fin 3), Commute (X.op r c) (Y.op r' c')) (hagree : ∀ (r c : Fin 3), φ.Approx 0 (X.op r c) (Y.op r c)) :

Operator solutions win the magic square with certainty: if Alice measures the rows of an operator solution X and Bob the columns of an operator solution Y, with Alice's observables commuting with Bob's and agreeing with them perfectly in the shared state, they win with probability 1. This generalizes the transpose strategy of Cleve and Mittal, §2 from finite dimensions to any commuting-operator model.

The Pauli square #

The image of an operator solution under a star-algebra homomorphism.

The transpose of an operator solution in a matrix algebra.

The Mermin–Peres square of two-qubit Pauli observables: its rows multiply to 1 and its columns to -1.

The Mermin–Peres square is an operator solution of the magic square.

The perfect strategy for the magic square: Alice and Bob share two EPR pairs, Alice measures the rows of the Mermin–Peres square and Bob the columns of its transpose.

The perfect strategy wins the magic square with certainty.

The entangled value of the magic square is 1: two EPR pairs win with certainty.

Quantum pseudo-telepathy: entanglement wins the magic square with certainty, while every classical strategy loses with probability at least 1/9.