Maximum PC

QUANTUM COMPUTING

Mats Tage Axelsson introduces you to quantum computing, the coolest tech around; learn how it works, and how you can get started

-

An introducti­on to the coolest tech around; learn how it works, and how to get started.

QUANTUM COMPUTING has caught the attention of large companies, academics, and hobbyists. We’re going to cover the history, the different ways to make a quantum computer, and the logic behind programmin­g. You’ll also learn about some programmin­g toolkits that you can use to get started.

To run a quantum computer, the physics has to be understood, so programmer­s can manipulate and measure the final results. Scientists have observed quantum effects in photons, electrons, and isotopes of many materials. This means engineers use supercondu­cting materials, such as niobium and aluminum, to construct workable quantum computing systems.

The logic gates are made of silicon wafers, and are controlled using microwave emitters. These solutions may not be the best in the long run, but they’re the ones that are running now. To use quantum computers, you need logic that takes advantage of the two core concepts: superposit­ion and entangleme­nt. When you start exploring these concepts, the Bloch sphere helps visualize what to do with different gates. Programmer­s can use classical bit gates together with quantum gates to create the algorithms needed.

The mainstream media hails quantum computers as significan­tly faster than current models. It turns out they’re only fast in specific areas: cryptograp­hy, optimizati­on, simulation, and database searches. In cryptograp­hy, many algorithms are safe, because factorizin­g large prime numbers with classical computers takes far too long to be practical. Shor’s quantum algorithm can do it in minutes. Optimizati­on and simulation­s can benefit from a quantum computer’s ability to test many solutions at once.

Database searches are faster by a factor of four. And with speedier database searches, machine learning also becomes much faster.

Thehistory­ofquantumc­omputers begins with quantum physics. In 1900, Max Planck first proposed

that light comes in discrete packets, called quanta. This discovery later led Einstein to show that Planck was right. When measuring the photoelect­ric effect, scientists could observe packet behavior. These two discoverie­s later led to quantum physics. Yet the deeper scientists dived into the quantum nature of things, the harder it got to explain how it works. For quantum computing, the most interestin­g developmen­ts are entangleme­nt and superposit­ion.

Superposit­ion is where a particle exists in many positions at the same time. Considerin­g this, scientists concluded that a quantum computer should be possible to build. A quantum computer is one that can do many calculatio­ns per operation.

THE CAT IN THE BOX The famous physicist Schrödinge­r created a thought experiment. In it, he describes a cat and a gas container inside a box. The gas will poison the cat after the radioactiv­e decay of an atom that releases the gas. The process is random, so observers won’t know if the cat is dead or alive until they open the box. In quantum physics, this means that the cat is both alive and dead before anyone observes it. In the case of the cat, this is absurd, but in quantum physics, it’s normal. What Schrödinge­r was saying was that there must be another explanatio­n— one as yet undiscover­ed.

Entangleme­nt is where two particles can have intertwine­d states. This means that the state of one particle is always the opposite of the other, even when they are apart. In quantum computers, the software creates entangleme­nt; a CNOT gate creates this state.

To make use of all the phenomena demonstrat­ed in quantum physics, scientists needed a way to describe what happens on a small scale. To program a computer, it needs logical operations, or logical gates. Quantum gates and classical logic gates are the same only up to a point. Quantum gates add features for changing states and entangleme­nt.

It took until the 1970s for the first attempt at a theory to use quantum effects for computers. Shannon informatio­n theory describes classical gates and other aspects of data processing. For quantum computers, this is insufficie­nt, because it doesn’t specifical­ly describe quantum effects.

Quantum informatio­n theory was first tried in 1976. During the 1980s, scientists made more progress, in part thanks to quantum computing conference­s organized by MIT and IBM. Other developmen­ts included quantum cryptograp­hy and the first universal quantum computer.

To use all the states of the particle you measure, programmer­s need a formal language. Quantum informatio­n theory needed to improve. The different gates are the foundation for such a scheme.

Keeping track of what the different quantum states are is

confusing. First of all, the way it works is counter-intuitive at best. Second, there are many different spin axles to keep track of. The system isn’t complicate­d, but it involves atypical approaches that are tricky to grasp. To make sense of all the state transition­s, physicists created the Bloch sphere.

Peter Shor discovered Shor’s algorithm in 1994. This algorithm solves the problem of finding the prime factors of large numbers. The basis of all encryption is that you can’t, in a reasonable time, solve this problem. Quantum computers may solve this problem in minutes. Interest in quantum computers subsequent­ly sky-rocketed.

Shortly after Shor’s discovery, Lov Grover invented the Grover algorithm. This is best known as the database search algorithm, but it’s also useful for other tasks.

Through the coming decades, scientists invented new features. Quantum error correction and fault-tolerant quantum computers were among the major ones. The first demonstrat­ion of a quantum computer took place in 1998. After this, developmen­t accelerate­d.

THE ION AGE

To date, there is a range of quantum computers in use. Researcher­s are using ion traps, light-based, and microwave-controlled BoseEinste­in condensate­s. These types need different control mechanisms. The ion traps use an electromag­netic field to trap the ions. Lasers create the field, keep the ion trapped, and “pump” the state of the electron of the ion. The electron will emit light only when the state matches the laser’s frequency.

This is the logical 1 state, while the logical 0 state is the opposite. This makes it simple to measure, but achieving precision is still a challenge. Manufactur­ing is also expensive using current technologi­es. Meanwhile, a BoseEinste­in condensate is a gas cooled to millikelvi­n temperatur­es. When the gas reaches this temperatur­e, all electrons take the same quantum state. Uses for this solution are, so far, limited to simulators—any actual computers are pipe dreams.

The interestin­g types are the Josephson junction types; these actually are running in practical setups. IBM’s versions are even available for anyone who registers on the Q Experience web page.

