Git Product home page Git Product logo

quantum-chess-qiskit's Introduction

quantum-chess [work in progress]

Hi! Welcome to the Quantum Chess repo. Done by Sunil Boopalan from SRMIST.

Chess is a much loved, classic game, but what happens when we give it a quantum twist? Quantum chess works on the same rules as classical chess, but each piece has quantum abilities too- you can put a piece in a superposition, or even entangle two pieces. Our version is built using Qiskit, and is a great way to demonstrate and understand quantum properties. The game needs a good understanding of how various probabilities interact, to be able to comprehend how the state collapses upon observation, which happens when the piece is either capturing or being captured, and decides the position of a piece in superposition. These probabilities are decided by the quantum state of the piece, and thus adds an element of chance to this game of strategy.

Rules

  • The board is a regular 8x8 chessboard with the same 16 pieces on each side(black and white).
  • The number next to the piece corresponds to the probability of the piece being at that position.
  • All the pieces move according to the normal rules.
  • On a turn, a player can choose to either make a normal move or a quantum move.

Quantum Moves

  • In the quantum mode, a piece can be moved to different positions in the same move.
  • If both positions are unobstructed, the probability of the piece being in each of the new positions is 0.5.
  • If obstructed by a quantum piece, the two pieces get 'entangled' and the piece being moved is split into two, each with a probability dependent on the probability of the obstructing piece.
  • Entanglement of two pieces means that measuring either of the pieces will determine the state of the other.
  • A piece is measured in two cases - either when it is perfoming a move to kill another piece, or when it is being killed.

How to run

Qiskit is not compatible with Python 3.9

Use v3.8 or less.

pip install qiskit

pip install chess

pip install pyside2

References

quantum-chess-qiskit's People

Contributors

sunilboopalan avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

sairohitp

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.