Simulating a Quantum ComputerToby HowardThis article first appeared in Personal Computer World magazine, May 1999. IT'S MORE THAN A DECADE since David Deutsch of Oxford University proved that it's possible to build a machine that uses quantum mechanics to perform computations. Such a machine would be a supercomputer beyond our wildest dreams, performing an unimaginable number of calculations in parallel, and in the blink of an eye. Now, a consortium of amateur enthusiasts is trying to create a software simulation of a quantum computer. Their program will be freely available and Open Source, enabling you to experiment with quantum computation on your desktop. Quantum mechanics is weird. In fact it's about as weird as you can get and still stay within the realms of science. As Nobel-prizewinning physicist Neils Bohr once said, anyone who is not shocked by quantum theory does not understand it. Like a conventional computer, a quantum computer works by manipulating data represented by bits. In a conventional computer a bit is represented by a circuit whose state, such as its voltage, encodes either a 0 or a 1 – there's no in-between. But in a quantum computer, a bit is represented by an individual particle, such as an electron, and things are very different indeed. Suppose you adopt the convention that an electron spinning clockwise represents a 0, and spinning anticlockwise represents a 1. So at any time, it would be reasonable to assume that the particle represents a 0 or a 1. Wrong! You can only say that if you actually measure its spin. Before you take a measurement, the particle is in a strange indeterminate state – called a "superposition". In some unfathomable sense, the particle is spinning both clockwise and anticlockwise at the same time. It sounds ludicrous, but that's what happens. The relevance to computing is that a bit in the quantum world – a "qubit" – can be a 0 and a 1 simultaneously. And that's where the fun starts. The amazing power of the quantum computer stems from the fact that if you have a collection of qubits – a register – in which each qubit is in an indeterminate state, then the register effectively represents all possible numbers at once. If you then perform a single computation on the register, the computation works on every possible number, simultaneously. David Deutsch explains the process using the idea of parallel universes – although we see only the single register in our universe, it actually exists in many other universes too, one for each of its possible states. By operating on the register in our universe, we kick off computations in all the other unseen universes, and then magically retrieve the answer. Until now, research into quantum computing has been confined to experts in the field – the mathematics is fearsome, and few physicists have access to the specialised equipment necessary to conduct experiments. But Yan Pritzker is a young US computer enthusiast who wants to change all that. He's organised the OpenQubit project to mobilise everyone interested in quantum computing. There are already over 100 people signed up, and anyone with an interest in the topic is welcome. OpenQubit's first project, being run as a collaborative effort across the Web, is to produce a C++ simulation of a quantum computer, which will run on a conventional machine. Once the simulation program is complete, it will be possible to research how to write programs to run on a real quantum machine. It's an exciting field. Noone knows whether the quantum computer will become a workable machine. In a recent lively debate in the on-line magazine SlashDot ("news for nerds, stuff that matters") all shades of opinion were on display, from "this is cool!" to "stop living in lala-land with leprechauns and fairies". One thing's for sure: if a quantum computer is ever built, we'll get the best of all possible worlds. Toby Howard teaches at the University of Manchester. |