Skip to content

Latest commit

 

History

226 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fun with Quantum

"Fun with Quantum" is a collection of Jupyter notebooks that highlight specific aspects of Quantum Computing that are interesting and/or fun.

  1. Quantum Coin Game (superposition & interference))
  2. Solving logic puzzles with Grover's search (Boolean satisfiability, 3-SAT)
  3. (merged into 2)
  4. Hardy's Paradox (complementary observables & the problem with classical logic)
  5. GHZ Game (entanglement)
  6. GHZ Game on real devices
  7. Mermin-Peres Magic Square (entanglement beats every classical strategy)

Came here from Linux Magazine?

Find the notebook in the repository under the name Codebeispiele-Linux-Magazin.ipynb.

View - and play the game online, without any install - in Binder: Binder


How to execute the Examples in the IBM Quantum Lab

You can run the jupyter notebooks with the different Serious Games in the IBM Quantum Lab without the need for a local software install.

  1. Open the Quantum Lab in your browser: https://quantum-computing.ibm.com/
  2. If you already have an ID sign in to IBM Quantum.
    Otherwise, please create an IBMid by clicking Create an IBM account, or use one of the other ID options.
  3. Launch the Quantum Lab.
  4. Create a new file by clicking on the blue button New file +.
  5. Delete the code from the first cell and enter
!git clone https://github.com/JanLahmann/Fun-with-Quantum
  1. Execute the cell with Shift + Enter. The Fun-with-Quantum Repository will now be cloned in your IBM Quantum Lab.
    To see the new folder Fun-with-Quantum in the directory-tree on the left side, close and open the Lab files side menu.
  2. Click Fun-with-Quantum to enter the new directory.
  3. Open the Readme.ipynb-file and follow the links to the different examples.

RasQberry: Exploring Quantum Computing and Qiskit with a Raspberry Pi and a 3D Printer

Please have a look at the RasQberry project at https://github.com/JanLahmann/RasQberry.

RasQberry integrates Qiskit, a Raspberry Pi (the full range from Pi 4 down to a Pi Zero) and a 3D printed model of IBM Q System One to explore various state-of-the-art technologies and create a tool that can be used in meetings, meetups, demo booths, etc. A spectrum of Quantum Computing demos and Serious Games for Quantum Computing (that illustrate superposition, interference and entanglement) will being made available on this device for an engaging introduction to Quantum Computing.


1. Quantum Coin Game

A quantum coin game that illustrates the power of quantum superposition and interference - implemented by Jan-R. Lahmann using Qiskit, binder and RISE.

Inspired by the TED talk of Shohini Ghose "Quantum computing explained in 10 minutes"

View - and play the game online, without any install - in Binder: Binder

A slightly more current version of this Quantum Coin Game is now part of the official Qiskit Community Tutorials and can be played at http://ibm.biz/QiskitCoinGame


2. Solving logic puzzles with Grover's search (3-SAT)

Builds Grover's quantum search algorithm from scratch with Qiskit 2 and uses it on two puzzles: a party guest list that keeps everybody happy, and a classic 3-SAT formula given in DIMACS format. Explains oracle, diffuser and the √N speed-up, checks every answer classically, and lets you enter your own puzzle. (Rebuilt in 2026 from two Qiskit Aqua–era notebooks, which it replaces.)

Walk through this demo (and change it if you like) in Binder: Binder


3. (merged into 2)

The party example of the former 3sat-v2.ipynb is now part of the notebook above.


4. Hardy's Paradox

Hardy's Paradox nicely illustrates the fundamental difference of Quantum Mechanics and classical physics. Learn about complementary oberservables and why classical logic is not applicable to quantum mechanics.

A tutorial that discusses a specific version of the Einstein-Podolsky-Rosen (EPR) Paradox - implemented by Jan-R. Lahmann & Bengt Wegner using Qiskit, binder and RISE, based on an idea in a former version of the Qiskit Textbook

View - and play the game online, without any install - in Binder: Binder


5. GHZ Game

A quantum game that illustrates the power of quantum entanglement - implemented by Isabell Heider using Qiskit and binder.

For an introductions to the GHZ Game, please take a look at the following presentation by Jana Foehlisch.

