Design of Quantum Circuits to Play Bingo Game in a

0 downloads 0 Views 216KB Size Report
Indian Institute of Science Education and Research Kolkata, Mohanpur 741246, West Bengal, India. Bingo game is one of the most used online games, which is ...
Design of Quantum Circuits to Play Bingo Game in a Quantum Computer Vishwanath Singh,1, ∗ Bikash K. Behera,2, † and Prasanta K. Panigrahi2, ‡ 1 Department of Applied Physics, Indian Institute of Technology (Indian School of Mines), Dhanbad, 826004, Jharkhand, India 2 Department of Physical Sciences, Indian Institute of Science Education and Research Kolkata, Mohanpur 741246, West Bengal, India

Bingo game is one of the most used online games, which is played using classical computers. After realizing the power of quantum computers, researchers have started developing quantum games, which can be played using a quantum computer by designing quantum circuits on it. Though classical computers are good to play the games, quantum computers will always be better for tackling more and more complexity in a game. It is believed that the game can be more efficiently designed on a quantum computer with minimum resource complexity, where more and more strategy-complexity can be introduced in the game and thus can be more interesting and survivable. Here, we present quantum circuits, which can be designed on a quantum computer to play the Bingo game by any two users. We explain the working of the quantum circuits in detail with the rules of the game. It has been shown that, at the end of the game, measurement outcomes of the ancilla qubits can tell which user wins the game. Keywords: Quantum Computation, Bingo Game, Quantum Circuits, Quantum Gates

I.

INTRODUCTION

Quantum game theory is an interesting area in the field of quantum computation to work on due to its profound applications in various disciplinaries such as economy, psychology, biology, ecology, and applied mathematics [1, 2] to name a few. Researchers in the field of quantum computation have taken a surge of interest to develop quantum games using the currently available quantum computers [3]. Leaw and Cheong have developed quantum algorithms to play quantum tic-tac-toe game [4], where players win the game depending upon the quantum advantage. Recently, a hybrid classical-quantum algorithm for solving Sudoku game has been developed by Pal et el. [5]. Quantum Go game has also been introduced by Ranchin [6], where superposition and entanglement have been used to play the game more efficiently. Paul et al. [7] have developed the quantum circuits for playing the quantum Monty Hall game on a quantum computer. A simple shooting game has been designed by Roy et al. [8], which can be played on a quantum computer with the proposed quantum circuits. These previous works motivate us to develop quantum circuits for other games, with the belief that more-complexity can be introduced in the game that can be easily manipulated with the power of quantum computer. Here, in the present work, we develop quantum circuits for Bingo game for playing it on a quantum computer. Two players can play the game on the quantum computer, at the end of the game, the quantum computer can decide which player wins the game after measuring the ancilla qubits. History credits the creation of Bingo to Italy in the

∗ † ‡

[email protected] [email protected] [email protected]

1600’s [9]. During the 14th century, Italians had quickly developed a passion for betting on games of chance. They invented some lottery game from where the Modern Day Bingo originated. The French were the next culture to embrace Bingo as it grew in popularity, then it found its way to Germany, then to United States in the 1900’s [10]. Rather than serving as a source of entertainment, the game was used as an educational tool [11]. By playing the game, children were able to learn spelling, mathematics, and history [10]. One of the reasons why Bingo is such a crowd-pleaser is that it does not require much practice or strategy. The game is based almost entirely on luck, both novices and experts have equal chances of winning. The game of Bingo is a classic source of entertainment. It has traveled the globe for hundreds of years and is played in various different forms across the world with slight variations [13]. Whether a traditional in-person game or the fast-growing craze of online Bingo, it is one of the easiest-to-learn gambling options, only players need a venue, a Bingo card, and a little luck. Bingo is a gambling game [12] based on chances in which two or more players are provided with a Bingo card, on which unique numbers have to be randomly printed by the players at first. For a N × N Bingo card, the maximum number printed on the board can be greater than N 2 , e.g., if we have a 4 × 4 board, then the maximum number can be 16 as well. However, the range of numbers is pre-decided, say 1 to M. Then, the players speak out numbers alternatively in the range 1 to M, both the players search for the numbers in their boards and cross the number at the respective positions. The process of crossing number is repeated by speaking the numbers alternatively by the players. When any of the players will cross a full row or a full column or the diagonal, then the player gets the first Bingo. The game is still continued as the total possible Bingos are N+N+2 for N rows, N columns and 2 diagonals [14]. Among

