© Vladimir Silva 2018Vladimir SilvaPractical Quantum Computing for Developershttps://doi.org/10.1007/978-1-4842-4218-6_6
6. Fun with Quantum Games
In this chapter you will learn how to implement a basic game in a quantum computer. For this purpose we use the quintessential Quantum Battleship distributed with the QISKit Python
tutorial. The first part looks at the mechanics of the game including
Using qubits to represent ship positions in the board
How to calculate damage percentages using a quantum program to be run in the local, remote simulator or real quantum device
How to perform rotations on the X-axis of a single qubit using a partial NOT quantum gate
Yet we don’t stop there. The second part of this chapter takes ...