How the game adopts quantum principles

Randomness:

The simplest quantum principle to understand is true randomness. While most computers and calculators have some sort of ‘randomness’ function, those are actually based on a predictable formula. With a powerful enough computer, you could predict exactly what Math.random() will output. Quantum systems, on the other hand, are truly random by their inherent nature. Even with a supercomputer the size of the moon, you will never be able to 100% predict Quantum randomness. Our game uses IBM’s Qiskit quantum simulator to run our calculations. All aspects of Quantum Tetris, from piece to probability selection, are picked using true randomness.

Superposition:

Quantum bits (qubits) exist in Superposition. This means that they exist in multiple states at once — both 1 and 0 at the same time. They fly through space in both of these states until the moment we try to observe them. In that moment of ‘measurement’, they condense down to one state and stay that way. Think of a coin infinitely flipping through the air. You can’t know if the coin is going to land on Heads or Tails until you reach out and grab it to take a look.

In our game, mixed in with regular Tetrominos are Superposition Pieces. Like our coin with two sides, these Superposition pieces are made of two underlying possible Tetrominos. But unlike our coin, the probability is not always 50/50. Instead, our quantum machine uses true randomness to determines the probability. The moment a Superposition piece hits the stack of blocks below, we ‘measure’ it and the probability reduces to a single state. The piece becomes either a blue L or cyan long piece and stays that way.

Two tetris pieces in Superposition

Entanglement

When two qubits are brought microscopically close together, quantum Entanglement can occur. An invisible tether binds them, and then the qubits can be separated by great distance and still affect each other. They are forever opposites of each other. If we measure one to be spinning up, we know the other must be spinning down. Going back to our coin example, imagine now we have two floating, spinning coins that are entangled. If we grab one coin and it comes up Heads, we know that the other will be Tails without even looking. The Tails coin could be in the other room or even across the country, and it is still guaranteed to land Tails.

In our game, sometimes two Superposition pieces will link and become an Entanglement Piece. As they fall, their movements will mirror each other on either half of the screen. Let’s say that when either of the potential pieces (yellow or blue in this example) of one of the two superposition pieces falls onto any of the previously played blocks below, we measure it to be a yellow square piece. In that moment, the other piece will instantly measure to its mirror image: the cyan long piece.

Representation of two superposition pieces that are entangled

Quantum Gates

People familiar with computer science may have heard of the classical gates like AND, OR, NOT. These gates manipulate computer bits to create tiny pieces of logic that are the building blocks of classical computing. These gates can accept either 1’s or 0’s and flip them back and forth. However, since qubits can be both 0 and 1 at the same time, quantum gates cannot change a qubits state definitively. Instead, quantum gates modify the probability of a qubit becoming 0 or 1. In our game, we implemented two gates: the X gate and the Hadamard gate (or H gate). After completing some number of rows, you are given either an X or H gate ‘power-up’ which you can then use to change the probabilities of your Superposition piece. An X gate flips the two probabilities — 90% becomes 10%. An H gate makes even probabilities more extreme and vice versa — 51/49 will become 99/1.

Additionally, to see the work of the quantum gates in action, we implemented a quantum visualizer. Qubits are represented in what are called Bloch spheres where its north pole takes one value, for example, a straight piece and its south pole takes the other like a square piece. The superposition or probability that one value or piece will occur is represented as a line originating from the center of the sphere to somewhere on its surface. For more information on this, you can go here (though beware to truly understand it, it does require a bit of a mathematical background).