Skip to Content

How Quantum Programing Turned into a 3-D Puzzle Game

If you enjoy 3-D puzzles, you’ll love quantum programing. There’s even an online game to challenge your skills.

Software is the part of a computer that consists of encoded information and instructions. It is entirely separate from the hardware—the physical structures that perform these instructions. At least that’s true for conventional computers.

But in recent years, computer scientists have become increasingly focused on quantum computers that use the strange laws of quantum mechanics to process information. This results in much more powerful computations. However, in the quantum world, it is much harder to separate the software and the hardware.

Nevertheless, a powerful new way of thinking of about quantum software is beginning to emerge. And the curious thing about this approach is that it turns quantum programming into a kind of 3-D puzzle. That leads to an interesting question: is it possible to gamify quantum program in way that produces useful results?

Today, we get an answer thanks to the work of Simon Devitt at Riken in Saitama, Japan, who has built an online game that has the potential to play a crucial role in the future of quantum programming.  Not only can the game help humans create better programs, but it could also help a new generation of artificial intelligence machines take on the task themselves.

First some background. One way to think about a quantum program is as a two-dimensional lattice of qubits, like a sheet, or a three-dimensional lattice, like a crystal. Information is encoded by creating a hole or defect in the lattice.

This is a powerful approach because the information is naturally protected against errors by the properties of lattice itself, which effectively locks it in place.

The information can be processed by moving defects through the lattice and wrapping them around each other, like a tangled ball of string. The process of tangling can enact logic gates which together perform computations.

This is essentially a topological process. So the mathematics of topology describe the entire process, regardless of how messy the tangling becomes. As long as the lattices are topologically identical, the other details of the tangling don’t matter.

This is analogous to the famous link between a doughnut and a coffee cup. These shapes are entirely different to look at but are topologically identical because they both contain a single hole. Each one can be converted into the other by squeezing and stretching but not by tearing.

Exactly the same is true of quantum programs. Two programs perform the same job provided they are topologically identical but regardless of how tangled the lattices become.

That raises an interesting problem. Given a tangled lattice representing a quantum computer program, how simple can it be made while preserving its topology?  In other words, how can the quantum program be optimized?  

That’s important because today’s quantum computers can handle only a few qubits. With quantum resources so scarce, the simpler a program can be made, the more easily it can be implemented.

This is where Devitt steps in. He has developed a powerful way to visualize quantum programs as 3-D lattices with interlocking sections representing the way information is stored and processed. The task of optimization is to simplify the lattice by moving, shrinking, stretching, and reworking the interlocking sections while preserving the same topology.

Devitt’s has gone further by gamifying the task—he’s turned it into a Web-based puzzle called MeQuanics, which you can try here. The idea behind the game is that a quantum program can power your spacecraft. But the program you have is too big and therefore has to be made smaller using various tools that can refashion it.

The game is fascinating and not so different to various other puzzlers. It’s a bit buggy but it looks good and is worth a try if you have a few minutes.

There is another hidden aspect to the game. One way to speed up the process of optimizing quantum programs would be to train a machine-learning algorithm to do the job. These algorithms have been hugely successful in other tasks and this kind of optimization seems ideally suited.

But there is a problem. These algorithms have to be trained, and that requires a large data set of examples that they can learn from. However, quantum program optimization is so new that there are no suitable data sets for this task.

That’s why MeQuanics is important—the process of playing the game creates a database of examples that can be used to train a machine.  And given enough data, the machines should eventually outperform humans. Google’s AlphaGo program showed how powerful they can be when it recently thrashed one of the best human Go players after devouring a massive dataset of Go games played online.

Devitt’s is interesting work that has the potential to introduce a new generation of people to quantum programming. And best of all, it’ll let them have some fun while they learn.  

Ref: arxiv.org/abs/1609.06628: Programming Quantum Computers Using 3-D Puzzles, Coffee Cups, and Doughnuts

Keep Reading

Most Popular

Scientists are finding signals of long covid in blood. They could lead to new treatments.

Faults in a certain part of the immune system might be at the root of some long covid cases, new research suggests.

Large language models can do jaw-dropping things. But nobody knows exactly why.

And that's a problem. Figuring it out is one of the biggest scientific puzzles of our time and a crucial step towards controlling more powerful future models.

OpenAI teases an amazing new generative video model called Sora

The firm is sharing Sora with a small group of safety testers but the rest of us will have to wait to learn more.

Google’s Gemini is now in everything. Here’s how you can try it out.

Gmail, Docs, and more will now come with Gemini baked in. But Europeans will have to wait before they can download the app.

Stay connected

Illustration by Rose Wong

Get the latest updates from
MIT Technology Review

Discover special offers, top stories, upcoming events, and more.

Thank you for submitting your email!

Explore more newsletters

It looks like something went wrong.

We’re having trouble saving your preferences. Try refreshing this page and updating them one more time. If you continue to get this message, reach out to us at customer-service@technologyreview.com with a list of newsletters you’d like to receive.