# The 5-bit era of Quantum Computers

## Not quite capable of quantum Zelda, but still worth a play

Quantum computing took a big step last year. A processor with five quantum bits was made and offered up to the cloud. Rather than just hearing about these devices, finally we can do something with one.

But what can we do? Some quantum theorists, like me, have been among the first to jump on the bandwagon. Stuck in my ivory tower, I haven’t done anything hands on since undergraduate. The opportunity to actually *do* something for once was a chance I couldn’t miss.

What I did, in the plain machine language of quantum computation is shown in the image above. This tells you everything about what I did, but nothing about why I did it. What program is this tiny computer running? More importantly, what problem is it trying to solve?

There’s a few ways to tell that story. My favourite is to say that I simulated a universe with different laws of physics than our own. I took the exotic particles that arise therein and made them dance for me. And when the dance was done, I looked to see what magic had occurred.

But you aren’t here to read about magic and fairies. You’re here to read about technology. For that story we’ll need to look at what a quantum computer is, and what we still need to do to make one.

A machine that can do maths sounds like science fiction. Or it would do if they weren’t so ubiquitous. How did we manage to make these piles of thinking rocks?

We did it by starting small. We broke maths down into its simplest units: tiny problems that use no more than two bits. We call them *logic gates*. Then we found actual physical things that can solve these problems. Things that can bring logic gates into reality. Things like transistors. Though they are little more than spiced silicon sandwiches, they became the magic rocks that changed the world.

But let’s change the world a bit more. Splitting the atom launched the atomic age. What age will dawn if we split the atoms of mathematics? Can we crack open logic gates to get an explosion of computational power?

Two of the basic chunks of maths are the NOT and the AND. Everything can be built from these, from Facebook to Mariokart. So what if we were allowed to do half an AND, or a quarter of a NOT? What if we could find our way to do any fraction that we wanted? Perhaps we could find a way to compile our programs more efficiently. Something that takes the age of the universe to run now might be doable in an afternoon.

The problem is error correction. Suppose we wanted to do 0.013782 of a NOT, but instead did 0.013782001. The latter is a perfectly acceptable thing to do. The computer has no way to know that it’s not exactly what we intended. So the error will persist. As other errors come, the computation will be garbled beyond usefulness.

This would be a type of analog computer. It is not a very typical type, but it still shows us why analog computers are not what we use to browse the internet. They offer so much, but the imperfection of the universe doesn’t allow them to deliver.

What we need is something with the robustness of a binary computer, but the power of an analog one. We need something that is both discreet and continuous.

This sounds like something physically impossible. But sometimes physics gives us the impossible anyway. We’ve know this since J. J. Thomson showed that the electron was a particle, and then his son George showed it was a wave. Surprisingly, both were correct. A beam of electrons behaves as a bunch of particles in some situations and as a continuous wave in others. For particles that obey quantum mechanics, nothing is certain except uncertainty.

For a physicist, it is always great to discover examples of strange new behaviour like this. They provide fresh glimpses into how the universe really works. But they also provide us with new opportunities for technology. That’s what we are interested in with this example. Can we harness the wave-particle duality of quantum mechanics to make a computer that’s neither digital nor analog? It seems we can, and we call them *Quantum Computers*.

Quantum computers need quantum bits. Or qubits, as we like to call them. Their discrete nature as bits emerges whenever we look at them. There can only be two possible outcomes: 0 or 1. Their continuous nature comes when we aren’t looking. Then they may be any one of an infinite number of superpositions: many different ways of being both 0 and 1 at once.

So what would half a NOT look like for quits? A NOT gate rotates a bit from 0 to 1. Half a NOT would take us halfway, ending up in one of the superpositions. Looking at the qubit would then force it to choose either way. If it chose 0, it would be as if nothing had happened. If it chose 1, it would be as if a full NOT had been done.

That makes half a NOT on average, but not in a very interesting way. We would be better off not measuring, and doing something like an AND gate instead. This acts on multiple qubits, spreading the quantumness around. It creates entanglement, which can be a very powerful resource. Do enough of this kind of thing and we’d have our quantum computer: digital and analog all at once.

It’s a great idea in theory, but not so straightforward in practice. It’s not only us that strips away the quantumness by looking at the qubits. So does everything else. Just getting bashed by nearby atoms or feeling the Earth’s magnetic field will drain our qubits of their magic.

The solution is quantum error correction. This needs a vast array of qubits arrayed on a lattice. Each constantly talks with its neighbours. They look for signs that something has gone wrong, and tell us if it has. They also spread out information so it can’t be detected by a stray glance.

This spreading out of information gives quantum computers a unique structure. The bits of information we feed in as input don’t just sit in single qubits. Instead, many qubits from a large area will work together to store and hide it.

This gives us two types of qubit we have to worry about. There are the actual *physical qubits*, which sit in the real world on some chip. Then there are *logical qubits*, which represent the information being processed in the computer. Though we could store a single physical qubit on a logical qubit, it would be quite noisy. So each logical qubit is spread out over many physical qubits to keep it safe.

To process the information we must to act on a similarly large scale. We have to stir up the sea of qubits. By making waves and whirlpools, we can slosh the information around. And that sloshing can do all kinds of gates.

