Skip to content

The Quantum Circuit Elimination Game, learning quantum logical circuit with fun :)

License

Notifications You must be signed in to change notification settings

Kahsolt/Quantum-Circuit-Elimination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum-Circuit-Elimination

The Quantum Circuit Elimination game, learning quantum logical circuit with fun :)

Quantum Circuit Elimination is inspired by Quantum Tetris, but actually is a Block Elimination Puzzle, plus a little bit 2048 game.
This project is for the quantum challenge 2024 from 第一届“天衍”量子计算挑战先锋赛-大众组

Screenshot

⚪ CUI

cui

⚪ WebUI (⚠ still under development...)

webui

How to start

ℹ So far only the ugly CUI client works... 😓

  • cd server; python server.py
  • cd client\cui; python start.py
    • enter h for command help
    • run in debug mode: python start.py --debug
[Commands & Examples]
  cmd: <gate_idx> <target_qubit> [control_qubit]
    0 3         # put the 0-th gate in candidate slots on qubit 3
    2 0 4       # put the 2-th gate in candidate slots on qubit 0 and qubit 4
  d <idx>
    d 5         # delete the 5-th gate in the circuit (i.e.: gate list)
  !<score|token> [count]
    !score 10   # cheat, give 10 scores
    !token 2    # cheat, give 2 tokens

GamePlay

  • You will face with a 5-qubits 10-clock quantum logical circuit, and an infinite sequence of random spawned quantum logical gates, mimicking the traditional Tetris board and pieces
  • You are asked to select proper gates and append to the circuit, and the score is counted
  • When two rotation gates of the same axis meet, they'll be merged with a score ratio x1.5
  • When two gates inversion (dagger!) of each other meet, they will be eliminated (Bingo!) with score ratio x3 🎉🎉
  • Every 5 bingos, you'll have an additional removal token. You can use it to remove an arbitrary gate!
  • Note that SWAP is NOT the the quantum SWAP gate, it can swap locations of two single-qubit gates!
Notes for the 1st gameplay design draft :( In the original design, if any sub-part of the circuit is equivalent to an identity matrix, it will **collapse** and we call this bingo! Every 5 bingos, the player will be rewarded with a **hint token** to get hints about the placements. However, implementing this requires O(2^n) computations and is extremely annoying... we have to step back.

References

⚪ Other Tetris-inspired quantum games

If you find this work useful, please give a star ⭐ and cite~

@misc{kahsolt2024,
  author = {Kahsolt},
  title  = {Quantum-Circuit-Elimination},
  howpublished = {\url{https://github.com/Kahsolt/Quantum-Circuit-Elimination}}
  month  = {July},
  year   = {2024}
}

by Armit 2024/07/07

About

The Quantum Circuit Elimination Game, learning quantum logical circuit with fun :)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published