Code Monkey home page Code Monkey logo

quantum-breakout's Introduction

Quantum Breakout

Download from Itch.io

Quantum Version of Classic Breakout Game

Inspired by QPong

I am happy to announce The Quantum Breakout Game which I built as a part of Team Abraxas for showcasing at Fest Nimbus, the annual technical fest of the National Institute of Technology Hamirpur. This is a quantum version of the Classic Breakout Game by Atari, Inc. built using Pygame and Qiskit. In the Classic Breakout Game, the player has to knock down as many bricks as possible by using a single ball and the paddle below to hit the ball against the bricks and eliminate them. In this quantum version of the game, players have to control the paddle by constructing a three-qubits circuit such that the probability of the paddle being above the state vector where the ball is about to come is maximum. The probability of the paddle being above a certain state is indicated by the opacity of the paddle, 100% opacity (pure white) indicates the 100% probability and 0% opacity (transparent) indicates the 0% probability of the state. As the ball comes near the paddle the measurement is done and the position of the paddle collapses to a being above a certain state which was in superposition before the measurement.

I have built this game to help school students and college freshmen understand the basic concept of quantum computing: Qubit manipulation by Quantum Gates.

This game is highly inspired by the QPong game developed by Junye Huang. I am thankful to him and Qiskit for releasing a basic tutorial for building QPong in a YouTube series: 12 Days of Qiskit (https://youtube.com/playlist?list=PLOFEBzvs-VvodTkP_rfrs3RWdeWE9aNRD) without which it would have been hard for me to develop this game.

Game Demo

QBreakout.mp4

Download & Install Instruction

  1. Unzip the Downloaded Zip File
  2. Open the Game Folder
  3. Install the requirements using the command: pip install -r requirements-dev.txt​ on your terminal.
  4. Run the main.py file using the command: python main.py

Play Instruction

  • Use the W, A, S, and D keys to move the marker on the circuit for adding gates at appropriate places.
  • Use the X key to apply the X-Gate, the Y key to apply the Y-Gate, the Z key to apply the Z-Gate, and the H Key to apply the H-Gate.
  • Use the C key to activate the control qubit, use the UP, DOWN, RIGHT, and LEFT keys to reach the target qubit, and then click the key representation (X, Y, Z, and H Keys) for the gate which you want to be controlled.

quantum-breakout's People

Contributors

devilkiller-ag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.