This is admittedly a bit of a hand-waving explanation. But there are many possible ways to make these qubit seas. Some have proposed spreading the qubits out on a flat surface. Some want to wrap them around a donut. Others want to pack them into a 3D lattice. Some methods would be highly powerful but woefully impractical. Others would have the opposite problem. We don’t yet know which option is best. And for each type of qubit sea, there are also disagreements on the best way to to slosh the information around. Until we know will one will win, there’s no sense in me giving you the exploded view.

Even so, a consensus is starting to emerge. At least among those actually building things. The so-called surface codes seem to be a great way to detect and correct errors. These are made by spreading out your qubits on a 2D lattice. A square lattice would the simplest version, with a qubit sitting on each vertex. Each square of the lattice is then made into little quantum neighborhood watch society. We make the qubits in each compare notes with each other and tell us if anything isn’t as it should be.

Now you know enough to understand what’s going on with actually building these devices. So let’s dive in to that.

The current leaders of the quantum arms race are IBM and Google. They favour the idea that superconducting circuits are the best magic rocks to make quantum bits.

To try and prove this, their first task is to get the surface code up and running. They are currently testing out all the methods needed to keep the qubits on the lookout for noise.

The first major breakthrough was published by Nature in 2015. The group of John Martinis at Google strung out nine qubits in a line. Each collaborated with its neighbours to look for a certain type of error. A single logical bit of information was smeared across the line to help keep it safe from these errors. And it worked! The bit was stored more safely than if it just sat in a single physical qubit.

But the story doesn’t end there. Google’s search only yielded on type of error. If you want to smear out and protect a logical qubit’s worth of information, rather than just a boring old bit, there are more types of error to deal with.

The group of Jerry Chow at IBM made a major step towards this around the same time. In their experiment, published by Nature Communications, they made a four qubit slice of surface code. This was enough to show that all the kinds of error can be detected. But it was too small to actually hold any information for the errors to disturb.

With the work from these groups, and many more, superconducting qubits are steaming ahead. But there are others in the race. Spin qubits are my favourite. They are building towards becoming the tortoise to the superconducting hare.

These experiments, like many others start by describing the big quantum computer they’d like to build. They describe the vastness of the fault-tolerant sea of qubits. Then they point out the little slice that they can actually do, and do it.

This is the era we are currently in with quantum computing. So when I had the chance to play with IBM’s new 5 qubit device, I could start looking for interesting 5 qubit slices of my own grand plans.

My plan concerns matching codes, a variant of the surface code. They use a big grid like this, but repeated over and over to stretch as far as the eye can see.

The orange qubits are leaders of the Neighbourhood’s Watch for each hexagon. They are constantly talking to the black qubits that surround them to see if everything is fine. If the trace of an error is detected, the orange qubits will let us know.

The blue ones do a similar job, but each of those only has a pair of qubits to talk to. Nevertheless, if something goes wrong in the relationships between these pairs, the blue qubits tell us. The red and green ones are currently unemployed.

The black qubits are all kept very busy. They have three orange qubits to deal with, one for each of the three nearby hexagons. They also have one blue couple’s counsellor to keep checking in with. They don’t have a lot of time for helping us store a logical qubit.

To deal with this, let’s get a blue qubit to stop working.

The light blue qubit is now no longer checking up on its neighbours. Those neighbours, now marked in grey, no longer need to have the relationship that their blue qubit demanded. Though they are not entirely free, there are now two types of relationship they are allowed to have. Let’s unimaginatively label these two types 0 and 1. If we tell these qubits which to choose, we can store a bit. In fact, we can store a logical qubit.

Now let’s get another blue to retire, and hire a red instead.

The top grey qubit from before enters a new marriage, but his new partner’s ex has become single. This spreads out our logical qubit of information. It is now stored on the two grey qubits as well as their exes. Messing around with more couples will spread it out even further.

Here we messed with our sea of qubits, making patches of grey in a sea of colour. By messing with them even more, we can move them anywhere we like.

For each pair of these grey patches there is a logical qubit. It is spread out over the whole distance between them. The further we move them apart, the more they become protected against noise.

By making more pairs we get more logical qubits. Logic gates can be done my moving the patches around each other. Their dances allow them to interact in ways impossible for particles in our own universe. They start to behave like exotic particles that could only arise in 2D universes. Particles called Majoranas.

The simplest dance of two Majoranas is to take two pairs, each of which store a logical qubit. We then swap a Majorana from one pair with one from the other. This has the effect of doing half a NOT on each of the logical qubits. For this we only need a tiny slice of the lattice. The manipulations we need to make can be restricted to just a five qubit junction.

With these five qubits, we can dance impossible particles. With these five qubits we can manipulate two logical ones. With these five qubits we can show that the basic techniques of quantum computation are possible.

This is what my theory says should happen, anyway. So to test my prediction I ran the process many times and made a whole bunch of measurements. Once the data was analyzed, I found that the process worked just as it should.

It was noisy, of course. Five qubits is not enough to do error correction at the same time. But the signature of the Majoranas was nevertheless clear.

Now its time to move beyond small slices of big things. It’s not enough to show we can do each task required for quantum computation. We have to show we can do them all at the same time.

The next era will move on to small versions of big things instead. We’ll need to show that a logical qubit can indeed be better protected when spread across many physical qubits rather than just stored in one. That will require the smallest surface code, which will look something like this.

With 17 qubits, this is more of a qubit puddle than a qubit sea. But since we are still trekking across the desert, it will be a welcome result.

Progress like this is coming soon. Quantum computation is getting closer. And through IBM’s quantum experience, as well as multiple citizen science projects, you can get involved.