About glenevenbly

I am a research scientist specializing in efficient simulation algorithms for quantum many-body systems. I was formerly an IQIM postodoc and am currently working as part of the AWS Center for Quantum Computing in Pasadena.

Building a Visceral Understanding of Quantum Phenomena

A great childhood memory that I have comes from first playing “The Incredible Machine” on PC in the early 90’s. For those not in the know, this is a physics-based puzzle game about building Rube Goldberg style contraptions to achieve given tasks. What made this game a standout for me was the freedom that it granted players. In many levels you were given a disparate set of components (e.g. strings, pulleys, rubber bands, scissors, conveyor belts, Pokie the Cat…) and it was entirely up to you to “MacGuyver” your way to some kind of solution (incidentally, my favorite TV show from that time period). In other words, it was often a creative exercise in designing your own solution, rather than “connecting the dots” to find a single intended solution. Growing up with games like this undoubtedly had significant influence in directing me to my profession as a research scientist: a job which is often about finding novel or creative solutions to a task given a limited set of tools.

From the late 90’s onwards puzzle games like “The Incredible Machine” largely went out of fashion as developers focused more on 3D games that exploited that latest hardware advances. However, this genre saw a resurgence in 2010’s spearheaded by developer “Zachtronics” who released a plethora of popular, and exceptionally challenging, logic and programming based puzzle games (some of my favorites include Opus Magnum and TIS-100). Zachtronics games similarly encouraged players to solve problems through creative designs, but also had the side-effect of helping players to develop and practice tangible programming skills (e.g. design patterns, control flow, optimization). This is a really great way to learn, I thought to myself.

So, fast-forward several years, while teaching undergraduate/graduate quantum courses at Georgia Tech I began thinking about whether it would be possible to incorporate quantum mechanics (and specifically quantum circuits) into a Zachtronics-style puzzle game. My thinking was that such a game might provide an opportunity for students to experiment with quantum through a hands-on approach, one that encouraged creativity and self-directed exploration. I was also hoping that representing quantum processes through a visual language that emphasized geometry, rather than mathematical language, could help students develop intuition in this setting. These thoughts ultimately led to the development of The Qubit Factory. At its core, this is a quantum circuit simulator with a graphic interface (not too dissimilar to the Quirk quantum circuit simulator) but providing a structured sequence of challenges, many based on tasks of real-life importance to quantum computing, that players must construct circuits to solve.

An example level of The Qubit Factory in action, showcasing a potential solution to a task involving quantum error correction. The column of “?” tiles represents a noisy channel that has a small chance of flipping any qubit that passes through. Players are challenged to send qubits from the input on the left to the output on the right while mitigating errors that occur due to this noisy channel. The solution shown here is based on a bit-flip code, although a more advanced strategy is required to earn a bonus star for the level!

Quantum Gamification and The Qubit Factory

My goal in designing The Qubit Factory was to provide an accurate simulation of quantum mechanics (although not necessarily a complete one), such that players could learn some authentic, working knowledge about quantum computers and how they differ from regular computers. However, I also wanted to make a game that was accessible to the layperson (i.e. without a prior knowledge of quantum mechanics or the underlying mathematical foundations like linear algebra). These goals, which are largely opposing one-another, are not easy to balance!

A key step in achieving this balance was to find a suitable visual depiction of quantum states and processes; here the Bloch sphere, which provides a simple geometric representation of qubit states, was ideal. However, it is also here that I made my first major compromise to the scope of the physics within the game by restricting the game state to real-valued wave-functions (which in turn implies that only gates which transform qubits within the X-Z plane can be allowed). I feel that this compromise was ultimately the correct choice: it greatly enhanced the visual clarity by allowing qubits to be represented as arrows on a flat disk rather than on a sphere, and similarly allowed the action of single-qubit gates to depicted clearly (i.e. as rotations and flips on the disk). Some purists may object to this limitation on grounds that it prevents universal quantum computation, but my counterpoint would be that there are still many interesting quantum tasks and algorithms that can be performed within this restricted scope. In a similar spirit, I decided to forgo the standard quantum circuit notation: instead I used stylized circuits to emphasize the geometric interpretation as demonstrated in the example below. This choice was made with the intention of allowing players to infer the action of gates from the visual design alone.

