Home

Awesome

Quantum Cat-sweeper

This is a super simple game loosely based on Minesweeper Flags and runs on the IBM Quantum computer or simulator.

Rules of the game:

Front Screen

Game Page

Game Screen

Game Over

Game Over

Explanation

The placement of the bombs are determined using the ANU Quantum Random Number Generator. A Hadamard gate is used on the qubit that represents the bomb and when the tile is clicked, the qubit is measured. It has a 50/50 chance of evaluating to a 1 (bomb explodes) or a 0 (bomb defuses).

A half NOT gate is applied to each qubit representing a number tile. For example: if you reveal a purple 3 tile, you need to click two more purple 3 tiles before the whole purple section reveals. For each click there is a 50/50 chance of the qubit evaluating to a 1 or 0. If out of the 1024 shots, more of them are 1, then your click counts and you only need to find one more purple tile before the whole group reveals. If there are more 0's, then your click does not count and you still need two more clicks of a purple tile to reveal the group.

The golden cat moves around based on your click. If you find it you win 100% of the time. If you reveal a tile with a positive (not !) or neutral evaluation (defused bombs, blank tiles) then the cat moves one space in the direction of the tile you just clicked. If a negatively evaluated tile is clicked the golden cat moves one space away. This knowledge can be used as strategy to win the game.

Installation Guide

apt-get install python3 python3-pip libglfw3 libportaudio2 libasound-dev

pip install -r requirements.txt

python main.py
python main.py debug # For debugging mode