A friend of mine, Henry Charles Edwards (HCE for short) and I got to talking about quantum computing at our high school reunion. I was excited to share my recent experiences with quantum computing, the IBM Q Experience, and some details of a blog post (Quantum Computing: A beginner’s notes and overview of IBM’s Quantum Experience) I wrote on the subject.

“Sounds cool,” Henry Charles Edwards said. “When can I buy a quantum computer?” he asked, waving a drink sprouting miniaturized sombreros on sticks. It looked vaguely likely a fruity porcupine.

I laughed, “Well, they really aren’t yet for sale, for consumers at least.”

“Dang.  They’re really fast though, right?” He said, tilting his head and angling to avoid poking his eye out on a sombrero.

“Well,” I said. “I’m not sure you’d want a quantum computer for browsing the web or doing spreadsheets. They’re kind of more useful for special tasks.”

“Writing a novel?” he joked.  Henry Charles Edwards was always writing novels, though he never seemed to finish them.

“No, no.  I mean like tasks that quantum computing is good at–you know, factoring primes, breaking crypto, and the like?”

“When they get good at writing, let me know” he said, winking cryptically, and then our conversation shifted to the malleability of memory and the art (or lack thereof) of growing older. But, it got me to thinking.

Using quantum computers to solve real-world problems

16 qubit quantum computing chipQuantum computing is pretty ethereal—even IBM’s Q Experience platform, which does an impressive job of making the creation of quantum assembler code visual and appealing, is still pretty high up in the ether. It is, after all, all about quantum assembler code.

Now if you are a quantum computer researcher, it probably fits the bill just fine. Similarly, there are great tools to write assembler code for classical computers, but that’s not what made classical computers so successful. If all we had was a fine tool for writing assembler code, nobody would be wearing an iWatch, especially not someone like my friend, Henry Charles Edwards.

Now I like challenges—and so I asked myself: Could I map a real world problem into a real-world quantum computing environment and solve it?  Is it possible to use a quantum computer, just like a classical computer, to do something less ethereal than factoring primes — something real?

Enter the Shell Game

Granted, I’m not going to demonstrate how to use a quantum computer to write a novel or even how to crack SSL ciphers in real-time or anything complex like that, but I do like puzzles. Could I solve a simple shell game using a quantum computer?

Like the classic con game often found on the streets of big cities like New York, the shell game I had in mind is a very simple form of hide and seek. The operator of the game hides a ball under a shell, then rapidly rearranges the shells and asks the player to guess under which shell the ball can be found. The con artist, of course, uses sleight of hand, misdirection, and other sneaky tricks to deceive the player.

In the version I created, I wanted to keep it simple, honest, and straightforward. The user picks which shell they want to hide the ball under, and then we will use a quantum computing routine to deduce which shell they selected.

Good idea, Henry Charles Edwards might add. But now what? How would a quantum processor solve a shell game after all?

Grover’s Algorithm and the Amplitude Amplification trick

In reality, given a set of shells, we simply flip them over one at a time until we find the coin.  As such, in the world of computers, the shell game we are playing is nothing more than an unstructured search, a process in which N number of elements in a set are searched by applying a Boolean evaluation.

And, an unstructured search is one of those problems that quantum computing can solve with some elbow grease, a trick involving amplifying the amplitude of probability waves and a little genius called Grover’s algorithm.  The folks at IBM have done an excellent job explaining how Grover’s algorithm can solve unstructured search, so rather than repeat a very elaborate subject here, I’ll point you to their Q Experience tutorial here.

Later, with a little coding, some head scratching and a couple of false starts, voila! We can indeed use IBM Q and Grover’s Algorithm to create a very simple shell game.  If you like the nuts of bolts of such things, you can read my tutorial to see how the game was created.  And you can play the shell game here.

The Commodius Vicus of Recirculation

Henry Charles Edwards pokes me in the ribs, mumbling:

Bussoftlhee, mememormee! Till thousendsthee. Lps. The keys to. Given! A way a lone a last a loved a long the

And so we return to the beginning.  Henry Charles Edwards, now somewhere on his fifth or six sombrero drink, has remembered something about quantum computing.

“Kevin,” he says, waving his drink-free hand around like an animated sock-puppet. “Good luck with your ‘puters.  I hopes they can make pretty poetry someday.” Then he turns around, trips on the leg of a table, and sprawls his sombrero drink across one of the cheerleaders from my high school’s graduating class. “Sorry, sorry,” he shouts to everybody and nobody in particular and then makes for the door, his drunken gait reminding me of some mathematical technique for searching vast topographies implemented on human hardware. But that’s an idea for another day.

I know I won’t be solving weather prediction issues using IBM’s Q platform any time soon, but I do believe there are people smarter than I who will. There are real geniuses in the field—pulling together complex ideas and working to create the next generation computing platform.  A lot of those geniuses are over at IBM… working hard to make sure I can play my shell game and perhaps craft some poetry of my own someday.

Learn more about Quantum Computing at IBM

Join The Discussion

Your email address will not be published. Required fields are marked *