Skip to content


Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time


This is a quantum version of classic game Pong using IBM Qiskit and PyGame. This game was initiated in IBM Qiskit Camp 2019 by Huang Junye, Jarrod Reilly, Anastasia Jeffery and James Weaver based on James Weaver's quantum-circuit-pygame package:

NEW! Unity version is being actively developed over here:


In the dawn of the Quantum Era, a primitive 3-qubit Quantum Computer is trying to challenge the Classical Computer, the long-time ruler of the Computer Empire. Your mission is to use your Human Intelligence to help the Quantum Computer defeat the Classical Computer and demonstrate "quantum supremacy" for the first time in human history. The battle field of the Quantum-Classic war is none other than the classic Pong game.


To play the game, you will need to install Python and three required packages. To do that, you need to use command line tool (Command Prompt for Windows or Terminal for macOS).

Open command line tool

On Windows, open Command Prompt by typing "Command Prompt" on the search box of Start menu. Check this link if you are not sure about how to do that:

On macOS, press Command + Space to open Spotlight. Type "Terminal" on Spotlight to open Terminal. Check this link if you are not sure about how to do that:

Install Python

You can install Python from or install Anaconda from

Install required packages

There are three Python packages required to run the game: PyGame, Qiskit and matplotlib.

Run pip install [package name] on command line tool (same for Windows and macOS) to install the packages. For example:

pip install pygame

Install QPong

Clone or download the master branch by clicking the green button on the top right corner on this page (above the files and below "contributors"). Unzip the files to the "Downloads" folder on your computer.

Change the directory to the downloaded files. (Downloads/QPong-master)

On Windows, run the following code to change your directory to the QPong folder:

cd C:\users\[your username]\downloads\QPong-master\

On macOS, run the following code to change your directory to the QPong folder:

cd Downloads/QPong-master/

On both Windows and macOS, run the following command to start the game:


How to play


W, A, S, D: Up, Left, Down, Right to move cursor

SPACE: delete gate

X, Y, Z, H: add Pauli-X, Pauli-Y, Pauli-Z, Hadamard gate

C: add CNOT gate

UP, DOWN: move control qubit up or down

Left, Right: add rotation to a gate, at pi/8 step

TAB: update visulization


Joystick button correspondence depends on the model of joystick. Details will be added later


Sound effects are made by NoiseCollector from Font used in the game is Bit5x3 made by Matt LaGrandeur: