Playing the CHSH game

Submitted by Anonymous (not verified) on Thu, 12/08/2022 - 13:52

The Clauser-Horne-Shimony-Holt game is the simplest scenario in which the use of nonlocal no-signaling resources can be understood. In fact it is a game that is behind the classic Clauser-Horne-Shimony-Holt (CHSH) inequality that is famous for having a quantum violation. The game is also mentioned on the Wikipedia page of the celebrated inequality, and in many other works.

In the following we introduce the game, which is a very simple one. Then we illustrate, using our no-signaling box emulator, how a no-signaling resource can help the players to play the game with a higher reward, while still not being able to communicate. We will use a Popescu-Rorhlich (PR) box, which is a supra-quantum no-signaling resource, that is, it cannot be implemented physically. Nevertheless, as it is no-signaling, we can emulate it, and its behavior is easier to understand than the Bell-CHSH quantum experiment; it is possible even without any knowledge about quantum mechanics.

So if you read this blog carefully, you will understand what non-signaling correlations mean and in what situations they can be useful. Also, you will gain insight into the Bell-CHSH experiment, and into the notion of quantum nonlocality thereby. All this will be very simple, especially if you team up with someone and perform the described experiments.

 

The game

The two players, Alice and Bob are separated and are not allowed to communicate. Each turn of the game goes as follows:

  1. Alice randomly chooses an input x which is 0 or 1., while Bob randomly chooses an input y which is 0 or 1. (Importantly, they have to be really honest about choosing these with a uniform distribution. Alternatively they can be provided these inputs by a trusted source.)
  2. Alice says an output a, Bob says an output b.

The turn is evaluated as follows:

  • if both of them chose 1 as input (x=y=1),

their outputs should be opposite, i.e. a=1, b=0 or a=0, b=1

  • if any of them had 0 as an input, the outputs should be the same

How to play this game?

  1. Create a pair of game sheets, one for your partner, one for yourself, like this:
turn My input Partner's input (guess) Partner's choice (guess) My choice Partner's input (real) Partner's choice (real) Reward
1              
2              
             

 

The number of turns can be arbitrary, at least 10 of them will make the experiment convincing.

  1. Move to separate rooms. Until otherwise indicated, both of you have to do the same steps, and communication is prohibited.
  2. Pick a fair coin and fill in the "My input" field for each turn, by tossing it again and again. Let heads be 0, tails be 1.
  3. Try to guess the partner's input and the partner's choice. This is a bit awkward as you cannot communicate, so it is impossible to do it well. In spite of this, say something.
  4. Now make your own choices, 0 or 1 in the "My choice" field. Recall that if both of you have 1 as input, you should make an opposite choice, while you should choose the same in all the other 3 cases. This seems to be a mission impossible again as you aren't allowed to communicate. You may try using telepathy, for instance, if you believe in such things…
  5. Come together again with your sheets, and copy the partner's input and choice into each other's sheet.
  6. Now evaluate the reward: if both of you had 1 as input, the reward will be 1 if you had opposite choices. If at least one of you had 0 as input, your choices have to be the same. Otherwise you get a reward of 0. Note: both of you get the same rewared in this game.
  7. Check how many times did each of you manage to find out the other's input.

What would we expect as a result? If there is no telepathy and nobody has cheated, the success in finding out the other's output should be random, i.e. it should succeed roughly in the half of the cases.

Naively, we'd expect that the reward is obtained also in half of the turns. However, if you and your partner are clever, you can do better. You may, for instance, agree in advance that both of you will always choose 0. In this way you can achieve a succes in 75% of the cases on average, without communicating. But it can actually be proven that this is the best, whatever you agree in advance, whatever randomized strategy you use. You cannot beat this 75% limit without breaking the rules, or, as we shall see, use some tricky device. This limitation is in fact equivalent to the celebrated Bell-Clauser-Horne-Shimony-Holt inequaltiy; the first statement proposed in terms of measurable numbers to verify the existence of nonlocal phenomena in Quantum Mechanics.

 