A quantum circuit in conventional notation versus the same circuit depicted in The Qubit Factory.

Okay, so while the Bloch sphere provides a nice way to represent (unentangled) single qubit states, we also need a way to represent entangled states of multiple qubits. Here I made use of some creative license to show entangled states as blinking through the basis states. I found this visualization to work well for conveying simple states such as the singlet state presented below, but players are also able to view the complete list of wave-function amplitudes if necessary.

\textrm{Singlet: }\left| \psi \right\rangle = \tfrac{1}{\sqrt{2}} \left( \left| \uparrow \downarrow \right\rangle - \left| \downarrow \uparrow \right\rangle \right)

A singlet state is created by entangling a pair of qubits via a CNOT gate.

Although the blinking effect is not a perfect solution for displaying superpositions, I think that it is useful in conveying key aspects like uncertainty and correlation. The animation below shows an example of the entangled wave-function collapsing when one of the qubits is measured.

A single qubit from a singlet is measured. While each qubit has a 50/50 chance of giving ▲ or ▼ when measured individually, once one qubit is measured the other qubit collapses to the anti-aligned state.

So, thus far, I have described a quantum circuit simulator with some added visual cues and animations, but how can this be turned into a game? Here, I leaned heavily on the existing example of Zachtronic (and Zachtronic-like) games: each level in The Qubit Factory provides the player with some input bits/qubits and requires the player to perform some logical task in order to produce a set of desired outputs. Some of the levels within the game are highly structured, similar to textbook exercises. They aim to teach a specific concept and may only have a narrow set of potential solutions. An example of such a structured level is the first quantum level (lvl QI.A) which tasks the player with inverting a sequence of single qubit gates. Of course, this problem would be trivial to those of you already familiar with quantum mechanics: you could use the linear algebra result (AB)^\dag = B^\dag A^\dag together with the knowledge that quantum gates are unitary, so the Hermitian conjugate of each gate doubles as its inverse. But what if you didn’t know quantum mechanics, or even linear algebra? Could this problem be solved through logical reasoning alone? This is where I think that the visuals really help; players should be able to infer several key points from geometry alone:

  • the inverse of a flip (or mirroring about some axis) is another equal flip.
  • the inverse of a rotation is an equal rotation in the opposite direction.
  • the last transformation done on each qubit should be the first transformation to be inverted.

So I think it is plausible that, even without prior knowledge in quantum mechanics or linear algebra, a player could not only solve the level but also grasp some important concepts (i.e. that quantum gates are invertible and that the order in which they are applied matters).

An early level challenges the player to invert the action of the 3 gates on the left. A solution is given on the right, formed by composing the inverse of each gate in reverse order.

Many of the levels in The Qubit Factory are also designed to be open-ended. Such levels, which often begin with a blank factory, have no single intended solution. The player is instead expected to use experimentation and creativity to design their own solution; this is the setting where I feel that the “game” format really shines. An example of an open-ended level is QIII.E, which gives the player 4 copies of a single qubit state \left| \psi \right\rangle, guaranteed to be either the +Z or +X eigenstate, and tasks the player to determine which state they have been given. Those familiar with quantum computing will recognize this as a relatively simple problem in state tomography. There are many viable strategies that could be employed to solve this task (and I am not even sure of the optimal one myself). However, by circumventing the need for a mathematical calculation, the Qubit Factory allows players to easily and quickly explore different approaches. Hopefully this could allow players to find effective strategies through trial-and-error, gaining some understanding of state tomography (and why it is challenging) in the process.

An example of a level in action! This level challenges the player to construct a circuit that can identify an unknown qubit state given several identical copies; a task in state tomography. The solution shown here uses a cascaded sequence of measurements, where the result of one measurement is used to control the axis of a subsequent measurement.

The Qubit Factory begins with levels covering the basics of qubits, gates and measurements. It later progresses to more advanced concepts like superpositions, basis changes and entangled states. Finally it culminates with levels based on introductory quantum protocols and algorithms (including quantum error correction, state tomography, super-dense coding, quantum repeaters, entanglement distillation and more). Even if you are familiar with the aforementioned material you should still be in for a substantial challenge, so please check it out if that sounds like your thing!

