A referee sends some random classical bits to some players (0 and 1 only) and they should report back some bits (01 and 1 only). Let’s denote referee’s bits by . and what players report by . Before the game, players can discuss and come up with a strategy on how to report, but during the game they cannot communicate. They win if what they report follows a logical condition. For example with 2-players, one winning condition (as in CHSH game) can be with ∧ the logical “and” and ⊻ the local “xor” operations. This game can be extended into many players by using smart choice of logical conditions. It can be shown that by using maximally entangled quantum states, the chance of winning can exceed the best classical strategy (from 75% in classical cases to 85% in quantum cases).
This work is based on the arXiv preprint: Hamza Jaffali, Frédéric Holweck (2023), Two new non-equivalent three-qubit CHSH games, arXiv:2312.00578. https://doi.org/10.48550/arXiv.2312.00578
Special thanks to Michael Trott for suggesting this, also Wolfram quantum team who helped with implementation.
{x,y,z,…}
{a,b,c,…}
x∧y=a⊻b
This work is based on the arXiv preprint: Hamza Jaffali, Frédéric Holweck (2023), Two new non-equivalent three-qubit CHSH games, arXiv:2312.00578. https://doi.org/10.48550/arXiv.2312.00578
Special thanks to Michael Trott for suggesting this, also Wolfram quantum team who helped with implementation.
Everything in these games can be directly implemented in a quantum circuit. For example, referee can send states to players and they measure only in the computational basis, so randomly they will observer 0 or 1. So although referee sends a quantum state, for the sake of this game, players treat it as a source of random 0 and 1. It adds more fun into the game too, because in this case, even referee (God?) does not know what being sent to each player before measuring (do not over-think this, fundamentally interesting, but not important for the sake of this game).
|〉
x
+
Each player can do a series of local operations. The quantum strategy is like this: in addition to a qubit being sent by the referee, each player gets another qubit from a common source. The only special thing about the source is that it can prepare entangled states; and of course the essence of the game is here: players can beat the best classical strategies if they use entangled states.
Wolfram quantum framework paclet
Wolfram quantum framework paclet
Install Wolfram quantum framework paclet
In[]:=
PacletInstall["https://wolfr.am/DevWQCF",ForceVersionInstall->True]Needs["Wolfram`QuantumFramework`"]
Out[]=
PacletObject
For more info, please read the quantum documentation: https://resources.wolframcloud.com/PacletRepository/resources/Wolfram/QuantumFramework/
Note after installing the paclet, you have the quantum documentation locally, like the rest of built-in functionalities in Mathematica.
Note after installing the paclet, you have the quantum documentation locally, like the rest of built-in functionalities in Mathematica.
Show the matrix form of U gate
In[]:=
QuantumOperator["U"[θ,ϕ,λ]]["Matrix"]//MatrixForm
Out[]//MatrixForm=
Cos θ 2 | - λ θ 2 |
ϕ θ 2 | (λ+ϕ) θ 2 |
Bell (2 players): finding parameters approach
Bell (2 players): finding parameters approach
Create a quantum circuit for 2 - player CHSH
In[]:=
quantumCircuitCHSH2Players=QuantumCircuitOperator[{QuantumState["Bell","Label"->"Bell state"]->{1,3},QuantumState["+"]->{2,4},"C"["U"[θ11,ϕ11,λ11]->{1},{2}],"C"["U"[θ10,ϕ10,λ10]->{1},{},{2}],"C"["U"[θ21,ϕ21,λ21]->{3},{4}],"C"["U"[θ20,ϕ20,λ20]->{3},{},{4}]}];
Show circuit diagram by labeling the wires :
In[]:=
quantumCircuitCHSH2Players["Diagram","WireLabels"{Placed["a",Right],Placed["x",Right],Placed["b",Right],Placed["y",Right]}]
Out[]=
Calculate the probability of outcomes from the quantum circuit for 2 - player CHSH:
In[]:=
probabilityOutcomesCHSH2Players=KeyValueMap[{#1["Name"],#2}&]@quantumCircuitCHSH2Players[]["Probabilities"];
Given the winning strategy, find all winning cases:
In[]:=
winningCasesCHSH2Players=Cases[probabilityOutcomesCHSH2Players,{{a_,x_,b_,y_},p_}/;BitAnd[x,y]==BitXor[a,b]];
Calculate the overall probability of winning:
In[]:=
winningProbabilityCHSH2Players=winningCasesCHSH2Players[[All,-1]]//Total;
Given parameters of the quantum circuit for 2 - player CHSH, maximize the winning chance and find numerical values of parameters :
In[]:=
NMaximize[winningProbabilityCHSH2Players,{θ10,ϕ10,λ10,θ11,ϕ11,λ11,θ20,ϕ20,λ20,θ21,ϕ21,λ21}∈Reals]
Out[]=
{0.853553,{θ100.849507,ϕ100.929842,λ100.649258,θ11-0.758048,ϕ111.05206,λ110.269669,θ20-0.198179,ϕ200.554827,λ201.33703,θ211.61736,ϕ21-0.979926,λ21-0.467937}}
As observed, the maximum probability of winning with quantum entangled states exceeds 85%, surpassing the best classical strategy, which has only a 75% chance of success (see the end of this notebook for a discussion on the best classical case).
3-player case using GHZ state
3-player case using GHZ state
Show GHZ state:
In[]:=
QuantumState["GHZ"]
Out[]=
QuantumState
Calculate its entanglement monotone:
In[]:=
QuantumEntanglementMonotone[%]
Out[]=
1
(x∧y∧z)∨(¬x∧¬y∧¬z)=a⊻b⊻c
(x∧y∧z)∨(¬x∧¬y∧¬z)=a⊻b⊻c
Create a CHSH quantum circuit for three players such that each player get a random bit and decide some local operation on a GHZ state to report a value :
In[]:=
quantumCircuitCHSH3Players=QuantumCircuitOperator[{QuantumState["GHZ","Label"->"GHZ"]->{1,3,5},QuantumState["+"]->{2,4,6},"C"["U"[θ10,ϕ10,λ10]->{1},{2}],"C"["U"[θ11,ϕ11,λ11]->{1},{},{2}],"C"["U"[θ20,ϕ20,λ20]->{3},{4}],"C"["U"[θ21,ϕ21,λ21]->{3},{},{4}],"C"["U"[θ30,ϕ30,λ30]->{5},{6}],"C"["U"[θ31,ϕ31,λ31]->{5},{},{6}]}];
Show circuit diagram by labeling the wires too:
In[]:=
quantumCircuitCHSH3Players["Diagram","WireLabels"{Placed["a",Right],Placed["x",Right],Placed["b",Right],Placed["y",Right],Placed["c",Right],Placed["z",Right]},ImageSizeLarge]
Out[]=
Calculate the probability of outcomes from the quantum circuit for 3 - player CHSH:
In[]:=
probabilityOutcomesCHSH3Players=KeyValueMap[{#1["Name"]/.{1->True,0->False},#2}&]@quantumCircuitCHSH3Players[]["Probabilities"];
Given the winning strategy, find all winning cases:
In[]:=
winningCasesCHSH3Players=Cases[probabilityOutcomesCHSH3Players,{{a_,x_,b_,y_,c_,z_},p_}/;Or[And[x,y,z],And[!x,!y,!z]]==Xor[a,b,c]];
Show overall number of winning cases:
In[]:=
winningCasesCHSH3Players//Length
Out[]=
32
Calculate the overall probability of winning:
In[]:=
winningProbabilityCHSH3Players=winningCasesCHSH3Players[[All,-1]]//Total;
Given parameters of the quantum circuit for 2 - player CHSH, maximize the winning chance and find numerical values of parameters:
In[]:=
NMaximize[winningProbabilityCHSH3Players,{θ10,ϕ10,λ10,θ11,ϕ11,λ11,θ20,ϕ20,λ20,θ21,ϕ21,λ21,θ30,ϕ30,λ30,θ31,ϕ31,λ31}∈Reals]
Out[]=
{0.853553,{θ101.5708,ϕ10-1.55281,λ100.588433,θ111.5708,ϕ11-0.514718,λ11-0.982363,θ201.5708,ϕ20-0.473592,λ200.980433,θ211.5708,ϕ21-1.66411,λ21-0.590364,θ30-1.5708,ϕ30-1.21334,λ300.787329,θ31-1.5708,ϕ310.408285,λ31-0.783467}}
paper example (1st table on page 9)
paper example (1st table on page 9)
(x∧y)∨((x⊻y)∧z)=a⊻b⊻c
(x∧y)∨((x⊻y)∧z)=a⊻b⊻c
Create a CHSH quantum circuit for three players such that each player get a random bit and decide some local operation on a GHZ state to report a value :
In[]:=
quantumCircuitCHSH3Players=QuantumCircuitOperator[{QuantumState["GHZ","Label"->"GHZ"]->{1,3,5},QuantumState["+"]->{2,4,6},"C"["U"[θ10,ϕ10,λ10]->{1},{2}],"C"["U"[θ11,ϕ11,λ11]->{1},{},{2}],"C"["U"[θ20,ϕ20,λ20]->{3},{4}],"C"["U"[θ21,ϕ21,λ21]->{3},{},{4}],"C"["U"[θ30,ϕ30,λ30]->{5},{6}],"C"["U"[θ31,ϕ31,λ31]->{5},{},{6}]}];
Show circuit diagram by labeling the wires too:
Calculate the probability of outcomes from the quantum circuit for 3 - player CHSH:
Given the winning strategy, find all winning cases:
Show overall number of winning cases:
Calculate the overall probability of winning:
Given parameters of the quantum circuit for 2 - player CHSH, maximize the winning chance and find numerical values of parameters:
3-player case using W state
3-player case using W state
Show W-state:
Calculate its entanglement monotone:
It is less than 1, which was the case for GHZ state. So one may expect less performance in terms of winning for this state, which is what we will get (77% vs 85% for GHZ).
Create a CHSH quantum circuit for three players such that each player get a random bit and decide some local operation on a GHZ state to report a value :
Show circuit diagram by labeling the wires too:
Calculate the probability of outcomes from the quantum circuit for 3 - player CHSH:
Given the winning strategy, find all winning cases:
Show overall number of winning cases:
Calculate the overall probability of winning:
Given parameters of the quantum circuit for 2 - player CHSH, maximize the winning chance and find numerical values of parameters:
Create a CHSH quantum circuit for three players such that each player get a random bit and decide some local operation on a GHZ state to report a value :
Show circuit diagram by labeling the wires too:
Calculate the probability of outcomes from the quantum circuit for 3 - player CHSH:
Given the winning strategy, find all winning cases:
Show overall number of winning cases:
Calculate the overall probability of winning:
Given parameters of the quantum circuit for 2 - player CHSH, maximize the winning chance and find numerical values of parameters:
[Appendix] classical CHSH: 2-players and best strategy
[Appendix] classical CHSH: 2-players and best strategy
We have discussed the classical strategy for CHSH game elsewhere: https://community.wolfram.com/groups/-/m/t/3026423
Here we provide a quick overview of that, with more pedagogical approach.
Here we provide a quick overview of that, with more pedagogical approach.
Consider the classical operation of a player in the most generic case:
The only condition one can impose is the preservation of probability:
The second case in above formula is not physically acceptable, because it assumes that the player operation depends on given probability. So we will consider only the first case. Based on the first condition, we will construct the classical operation of each player as follows:
For the initial strategy agreed between the players, we will only impose the probability condition (total equal one) but on amplitudes:
Note this is only a classical case so although we calculate it on a circuit, but everything is classical.
Create the circuit:
Show the circuit diagram:
Amplitudes of this circuit are classical probabilities:
Define constraints:
And compute an explicit formula for the winning probability:
Maximizing it numerically shows that classical strategy can never exceed 75% chance of winning:
Which can also be achieved simply by zeroing every variable we’ve introduced:
This corresponds to a trivial strategy when both players always report the same.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Quantum Games: multi-player CHSH game
by Mohammad Bahrami
Wolfram Community, STAFF PICKS, February 11, 2025
https://community.wolfram.com/groups/-/m/t/3392237
by Mohammad Bahrami
Wolfram Community, STAFF PICKS, February 11, 2025
https://community.wolfram.com/groups/-/m/t/3392237