The help of a PR box

What if now Alice and Bob have an access to a tricky device: a pair of boxes. Both of them can enter their inputs (i.e. the result of their local coin toss) to the box, and the box will recommend them a choice.

In the particular game, the so-called Popescu-Rohrlich (PR) box would be the most useful for them. This box recommends the same random choice to both players if none of them had 1 as an input, and the opposite random choice if they both had 1. Mathematically, the operation of such a box can be characterized by a conditional probablility distribution tabulated below. (If you are not familiar with these mathematical concepts, you may safely skip this part.)

x->   0          1  
y a ->    0      1 0  1
  b        
0      0 1/2   1/2  
  1   1/2   1/2
1 0 1/2           1/2
  0   1/2 1/2  

 

Observe that if the parties accept the boxes recommendation, they can succeed in all cases. And the PR box has another interesting feature: Alice and Bob cannot communicate by using the box. It can be mathematically proven, but it is also clear intuitively. They do not know the other's input, and viewed from the point of view of one of them, the recommendation (the boxes' answer) is just random, too. This is what is called the no-signaling property, and the Wigner no-signaling box API is capable of implementing such correlations. Let's see how it works.

 

Give the actual PR box a try

Let's now play the game with your partner. Use the game sheet as before. In additon, both of you should register for the API. Upon registration each of you will receive a code of 32 characters which is confidential. We will refer to these as $ALICE_KEY and $BOB_KEY in what follows.

The game is to be played this way:

  1. Invite your partner

    The one who invites will be "Alice", the other will be "Bob" So Alice should open this URL (either with a usual web browser like Firefox, or with some utility to perform a GET request; see the integrations page):

    https://nonlocalbox.wigner.hu/api/v1/invitePartner?apiKey=$ALICE_KEY&boxTypeID=1&inviteUserName=bob&boxName=ourPRbox
    

    Replace here $ALICE_KEY with the API key of the user plaing the role of Alice, and bob with the username of the partner whom to invite; he'll play the role of Bob. boxTypeID=1 stands for the standard Popescu-Rohrlich box, whereas our box will have a name, ourPRbox to help us remember.

    The reply should be:

    {"boxID":4,"status":0}
    

    Note: web browsers may present this in a less technical way. But the key point is: we have a box, in the present example its ID number is 4 (yours will be of course different). The "status" of 0, like in the case of all the other calls in what follows, reflects that everything went fine. So the box is ready to use.

  2. Agree on some details

    Note that the API cannot be used for communication, so you and your partner should agree on some points. For instance, the user playing Bob will not be informed by any means about being invited: this would be a way to communicate. So Alice should let Bob know the box ID (4 in our case).

    In addition there should be an agreement on how you identify the turns of the game. The API allows for numerical "transaction ID"-s to be used for each box. A reasonable agreement could be to take the date, e.g. 20220914, followed by an ordinal number of your experiments (or the time of day when you start the game), 2 digits, zero padded, e.g. 01, and finally the actual turn in the current game, say, 2 digits, zero padded. So a typical "transactionID" will be 202209140142, this is the 42th input-output pair of the first experiment. But you may follow any convention as long as it serves its goal of identifying the (a,b,x,y) tuples. A tip: you may use the "transactionID" instead of the "turn" in the game sheets; it should be written to the game sheet in advance.

  3. Play

    To play, separate from each other and exclude any communication but the API calls. Use the same game sheet as before.

    On both sides, a single turn, i.e. for a given transaction ID already in the sheet, looks as follows.

    • Choose your input (Alice: x, Bob: y). The best to do it is to use a fair coin like before. Write it to the right place in the sheet.
    • Now use the box. This is done on Alice's side like this:
    https://nonlocalbox.wigner.hu/api/v1/useBox?apiKey=$ALICE_KEY&boxID=4&transactionID=202209140101&x=1
    

    (remember to replace $ALICE_KEY with the actual key), resulting in something like

    {"a":0,"boxID":4,"status":0}
    

    The input was x=1, and the box said a=0 (yours may be different in this case as this is random). So your choice can safely be a=0 in the game sheet. Bob does the same thing like this:

    https://nonlocalbox.wigner.hu/api/v1/useBox?apiKey=$BOB_KEY&boxID=4&transactionID=202209140101&y=0
    

    resulting in something like:

    {"b":0,"boxID":4,"status":0}
    

    Bob's input was 0, and the choice recommended by the box was b=0 in this case; let Bob accept this choice and write it to the game sheet. Finally both parties should try guessing the other's input and choice, and write it to the game sheet.

  4. Evaluate

    Having played the desired number of turns, come together and calculate your payoffs according to the rule (go back here again to recall how). Most probably you will find that

    • You achieved the maximal payoff, ie. you won in each turn, unlike in the case of not having the box at hand.
    • If you really do not communicate, just rely solely on the box, none of you could find out anything about the other's input and choice. Hence, your proportion of successful guesses about the other partners input and choice should not improve significantly compared to the previous case.

    The input was actually the result of independent coin tosses by the separated parties, and the success highly depends on both choices. As for the choices, you may say that the box is not a fair tool and knows everything after all. Yet, as you can probably see, no matter what you do, you cannot find out anything about the other side. So as long as you do not open the box, it coordinates you and your partner without actually enabling you to communicate. Isn't it amazing?

    But do not beleive us. The API is for free. Give it a try yourself.

     