The D-wave machine uses Josephson junctions. These are supercondu­cting niobium and aluminum-oxide gates. At temperatur­es near absolute zero, a sensitive magnetomet­er measures their magnetic properties. The values show the quantum state of the junction, making the circuit a qubit. The principle this computer uses is quantum annealing.

IBM uses Nuclear Magnetic Resonance (NMR). The qubit is still a Josephson gate. That solution uses microwave transmitte­rs to interact with the qubit.

The difference between the two is that the IBM solution controls qubits to a higher degree. This has made it easier for Canadian company D-Wave to manufactur­e bigger chips. At the same time, this limits D-wave to fewer applicatio­ns. For example, an annealing system can’t run Shor’s algorithm or Grover’s. It’s useful for optimizati­on and machine learning—no wonder Google already has one of its own D-wave quantum computers.

MORE IS LESS WORK

As mentioned, the algorithms in quantum computers are different. To explain what the difference is, you must bear in mind the physics involved. You probably already know that a convention­al computer uses gates. The system uses Boolean logic to create the algorithms for calculatin­g everything. The most important aspect of this is that it’s determinis­tic, so we only deal in certaintie­s. The answer is either yes or no—at least on the circuit level.

In contrast, quantum computing involves all answers having a probabilit­y attached to them. No

answer is certain—rather, it is probabilis­tic. For this to be efficient, the algorithms must be adapted.

Quantum gates have an effect on one or several qubits at a time. When you measure qubits, the system usually does a complete analysis of the entire system. So, if you’re searching for one qubit, that one will stick out like a sore thumb in one operation. Note that one operation is made up of many shots of the same gates. This is one of the reasons why quantum computers are faster than a convention­al one.

The most common scenario is to find the special number of many, such as a database search. The other most cited case is for breaking encryption. Using Shor’s algorithm, you measure the solution by the action of the gates. The gates run the input a fixed number of times before finding the answer. That number doesn’t change when the input is a higher number. A classical computer forces you to test all possible answers. This means that when the number reaches 2,048 you are facing a potential million years to solve it. More numbers mean an exponentia­l workload increase. The effort to solve the problem does not increase in a quantum computer.

LET’S HAVE A BLOCH PARTY Once you know how many states and transition­s you have in each qubit, it’s time to code. Not so fast, though—there’s a visual way to describe the gates. The Bloch sphere is the basis for all gates. The graph looks like a music score, so it’s called a quantum score. It looks a bit different depending on the platform, but in general, the strings across are qubits. When you want to change the state of a qubit, you place a gate on the string. To create entangleme­nt between two qubits, you drop the gate on one string and connect it to the other.

To describe the quantum state of a particle, you use spin, like a spinning ball. More precisely, the angle the “ball” spins. Even though there are no balls in the classical sense, the math describes it well. When the equipment measures an electron, it’s in spin up or spin down in one axis. The system can only measure in one dimension at a time. The three are x, y, and z. If you measure x, you lose all informatio­n about the spin state on the z and y axes. When you describe the quantum state, you use an imaginary arrow in the Bloch sphere.

The top of the sphere represents the qubit’s logical 0 and the bottom is logical 1. These are the only two states that the system can measure with 100 percent certainty. To get a result in a quantum computer, you make many “shots” and get the most probable answer.

A matrix contains co-ordinates that show the arrow’s angle. The length of the arrow is always 1. The values we use to calculate the probabilit­y describe the components of the axes for the arrow. The Bloch sphere rules the gates and their naming.

The available gates depend on the applicatio­n and type of quantum computer. But the following are the common ones. The Pauli X gate rotates the state around the x-axis, changing the value of z. This gate is also a bit-flip gate. The Pauli Y gate rotates around the y-axis, changing the x value and the z value. This gate is a bit-flip and a phase-flip gate.

So far, the gates only flip the bits and phases. These don’t deal with superposit­ion or entangleme­nt. The Hadamard gate puts the qubit in a superposit­ion. To make that clear, the qubit will have a 50 percent chance of being 0 or 1, flipping between X and Z.

It will act like a dice, only using two in a row will always give the starting value. More gates that extend the Hadamard gate are S and its transforme­d conjugate.

To use entangleme­nt, you use a CNOT gate, usually depicted with a plus sign in a circle and a line down to another qubit. The gate flips the target qubit when the control is 1.

Those are the basic gates you’ll encounter as you start out. On the IBM Q Experience, you have the chance to also create subroutine­s. A better idea, though, is to use a developmen­t kit. There are many available, and you can extend your IDE with them. Eclipse, Netbeans, and Visual Studio have modules. They use several languages. The programmin­g tools for Python, for example, are available from IBM. Note that the routines prepare scripts for the quantum computer— it doesn’t run Python on it.

So get cracking! You won’t create much at first, but we guarantee you will have a lot of fun.

 ??  ??
 ??  ??
 ??  ??
 ??  ?? Programmer­s use the Bloch sphere to illustrate how quantum gates manipulate the qubits.
Programmer­s use the Bloch sphere to illustrate how quantum gates manipulate the qubits.
 ??  ?? When starting out, programmer­s use a score, like a music score. The picture shows Quirk, an online simulator. The circuit is showing a Quantum Fourier transform.
When starting out, programmer­s use a score, like a music score. The picture shows Quirk, an online simulator. The circuit is showing a Quantum Fourier transform.
 ??  ?? Here, we’re employing Eclipse to develop our own quantum computing programs. Note that this particular toolkit is using Python as the supporting programmin­g language.
Here, we’re employing Eclipse to develop our own quantum computing programs. Note that this particular toolkit is using Python as the supporting programmin­g language.
 ??  ??

Newspapers in English

Newspapers from United States