# Quantum computing for the qubit curious

## Quantum computers could change the world … apparently. It's a shame they’re so darn bewildering! In this primer, Cathal O'Connell decodes decoherence, unspins spin and positions you on superposition.

## What is quantum computing?

**Regular computers operate according to strict rules of logic**. But tiny quantum objects – such as electrons, or photons of light – can break those rules.

Quantum computing is the idea that we can use this quantum rule-breaking to process information in a new way—one that’s totally different from how regular computers work. This makes them, in some cases, exponentially faster than any regular computer.

For example, one quantum computer could easily crack the codes that keep internet banking secure.

## So, like a supercomputer?

Not exactly. A quantum computer is not just a “faster” computer. There are a few specific tasks – such as factoring very large numbers – which a quantum computer would be amazing at. (This is where the codebreaking comes in – see below.) But for most jobs, a quantum computer would be little better than a regular computer.

## So what could a quantum computer be used for?

They will probably be most useful for government agencies, research and development companies and universities in solving problems that current computers struggle with.

The first practical idea, proposed by the physicist Richard Feynman in 1981, was to use a quantum computer to simulate quantum mechanics. This would impact chemistry and biology. Chemists, for example, could accurately model drug interactions and biologists could study all the possible ways proteins can fold and interact with one another.

While quantum computers were once an academic curiosity, interest exploded in 1994 when the American mathematician Peter Shor found a way to use quantum computers to break codes.

Currently, many online security systems run on the principle that it’s next to impossible to take a very large number and figure out what its prime factors are. All a regular computer can do is try every possibility one after another – a task that could take billions of years. Using Shor’s algorithm, a quantum computer could perform the task in a few hours.

Quantum computers could also be fantastic at recognising patterns in data – useful for machine learning problems, such as being able to identify different objects in an image. They could be great at building models to predict the future, such as in long-term weather forecasting.

But ultimately, the uses of quantum computing are unpredictable. Consider that in 1943, Thomas Watson, the president of IBM said, “I think there is a world market for maybe five computers.” Now there are five in every household.

If precedent is any guide, we’ve yet to imagine what the uses of quantum computers will be.

## How does quantum computing work?

Regular computers are based on “bits” – imagine them as little switches pointing to either a 1 or a 0.

Quantum computing relies on quantum bits, or “qubits”, which can also represent a 0 or a 1. The crazy thing is, qubits can also achieve a mixed state, called a “superposition” where they are both 1 and 0 at the same time. This ambiguity – the ability to both “be” and “not be” – is key to the power of quantum computing.

## How does superposition help?

The difference between regular computers and quantum computers boils down to how they approach a problem.

A regular computer tries to solve a problem the same way you might try to escape a maze – by trying every possible corridor, turning back at dead ends, until you eventually find the way out. But superposition allows the quantum computer to try all the paths at once – in essence, finding the shortcut.

Two bits in your computer can be in four possible states (00, 01, 10, or 11), but only one of them at any time. This limits the computer to processing one input at a time (like trying one corridor in the maze).

In a quantum computer, two qubits can also represent the exact same four states (00, 01, 10, or 11). The difference is, because of superposition, the qubits can represent all four at the same time. That’s a bit like having four regular computers running side-by-side.

If you add more bits to a regular computer, it can still only deal with one state at a time. But as you add qubits, the power of your quantum computer grows exponentially. For the mathematically inclined, we can say that if you have “n” qubits, you can simultaneously represent 2^{n} states.)

It’s like that old fable about an ancient Indian, called Sessa, who invented the game of chess. The king was delighted with the game and asked Sessa to name his reward. Sessa humbly requested a single chessboard with one grain of wheat on the first square, two on the second, four on the third and so on. The king agreed at once, not realising he’d promised away more wheat than existed on Earth. That’s the power of exponential growth.

Just like each square doubled Sessa’s wheat, each additional qubit doubles the processing power. Three qubits gives you 2^{3}, which is eight states at the same time; four qubits give you 2^{4}, which is 16. And 64 qubits? They give you 2^{64}, which is 18,446,744,073,709,600,000 possibilities! That’s about one million terabytes worth.

While 64 regular bits can also represent this huge number (2^{64}) of states, it can only represent one one at a time. To cycle through all these combinations, at two billion per second (which is a typical speed for a modern PC), would take about 400 years.

All this means quantum computers could tackle problems which are “practically impossible” for classical computers.

But to get that exponential speed-up, the fate of all the qubits has to be linked together in a process called quantum entanglement. This weird phenomenon, which Einstein called “spooky action at a distance”, can connect quantum particles even if they are at opposite ends of the universe.

## What makes a qubit?

To make a qubit, you need an object that can attain a state of quantum superposition between two states.