The quantum case

In 1935, Albert Einstein, Boris Podolsky, and Nathan Rosen pointed out certain consequences of quantum theory that relate to separated particles that had interacted before. They found them philosophically interesting, and, in fact, problematic. In 1964, John S. Bell turned these questions into particualr inequalities of certain measurable quantities whose failure necessitates a quantum description. The philosophical problem became a matter of quantum experiments. And indeed, a few years later, in 1969, John F. Clauser, Michael A. Horne, Abner Shimony, and Richard A. Holt proposed a particular experiment. Their proposal involved a version of Bell's inequalities applicable to two-level quantum systems. These are termed as the Bell-CHSH inequalities.

And what are the Bell-CHSH inequalities? As mentioned before, they are just the mathematical form of the limitation on the expected payoff in our game, as we have just discussed it for the case when the parties are allowed to play the game without communication, and possibly using pre-shared information.

What we just have seen using the API and the PR box was the so-called no-signaling violation of the Bell-CHSH inequality. What would we find if we were to use actual quantum systems, like Clauser and his colleagues had proposed? In fact, Alice and Bob would share microscopic particles which interacted before the gameplay, but now they are separated: one is with Alice, one with Bob. However, the earlier interaction left them in a so-called entangled quantum state. If Alice and Bob have well-designed apparata, i.e. boxes, to perform different measurement on such particles, they can use them for the gameplay: the inputs x and y will be measurement settings, and the choices a and b will be measurement outcomes.

Unike in the case of the API, it turns out that Alice and Bob cannot win in all the cases, yet the expected success rate in the game will be beyond the classical limitation. It can be also shown, that the quantum boxes also obey the no-signaling principle. However, unlike the API implementation, in the physical setting there will really not be any communication with a server; the boxes just need to contain well-prepared shared particles that had interacted before. Moreover, the reply of the box will be instantaneous, no matter how far Bob and Alice are from each other. And the last few decades have lead to experiments demonstrating that this is reality; such quantum boxes can be physically implemented with entangled photons. Though Bell's ineqalities play a very important role in the emerging technology of quantum cryptography, such devices cannot yet be purchased to just play around with.

But what can the no-signaling API do for us with this respect? Well, thoguh not instantaneously and via the communication with our server, it can actually emulate the Bell-CHSH boxes. All you need to do is to use boxTypeId=2 when inviting the partner. So you can do your own simulated Bell-experiment with the API: play the game and determine the rate of success. If it is above 75%, you have violated the Bell-CHSH inequality.