Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ritu-thombre99/qnim
Implementing strategy for quantum computer to play Nim game against human/classical computer.
https://github.com/ritu-thombre99/qnim
game grover-diffusion grover-search grovers-algorithm ibm-qiskit ibm-quantum ibmquantumcomputing nim nim-game qamp qamp-22 qamp-checkpoint-1 qamp-fall-22 qiskit qiskit-advocate qnim quantum-algorithm quantum-algorithms quantum-computing
Last synced: 5 days ago
JSON representation
Implementing strategy for quantum computer to play Nim game against human/classical computer.
- Host: GitHub
- URL: https://github.com/ritu-thombre99/qnim
- Owner: ritu-thombre99
- Created: 2022-10-07T17:20:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-29T13:23:53.000Z (about 2 years ago)
- Last Synced: 2023-09-17T11:06:34.050Z (about 1 year ago)
- Topics: game, grover-diffusion, grover-search, grovers-algorithm, ibm-qiskit, ibm-quantum, ibmquantumcomputing, nim, nim-game, qamp, qamp-22, qamp-checkpoint-1, qamp-fall-22, qiskit, qiskit-advocate, qnim, quantum-algorithm, quantum-algorithms, quantum-computing
- Language: Jupyter Notebook
- Homepage:
- Size: 14.4 MB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QNim
This project is implemented under the guidance of James Weaver as part of QAMP (Qiskit Advocate Mentorship Program) Fall-22. Project description can be found [here](https://github.com/qiskit-advocate/qamp-fall-22/issues/29).
Implementing strategy for quantum computer to play Nim game against human/classical computer.
1. One of the first games in which a human played against the computer is Nim, so it is an interesting and fitting game to implement on a quantum computer. [This](https://en.wikipedia.org/wiki/Nim) Wikipedia article describes the game, strategies and variants.
2. The QC's gameplay strategy is based upon mathematical theory for [Nim](https://en.wikipedia.org/wiki/Nim#Mathematical_theory), played as a misère game. This strategy is implemented using dynamically generated circuit based upon the remaining piles of objects each time it is the QC's turn to play.
3. In case there are winnable moves possible, superposition for these moves is created and the measurement of circuit will decide the qc's move.
4. In case the measurement is nonsense (e.g pick negative objects, pick pile not present on the board, etc) qc automatically loses the game.