Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SunilBoopalan/quantum-chess-Qiskit
Quantum Chess.
https://github.com/SunilBoopalan/quantum-chess-Qiskit
chess game quantum quantum-chess quantum-computing quantum-game quantum-mechanics
Last synced: 3 months ago
JSON representation
Quantum Chess.
- Host: GitHub
- URL: https://github.com/SunilBoopalan/quantum-chess-Qiskit
- Owner: SunilBoopalan
- License: mit
- Created: 2021-12-14T09:01:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-04T05:18:21.000Z (almost 3 years ago)
- Last Synced: 2024-07-19T01:06:46.870Z (4 months ago)
- Topics: chess, game, quantum, quantum-chess, quantum-computing, quantum-game, quantum-mechanics
- Language: Python
- Homepage:
- Size: 5.9 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# quantum-chess [work in progress]
![](https://github.com/SunilBoopalan/quantum-chess/blob/main/Media/Poster.png)
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](https://www.chess.com/learn-how-to-play-chess#chess-pieces-move).
- 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.9Use v3.8 or less.
`pip install qiskit`
`pip install chess`
`pip install pyside2`
## References
- https://quantumchess.net/
- https://truly-quantum-chess.sloppy.zone/
- https://github.com/caphindsight/TrulyQuantumChess/wiki
- https://chess.stackexchange.com/questions/18278/what-are-the-rules-of-quantum-chess