2 the players, who makes the first N Bingos, is declared as the winner. Using the principle of quantum computation, here we develop quantum circuits for designing the above game. The users will input random numbers and the numbers will be fed into the board at arbitrary positions of the board with the quantum circuits. Then the players speak out the numbers alternatively, then the said numbers will be checked with the existing numbers on the boards, where the numbers will match, the number from the board will be crossed. After certain number of crossing the numbers, the number of Bingos will be counted for both the players. The process will be continued until one wins the game, i.e., one of the players makes N Bingos . Then the quantum computer will declare the player making the N Bingos as the winner. This game is played in various forms across the world, depending upon the form of the game, the quantum circuits can be developed to play it on a quantum computer. Here, we develop quantum circuits for a specific BINGO game in which there are two players each having separate 3 × 3 Bingo cards (Fig. 1), which need to be filled up by 1 to 9 numbers randomly. Two players speak out numbers one by one alternatively, which both the players have to cross-mark in their respective Bingo cards. The quantum circuit is designed in such a way that it will cross mark the said number on both of the Bingo boards which are entangled with each other. Likewise, the numbers will be crossed from the board and after a certain number of minimum calls which are required for any player to win the game (for this case, it is 6), here after 6 times the numbers being said, the circuits are designed which will check whether any board achieves the 3 Bingos just after each call. Ancilla qubits are taken in the quantum circuits whose measurement results reveal the winner or the board that makes the 3 Bingos, i.e., decides the winner. The one who first gets 3 Bingos, wins the game. Similarly a quantum circuit is proposed which will check whether any of the rows, columns or diagonals are completely crossed or not. The rest of the paper is organized as follows. Section II introduces the rules and the strategy of the Bingo game, following which, the quantum circuits are discussed clearly explaining the working of the Bingo game. Finally, we conclude in Section III by discussing future implications and applications of the work.

II.

BINGO GAME: RULES AND STRATEGY

The rules of the game have been listed in the following. • Players are provided with 3 × 3 Bingo cards. • Players are allowed to fill the entries in the cards with the numbers 1 to 9 randomly. • Two players are allowed to speak numbers alternatively one by one.

FIG. 1. A 3 × 3 BINGO Card. As, it can be seen, the numbers 1 to 9 have been randomly printed on the card.

• Once the number is being called both the users have to cross mark that number in their Bingo cards. • The process of calling a number by players is done alternatively between both of them. • To win the game, players have to try to cross mark 3 complete row, column or diagonals as soon as possible. • If a player crosses a complete row or column or diagonal, then he/she will be said to complete/make one Bingo. • The first one, who makes 3 Bingos, wins the game. We consider two Bingo cards each of size 3 × 3 for the two players, where in total 64 qubits (|q1i to |q64i) are required to fill up the boards. The qubits are arranged sequentially, each four qubits represent one number from 1 to 9 at the respective position of the board (See Fig. 1). For example, the first four qubits represent the number on the first position of the board, the next four represent the number on the second position and so on. The quantum states and the corresponding numbers are presented in Table I. Then we take each four qubits for calling the numbers by the players. For each call, four qubits will be used to store the number and compare it with all the numbers on the board sequentially. The quantum circuit given in Fig. 2 is used to compare the called numbers with the existing numbers on the board. It can be observed from the figure that, four qubits |c1i, |c2i, |c3i and |c4i are taken to store the first called number. The qubits, used for called numbers, named as called qubits. Similarly, the qubits used for storing the numbers on the board, called the board qubits. A set of called qubits, |c5i,...,|c8i, |c9i,...,|c12i, |c13i,...,|c16i are taken for inputting the called numbers. Then the numbers are compared with the numbers on the board sequentially.

3 |c1i |c2i |c3i |c4i |q1i

I

I

X

X

X

X

X

X

X

|q2i

X

X

I

I

I

I

X

X

X

|q3i

X

X

I

I

X

X

I

I

X

|q4i

I

X

I

X

I

X

I

X

I

|0i |0i |0i |0i

X

X X

X X

X X

X

|s1i

X

FIG. 2. Quantum circuit comparing and crossing the numbers from the Bingo board. The first four qubits (|c1i, |c2i, |c3i and |c4i) are taken to feed any numbers from 1 to 9 by the user. The next four qubits (|q1i, |q2i, |q3i and |q4i) store the number in the board. As it can be observed, the qubits |c1i and |q1i, |c2i and |q2i, |c3i and |q3i, |c4i and |q4i are compared with the application of controlled-controlled-not and anti-controlled-anti-controlled-not gates. The last four ancilla qubits (stored in |0i states) are used to check the numbers whether they are equal or not. If they are equal, then all the ancilla qubits will be converted to |1i states. If the number matches and then the number on the board will be converted |1111i state, i.e., the information whether the number is crossed from the board, is stored in the last qubit, |s1i state. If the qubit |s1i is stored in the |1i state, then the number from the board is crossed.

To achieve this, the qubit states of |c1i,...,|c4i are compared with the qubit states of |q1i,...,|q4i, |q5i,...,|q8i and |q9i,...,|q12i one by one. When there is a match, i.e., all the corresponding qubit states will be matched, then the number on the board will be crossed, i.e., the qubit states of |q1i,...,|q4i or |q5i,...,|q8i or |q9i,...,|q12i assigned to the corresponding position of the board will be converted to |1111i state. It can be observed from Fig. 2, I/X operations are applied on the qubits |q1i,...,|q4i controlled by the ancilla qubits and the called qubits (c1i,...,c4i). Controlled-controlled-NOT operations and anti-controlled-anti-controlled-NOT operations are applied on the ancilla qubits where the called qubits |c1i,...,|c4i are the first controls and the |q1i,...,|q4i are the second controls respectively. The four ancilla qubits (in |0i states), collects the information whether the called qubits and the respective board qubits are in the same state or not. If all the qubit states match, i.e., the called number matches with the board number, then the state of all four ancilla qubits becomes |1111i state. All the ancilla qubits and the called qubits now being the controls, cross the board number, i.e., the state of the board qubits (|q1i,...,|q4i) becomes |1111i state. Now, there are fourcontrolled-NOT operation from the board qubits to the qubit |s1i, which stores the information about whether the board number is crossed or not. If the board number

is crossed, then the qubit |s1i will be converted to |1i state, otherwise, it remains in |0i state. From the Fig. 3, it is observed that, |s1i to |s9i qubits are taken to represent 9 positions of the board. If any of the board position is changed to |1i state, then it means the number in the corresponding position is crossed. If the qubits are in the |0i state, then it implies the numbers at those positions have not been crossed. Similarly, a set of another 9 qubits can be taken for representing the above same information for another Bingo board. Now, it can be seen that, there are 8 possible combinations where one Bingo can be made, i.e., any row or column or diagonal can have all three numbers crossed. Hence, by applying 8 controlled operations, we can get the information whether any of the players makes the first 3 Bingos. For this, controlled-controlled-controlled-NOT operations have been performed from the set of qubits, (say Bingo qubits) |s1i,...,|s9i, to another set of qubits, (say Bingo checking qubits) |r1i,...,|r8i. Each Bingo checking qubit corresponds to the information whether any of the rows or columns or diagonals is crossed or not. If the measurement on the Bingo checking qubits reveals the outcome |1i state, then as mentioned, the numbers of the corresponding row or column or diagonal is crossed completely, i.e., implies one Bingo made by the player. The Bingo checking qubits, the corresponding Bingo qubits

4 |s1i |s2i |s3i |s4i |s5i |s6i |s7i |s8i |s9i |r1i |r2i |r3i |r4i

%

X

%

X

%

X

%

X

|r5i |r6i |r7i

%

X

%

X

%

X

|r8i

X

%

.

FIG. 3. Quantum circuit checking the rows and columns whether they are crossed or not. The qubits, |s1i to |s9i are used to represent the positions of the board whether the numbers are crossed at that position or not. All eight possible combinations are taken into account to check whether any row or column or diagonals are crossed, out of three rows, three columns and two diagonals respectively. For eight cases, eight ancilla qubits (|r1i to |r8i) are taken to check whether they are crossed or not. If any of the rows or columns or diagonals, are crossed then the corresponding qubits will be changed to |1i state. After measuring the ancilla qubits, it can be concluded that which rows or columns or diagonals are crossed.