View - and play the game online, without any install - in Binder: Binder


6. GHZ Game on real devices

Analyzing different techniques how to improve the results of playing the GHZ game on real quantum devices - implemented by Lennart Schulze using Qiskit and binder.

This notebook compares several IBM Quantum devices, explains how to (manually) optimize a circuit for a specific device, how to use the Qiskit transpiler and its optimizations, and discusses Measurement Error Mitigation.

View - and play the game online on real quantum devices, without any install - in Binder: Binder


7. Mermin-Peres Magic Square

Alice and Bob, in separate rooms, each fill in one row or column of a 3×3 square of 0s and 1s under parity rules that no square of numbers can satisfy — the best classical team wins 8 of 9 questions. Sharing two entangled qubit pairs, they win every round. The notebook lets you hunt for a magic square yourself, brute-forces every classical strategy, then builds and runs the quantum circuits for all nine questions. Original version by David Drexlin & Jan-R. Lahmann (2021), rebuilt in 2026 with Qiskit; inspired by the Qiskit blog post This Proof Demonstrates a Quantum Advantage, Even for Noisy Quantum Computers.

View - and play the game online, without any install - in Binder: Binder


Usage instructions for the RISE Slideshow Extension

Some binder images in this repository automatically launch RISE, a Jupyter/IPython Slideshow Extension.
Navigation is easy:

  • "Ctrl -" and "Ctrl +" (or "command -", "command +") adjust the zoom level to fit the text to the browser window
  • Use "Space" and "Shift Space" to navigate through the slides (right & left arrow keys also work, but might skip some slides)
  • "Shift + Enter" executes the interactive cells (might need to click the cell, first)
  • Execute the interactive cells on each slide ("In [1]:", etc)
  • In case a cell is not formatted correctly, try to double-click and then "Shift Enter" to re-execute
  • Interactive cells can be modified, if needed
  • "X" at the top left exits the slideshow and enters the jupyter notebook interface

THINK 2021 Lab - Explore Quantum Computing with Serious Games

In this lab, we will give an overview of serious games for quantum computing and use several Quantum Games that make the fundamental concepts of Superposition, Interference and Entanglement tangible and understandable for beginners. In addition, we will use real quantum computers and explore how to mitigate noise and errors.

As a first introduction look at these slides which provide an Overview about the topic of Serious Games in the area of Quantum Computing. Then you can go through some of the Serious Games to experience the differences and possibilities that Quantum Computing provides and get a first understanding on how to program today's Quantum Computers and Quantum Simulators:

  1. Quantum Coin Game: this Game provides an introduction to the concepts of Superposition and Interference. Go ahead and try it out for yourself: Binder (opens as interactive slide show)
  2. GHZ-Game: in this game you will learn the basics about the concept of Entanglement and experience the effect that it can have based on a simple riddle: Binder (opens as Jupyter Notebook)
  3. GHZ on real devices: to go one step further you can now try the GHZ-Game on a real quantum computer device. In this notebook you can experience the influence noise has on today's Quantum Computers and learn the fundamentals about error mitigation: Binder (opens as Jupyter Notebook)

IEEE QCE20 Tutorial on "Serious Games for Quantum Computing"

For the tutorial "Serious Games for Quantum Computing" as part of the IEEE QCE20 conference, please use the following URLs to launch the tutorial notebooks:

Part 2 "Quantum Coin Game": Binder

Part 3.1 "GHZ Game": Binder

Part 3.2 "GHZ Game on real devices": Binder

A recording of the three 1h tutorial sessions "Serious Games for Quantum Computing" from the IEEE International Conference on Quantum Computing and Engineering (QCE20) are available here: part 1, part 2, part 3. The agenda for the three parts is here.


Jan-R. Lahmann, https://www.linkedin.com/in/JanLahmann

Part of the Fun with Quantum family

These games are the home of Fun with Quantum, a family of open-source quantum outreach projects: RasQberry Two · RasQberry One · Quantego · Qutie · Qoffee-Maker · Entangible · CertiQ · QuBins · doQumentation · QAMPoser.

God does play dice. Come play, build, learn.

About

Quantum games and the fun-with-quantum.org family portal — quantum computing to play, build & learn

Topics

Resources

Stars

56 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages