I just made a computer game. Not for the PS4 or XBox or even the Nintendo Switch. I made it for a quantum computer. I played it on an actual, real-life quantum computer, and you can too.

It is not a very complex game. Current quantum computers aren’t capable of all that much. It’s basically a quantum version of rock/paper/scissors. But it does contain a glimmer of what will make quantum computing special.

The quantum computer I use is the one made by IBM, and offered up to the cloud for us all to mess around with.

It has five quantum bits. One of them is going to act as a referee, telling us who wins. The other four are all potential opponents. Though we’ll only ever play against one at a time.

To make a game for quantum bits, we have look at the set of things that we are allowed to do to them. For inspiration, we can look at what’s possible for normal bits.

The simplest thing we can do with a normal bit is called a NOT gate. It flips bits from 0 to 1 and 1 to 0. Quantum computers can do these to, but they can also be a bit more fancy. For example, they can do half a NOT, leaving the quantum bit in a strange limbo state between 0 and 1. A quantum superposition, just like Schrödinger’s cat.

Actually, there are two ways to do half a NOT. We’ll abuse notational slightly and call them S and S dagger. If you do two S gates, you’ll get a whole NOT. No surprise there: that’s what two halves do! Two S dagger gates will also give you a NOT. But if you have one of each, they’ll cancel out. You’ll end up back where you started.