and the corresponding rows or column or diagonal are given in the following Table II. It has been experienced that there is a minimum number after which the quantum computer should start checking, i.e., measuring the Bingo checking qubits. The number for the above case is 6, i.e., minimum 6 callings from the players, 3-Bingos can be made and any of the players can win. Hence, when the games starts, both the players start calling numbers one by one alternatively, then the called numbers will be checked and crossed on both of the players’ Bingo boards. After 6 calling, the quantum circuit (Fig. 3) of both the players will be start executing on the quantum computer alternatively after each call and determine whether any three of the Bingo checking qubits, results |1i state. The moment, it gets any three of the Bingo checking qubits in |1i state, it declares the winner. It might happen that both of the players at the same time, would have three Bingos, in that case, the game will be restarted. This process will be continued until one of the players wins the game.

TABLE I. Table representing the quantum states with their corresponding numbers. State Element |0001i 1 |0010i 2 |0011i 3 |0100i 4 |0101i 5 |0110i 6 |0111i 7 |1000i 8 |1001i 9

III.

CONCLUSION

To conclude, we have developed here new quantum circuits, which can be designed in a quantum computer for playing Bingo game by any two players. We have explained the game along with its rules and strategies.

5 the quantum circuits can be designed and the working of the game can be realized. Hence, the present work paves the way for developing other games that can be Rows/Columns/Diagonals Bingo qubits Bingo checking qubits played using a quantum computer. In near future, it is Row-1 |s1i, |s2i, |s3i |r1i believed that more and more complex strategies can be Row-2 |s4i, |s5i, |s6i |r2i introduced in the game and more efficiently can be played Row-3 |s7i, |s8i, |s9i |r3i on a quantum computer which can use the powerful quanColumn-1 |s1i, |s4i, |s7i |r4i tum principles of superposition and entanglement.

TABLE II. Table representing the Rows/Columns/Diagonals, their corresponding Bingo qubits and Bingo checking qubits.

Column-2 Column-3 Diagonal-1 Diagonal-2

|s2i, |s3i, |s1i, |s3i,

|s5i, |s6i, |s5i, |s5i,

|s8i |s9i |s9i |s7i

|r5i |r6i |r7i |r8i

The working of the game has been properly illustrated with detailed explanation of proposed quantum circuits. With the current technology based quantum computers,

[1] R. B. Myerson, Game Theory: An Analysis of Conflict (MIT Press, Cambridge, MA, 1991). [2] R. Axelrod, The Evolution of Cooperation (Basic Books, New York, 1984); R. Dawkins, The Selfish Gene (Oxford University Press, Oxford, 1976). [3] J. R. Wootton, Using a simple puzzle game to benchmark quantum computers. [4] J. N. Leaw and S. A. Cheong, J. Phys. A: Math. Theor. 43, 455304 (2010). [5] A. Pal, S. Chandra, V. Mongia, B. K. Behera, and P. K. Panigrahi, DOI: 10.13140/RG.2.2.19777.86885. [6] A. Ranchin, arXiv:1603.04751. [7] S. Paul, B. K. Behera, and P. K. Panigrahi, arXiv:1901.01136. [8] B. B. Roy, B. K. Behera, and P. K. Panigrahi, DOI: 10.13140/RG.2.2.30976.07680.

ACKNOWLEDGEMENT

V.S. acknowledges the hospitality provided by IISER Kolkata during the project work. B.K.B. acknowledges the financial support provided by IISER-K institute fellowship.

[9] Origin of Bingo, URL: https://www.senioradvisor.com/blog/2015/12/historyof-bingo/. [10] History of Bingo, URL: https://www.bingowebsites.com/history/. [11] Educational Tool, URL: http://www.bingostreak.com/bingo-kids-educationalfun. [12] How to Play Bingo, URL: https://www.thoughtco.com/how-to-play-bingo-537023. [13] BINGO Variations across the world, URL: https://mybingostop.com/bingo-around-world/. [14] Rules of Bingo, URL: https://mycasinostrategy.com/bingo+rules/1/MlWgRWfIpSPM9O3I1KzcNWrcdOjMhOfMhKvYZe7gRKjU5OLU9OHU