Cloud Quantum Coin-Tossing Gambling

Quantum computers are an alternative way to create multipartite probabilities for a game as a function of participant’s inputs. In some situations, quantum gambling could be an improvement over the predictability of certain types of random number generators. However, NISQ computers require a protocol whose expected statistical gains (losses) can be confirmed empirically given the participants’ inputs. A zero-sum coin-tossing protocol with Nash equilibrium [1] is tested with a quantum computer where hypothetical players enter parameters, in their respective qubits, and are compensated 1 or R coin(s) after each outcome. In theory, independently of R, the protocol implies that there is no gain improvement for a player when the other maintains the equilibrium parameter; gain is zero or better for the player maintaining it. However, outcomes obtained with several setting combinations imply Nash equilibrium only when R is a small fraction. For R ≫ 1 , given thousands of outcomes, there is Nash-like equilibrium such that a player may not improve gain significantly by changing the parameter if the other maintains it, that is, losses (gains) are considerably minimized with the parameter. The data suggests that gains (losses) would be expected statistical functions of the participants’ choices if two played in this manner.


Introduction
Given the availability of quantum computers through the cloud and their current development, there are tasks that are realizable with a few qubits, such as generating multipartite probabilities as a function of remote inputs.Such a task is the case in quantum gambling protocols [2], [3], [4].A gambling protocol with a quantum computer provides essentially probabilistic outcomes as a function of the parameters entered by participants.
Certainly, quantum gambling can be an alternative to other types of RNGs [5], [6], [7] needed to create multipartite probabilities, and perhaps be an improvement over the predictability of those other types in some situations [8], [9], [10], [11].On the other hand, games with NISQ computers require evaluation from the participants."Errors" in the output are expected [12].External factors can influence outcomes significantly [13].
Theoretical probabilities do not inform the number of repetitions required to verify them.
In this way, players must be able to confirm that the gains (losses) result significantly from expected probabilities defined by the player's choices.
The protocol presented is a variant of two-player coin tossing quantum gambling [14], [15] with Nash equilibrium [1] adapted to a cloud IBM superconducting quantum computer [16] where each participant could operate on one qubit of a two-qubit entanglement.Such a protocol could be realized with actual remote players operating on two qubits.In the present version of the game, the input of both players is required, measurements of the qubits are not performed at the same time, as shown in Fig. 1, and there are Nash equilibrium parameters, selected independently by each player, for which there is zero average gain per game (which will be referred simply as "gain"), or it may be improved, for the one that maintains the corresponding parameter regardless of what the other does, that is, there is no gain improvement for a player if the other is maintaining it.As shown in Fig. 1, The protocol is as follows: player-q[0] "splits" |1⟩ [0] , concealing parameter α.Then, Player-q[1] also "splits" qubit |0⟩  [1] into two parts, also maintaining the parameter unknown to the other, creating |1⟩  [1] , but only with and the first measurement is on  [1].The rules for the game are as follow: 1) If the outcome is |1⟩  [1] , then player-q[1] receives one coin, 2) if not, the state of [0] is projected on a verification state | + ()⟩ where  is always decided by the two players before starting the game.If the state is verified, then playerq[0] receives R coin(s) ( > 0); otherwise, player-q[1] receives them.

Quantum Computer game protocol
Figure 1.First, the parameter for  is entered on q[0] by one player; then the other enters  on q [1].Both parameters lead to y-rotations.An entanglement is formed in such a way that the tensor product of |0⟩ [0] and |0⟩  [1] form a state, or |1⟩ [0] and the state of q[1] after its rotation.The player of q [1] gets one coin if it is |1⟩  [1] ; otherwise, another y-rotation is applied on q[0] which is now resulting in R coin(s) for the player of q[0]; the latter gives |1⟩ [0] which means that q [1] receives the R coin(s).
Table 1.All possible ways to earn coins for  > 0 within the range shown.Notice that if the player of q[0] selects  = 0, the average loss per game is minimized (to zero) for player-q[0] (and player-q [1]) no matter what the other player selects; the same is true for the player of q [1] when  =  with the additional possibility of earning coins if  ≠ 0. There is no gain improvement for one player when the other sets the corresponding equilibrium parameter.In this way,  = 0,  = ,  = /2, is a Nash equilibrium point in the given range.Because it is a zerosum game, the equivalent table for the player of q[0] is the negative of each of the gains (losses) for the player of q [1].
In general, both players could follow different strategies to increase the likelihood of earning as many coins as possible, not knowing each other's specific settings.The strategy for player-q[0] is not only to diminish the likelihood of |1⟩ [0] , (to make sure the other does not get one coin) but also not to create a state that cannot be verified.For player-q[1], the goal is to "split" the state  [1] enough to increase the likelihood of |1⟩  [1] , but not so much that it allows the other player to verify the remaining state of [0] if |1⟩  [1] does not take place.On the other hand, there is Nash equilibrium when  =  2 ,  = 0,  = , within the range shown in Table 1.If player-q[0] changes ′, either positively or negatively, there is gain for player-q [1] if  = .If player-q[0] does not change the parameter, but the other does, the game remains zero-gains for both players.
Thus, there is no gain improvement for the player that changes the parameter if the other does not.It is important to mention that no actual remote players were used to gather data; however, all data was acquired with an IBM superconducting quantum computer in the cloud.The circuit for the protocol is shown in fig. 2. Each program run determines the hypothetical player that earns coins in one "shot"; however, also thousands of continuous "shots" were obtained in one program run, repeated three times, to calculate the average and standard deviation.