The Potential of Quantum Games

I believe that interactive games have great potential to provide new opportunities for people to better understand the quantum realm (a position shared by the IQIM, members of which have developed several projects in this area). As young children, playing is how we discover the world around us and build intuition for the rules that govern it. This is perhaps a significant reason why quantum mechanics is often a challenge for new students to learn; we don’t have direct experience or intuition with the quantum world in the same way that we do with the classical world. A quote from John Preskill puts it very succinctly:

“Perhaps kids who grow up playing quantum games will acquire a visceral understanding of quantum phenomena that our generation lacks.”


The Qubit Factory can be played at www.qubitfactory.io

Frozen children

Kids_watching_GlenA few weeks ago, my friend Amanda, an elementary school teacher who runs a children’s camp during the summer break, suggested that it could be fun for me to come into the camp one day and do some science demonstrations for the kids. I jumped at the opportunity, despite (or perhaps because of) the fact that I am a purely theoretical physicist and my day-to-day work only involves whiteboards and computers at Caltech. Most of the children attending the camp are relatively young (7-9 year-old kids) so, rather than setting out to give a science lesson, I viewed it as a chance to do some fun demonstrations and get these kids excited about science! Besides, I had an ulterior motive; it was a great excuse to acquire, and play with, liquid nitrogen (LN_2) from a Caltech lab (of which most of the IQIM labs have copious supplies). LN_2 is great for demonstrations; this stuff is awesome! At a temperature of -321^{\circ}\,F (for reference, the coldest temperature ever recorded on the surface of the Earth is -128.6^{\circ}\,F), it behaves in ways unlike anything that most people have ever seen. I convinced my friend Carmen, a postdoc in astronomy at Caltech, to come along and help out. Here, I thought I would share my experience, as well as some of the things I learned about handling LN_2.

Carmen watches on as I pour the liquid nitrogen into the beaker, which boils like crazy until the beaker is chilled. The white gas is actually water vapor condensing from the air; nitrogen gas is transparent (think of your ability to see through air). Note, also, my previous assistant in the background - science can be taxing to the body.

Carmen watches on as I pour the liquid nitrogen into the beaker, which boils like crazy until the beaker is chilled. The white gas is actually water vapor condensing from the air; nitrogen gas is transparent (think of your ability to see through air, which is mostly nitrogen gas).

DSC_0201

Liquid nitrogen volcano! All it takes is a little water added to the liquid nitrogen dewar.

Crime and punishment: As anyone who has seen Terminator 2 knows, objects that are pliable at room temperature become brittle and can shatter when reduced to cryogenic temperatures (including robotic assassins from the future). Thus I devoted a significant amount of the demonstration time to freezing and breaking everyday objects, including flowers and rubber toys. The flowers were particularly spectacular, shattering like glass into a multitude of pieces when struck against the table, providing a good deal of entertainment for the audience as well as myself. Hasta la vista, baby. I also froze several pennies, which then became brittle enough such that Carmen was able to shatter them with a few taps from a hammer. Incidentally, destroying US currency is illegal (which is why I had Carmen do it instead of doing it myself). I informed the children of this fact and asked who among them thought that Carmen should go to prison for her crime. A quick vote revealed that the majority of the children thought that she should be behind bars. Sorry Carmen, maybe the next field trip for the camp can be to visit you in prison?

DSC_0110

A flower, freshly pulled from the vat of liquid nitrogen, prepares to make the ultimate sacrifice in the name of science.

After having frozen a variety of objects, one of the children asked me whether you could freeze people with it. I told the kids that this is something that I always wanted to try, but that I had previously lacked a volunteer, to which an enthusiastic boy jumped up and responded, “freeze me, freeze me!” I asked whether he wanted to be frozen 5 years, 10 years, or longer? He said he would like to be frozen until the end of the world. One must admire his dedication! Before attempting to freeze him, I told him that it would be prudent for me to try it on something less likely to have litigious relatives. To this end a strawberry, a peach and a plum were submerged in LN_2, and then removed and allowed to slowly thaw. They ended up melting into gelatinous blobs; clearly some kinks in my cryogenic freezing and revival process need to be resolved before I graduate the approach to small children.
Continue reading