An atomic nucleus is one kind of qubit. The direction of its magnetic moment (it’s “spin”) can point in different directions, say up or down with respect to a magnetic field.

The challenge is in placing and then addressing that single atom.

An Australian team led by Michelle Simmons at the University of New South Wales, has made atomic qubits by placing a single phosphorus atom at a known position inside a silicon crystal.

Another idea is to strip an electron off the atom and turn it into an ion. Then you can use electromagnetic fields to suspend the ion in free space, firing lasers at it to change its state. This makes for a “trapped ion” quantum computer like one being developed at MIT.

A current in a loop of superconducting metal can also be in a superposition (between clockwise and anticlockwise), a bit like a little treadmill running forwards and backwards at the same time. The Canadian company D-WAVE bases its quantum computing technology on these so called flux qubits. Its customers include Lockheed Martin, NASA and Google.

A photon of light can be in superposition in the direction it’s waving. Some groups, such as at the University of Bristol in the UK, have been assembling quantum circuits by sending photons around a maze of optical fibres and mirrors.

## How do you create the superposition?

Have you ever tried to balance a coin exactly on its edge? That’s what programming a qubit is like. It involves doing something to a qubit so that, in a sense, it ends up “balanced” between states.

In the case of the atomic nucleus, this might be through zapping it with an electric or magnetic field, leaving is with an equal probability of spinning one way or the other.

## So how do you read information from the qubits?

There’s an aura of the mystical about what goes on during a quantum computation. The more way-out physicists describe the qubits as engaging in a sort-of quantum séance with parallel worlds to divine the answer.

But it’s not magic, it’s just quantum mechanics.

Say you’ve got your new 64-qubit quantum computer up and running for its first computation. You place all 64 qubits in superposition, just like 64 coins all balanced on edge. Together, they hold 264 possible states in limbo. You know one of these states represents the right answer. But which one?

The problem is, reading the qubits causes the superposition to collapse – like banging your fist on the table with all those balanced coins.

Here’s where a quantum algorithm like Shor’s comes in handy. It loads the qubits to make them more likely to fall on the correct side, and give us the right answer.

## I still don’t get it. How do the qubits factor the number? Where’s the rest of the computation?

We’ll admit we’re skimping on the details here. For more detailed information try: http://michaelnielsen.org/blog/quantum-computing-for-the-determined/

One take-home message is that a quantum computer is not entirely “quantum” – it still needs a bunch of electronics to do most of the basic work.

## Have any quantum computers been built yet?

Probably not. The work is very much at the research stage, and scientists tend to rave about the assembly of a handful of qubits. In June 2016, for example, Nature magazine celebrated a nine qubits computer developed by Google researchers.

Way out ahead of the pack is D-Wave, which claims to have built a large-scale quantum computer with up to 1,024 superconducting loops as qubits. The system seems to do a good job at optimisation problems, such as scheduling airline routes to maximise profit from a limited fleet. Most physicists are sceptical that D-Wave has built a true quantum computer, however.

## What’s stopping us? Why is it so difficult to build a quantum computer?

Although we know in theory what a quantum computer could look like, there are challenges at every level, from assembling qubits, to reading and writing information on them, to shuttling information back and forth without it disappearing in a puff of uncertainty.

A qubit is the ultimate diva. While a Hollywood starlet might demand a gigantic dressing room and a bath full of rose petals, a qubit demands perfect isolation and a thermostat set at one hundredth of a degree above absolute zero. The slightest vibration from a nearby atom can cause a qubit to throw a quantum tantrum, and lose its superposition.

The overriding difficulty is how to maintain the delicate states of superposition and entanglement long enough to run a calculation – the so-called coherence time.

The truth is we don’t know how long it will take to build the quantum diva’s dressing room, or if it’s even possible. Despite this daunting challenge, the race to build the first practical quantum computer has become one of the grand scientific challenges of our time – involving thousands of physicists and engineers at dozens of research institutes scattered around the globe.

This article appeared in Cosmos 74 - Autumn 2017 under the headline "What is quantum computing?"

*Cathal O'Connell is a science writer based in Melbourne.*

- https://cosmosmagazine.com/physics/quantum-physics-terminally-confused
- https://cosmosmagazine.com/physics/will-quantum-computer-take-down-internet-banking
- https://cosmosmagazine.com/physics/quantum-physics-terminally-confused
- https://cosmosmagazine.com/physics/quantum-physics-terminally-confused
- http://news.mit.edu/2016/quantum-computer-end-encryption-schemes-0303
- https://cosmosmagazine.com/physics/quantum-computing-yes-no-and-maybe
- https://cosmosmagazine.com/technology/driving-quantum-data-bus
- http://michaelnielsen.org/blog/quantum-computing-for-the-determined/