Table for the average gains per game for the player of q
The results coincide with the theoretical Nash equilibrium for 0 <  ≪ 1, and with the theoretical maximum gains (losses) when  ≫ 1, after thousands of outcomes with a specific set of discrete parameters within the range of Table 1.Nevertheless, based on additional results, such a Nash equilibrium probably could also be confirmed with at least 20 repetitions of each setting, also letting  be a small fraction of a coin.For  ≫ 1, given thousands of outcomes, the data suggests that if a player maintains  = 0 or  = , when the other does not, that player considerably minimizes loss, that is, a player cannot guarantee significant gain improvement by changing the parameter when the other does not, implying Nash-like equilibrium.In this manner, all the data implies that the gains (losses) that would result from the implementation of the protocol in the NISQ device with two remote players, with the specific set of discrete parameters, would be considerably expected functions of those parameters decided by the players.
The protocol presented differs from the cryptographic goal of common quantum coin-flipping protocols presented in the literature [17].Originally, quantum coin-tossing was conceived as a solution to a "telephone" coin-toss with distrustful parties [18].Sharing quantum information back and forth between the parties is a solution to the quandary and there have been demonstrations of such [19].In contrast, the protocol presented in this paper requires a trustful connection to a quantum computer if two played in the cloud.Our protocol is a different paradigm that suggests to use the quantum computer as a true source of entropy as an alternate to other forms of generating multipartite probabilities rather than a secure cryptographic exchange between two parties, although a known cryptographic protocol is being tested.

Research Methodology
To initiate a game, two players decide , such that  > 0, and impose a rotation parameter to define a verification state; then, they make concealed y-rotations on their respective qubits and perform measurements to determine the one that earns coins.The matrix representation for the y-rotation is, which can be written, such that in the z-basis {|0⟩ , |1⟩}, and both eq.( 4) and ( 5) will be projected on the state of [0] so that its measurement reveals whether it ends up in ⟨ + ()| (verification state) or ⟨ − ()| (non-verification state).
As stated in the previous section, ′ =  2 , ′ = 0, ′ =  is a Nash equilibrium point.If   [1] and  [0] are the average gain (or loss) per round of the game for Playerq [1] and Player-q[0] respectively, then thus, calculating the optimal gain for one of the players implies necessarily the loss for the other.In particular, where  1 is the probability that  [1] is in state |1⟩  [1] ,  2 the probability that |  ⟩ [0] is not verified, and  3 that it is verified.Eq. ( 9) can be used to write the expression for  [0] .
The probabilities satisfy the condition Consequently, if  [1] is not in state |1⟩  [1] there is the possibility that |  ⟩ [0] will be verified, or not, such that From eq. ( 10), ( 11), (12), and ( 13) follows that Explicitly using eq.( 4), ( 7) and ( 8), )) 2 }. ( for follows that   [1] (',  ′ ,  ′ ) = 0; changing either  or  in eq. ( 15) while the other player maintains either  ′ or ' does not improve the average gain per game for any player, as illustrated in Fig. 3 (consistent with Table 1), when Independently of , (',  ′ ,  ′ ) is a Nash equilibrium point within the range of Fig. 3. Now, to assess the quantum computer, data was obtained from "Oslo" with two types of specific choices for each qubit using the circuit shown in Fig.The upper qubit in Fig. 2 is q[0], the one below is q [1].The parameter for the verification (on the right of fig.2).One "shot" was obtained for each setting combination, but the process was repeated twenty times.The possible output after each repetition was [1] ; respectively, each outcome was used to calculate  1 ,  2 , and  3 in eq. ( 10), that is, their frequencies divided by twenty.
The results were compared to eq. ( 15).The probability for the "erroneous" state |0⟩ [0] ⊗ |1⟩  [1] was calculated.In addition, 1000 "shots" for each of the setting combinations were performed in one program run, repeated 3 times, to obtain an average and the standard deviation.
Figure 3.An illustration of Nash equilibrium for  = 3: if the player of q[0] moves through the equilibrium point ( = 0,  = ), that is, on the gray-plane and parallel to the -axis, then there is positive gain for the player of q [1].Doing the same along the -axis, does not change the gain or loss for any of the players.Thus, it is a point where there is no improvement in gain for a player when the other keeps the equilibrium parameter constant.The four quadrants surrounding the equilibrium point show that, without knowing the parameter from the other, gains can be either positive or negative.divided by 20.Data was obtained from the circuit in fig. 2 with one "shot" for each run of the program but repeated 20 times.This is how the outcomes for an actual game are obtained.

Results and Discussions
Figure1.First, the parameter for  is entered on q[0] by one player; then the other enters  on q[1].Both parameters lead to y-rotations.An entanglement is formed in such a way that the tensor product of |0⟩ [0] and |0⟩ [1] form a state, or |1⟩ [0] and the state of q[1] after its rotation.The player of q[1] gets one coin if it is |1⟩ [1] ; otherwise, another y-rotation is applied on q[0] which is now|  ⟩ [0].The operation is equivalent to projecting |  ⟩ [0] on ⟨ + ()| or ⟨ − ()|.The former gives |0⟩ [0] ,resulting in R coin(s) for the player of q[0]; the latter gives |1⟩ [0] which means that q[1] receives the R coin(s).

2 . 3 ,
In the type-/3 games, the choices for the hypothetical player operating [0] are { []  for 20 program runs of one "shot" in each one for ′ = ] for 20 program runs of one "shot" in each one for ′ = /

Table 2 ,
3 and 4 below summarize all the results.The first two present the measured gains (losses) for the two types of games.The last one presents theoretical calculations and the "erroneous" state probability.

Table 2 .
[1](, , ) =  1 + ( 2 −  3 ), where  1 ,  2 , and  3 are the average probabilities obtained from the circuit in fig.2with three repetitions of 1000 "shots" each one.The standard deviations of each average were used to estimate the measurement errors.In this way, those thousands of "shots" were obtained continuously in one program run rather than one in each program run as it would be in a game.