How to Simulate a Quantum Computer

Start Quantum Programming With a Haskell Module

© Mark Alexander Bain

Sep 4, 2009
How to Simulate a Quantum Computer, Mark Alexander Bain
Quantum computers will soon replace existing ones. However, the programmer can start using a quantum computer simulator today.

James Woodward reports in The Scotsman that a team of Bristol University scientists are claiming the worlds first optical quantum chip. Cherry Lewis, the project spokesperson, said: "We are almost getting to the point now where conventional computers cannot go any smaller so we need to go down a completely new route. We are talking nano-scale. Particles of light." This may mean that in the near future computers (an their users) will be able to benefit from concepts such as:

  • qubits - these are the equivalent of bits in traditional computing, but may have more than two states at the same time
  • quantum parallelism - the ability of a quantum computer with a single processor to carry out parallel operations
  • quantum superposition - any object can be in every possible state simultaneously
  • quantum entanglement – particles are able to interact with each other regardless of the distance between them
  • quantum registers – controlled groups of qubits

Of course, it may be a little while until any of these are actually on the market, but what any programmer can obtain is a quantum computer simulator

Obtaining A Quantum Computer Simulator

Fortunately obtaining a quantum computer simulator is not that difficult. There are just two steps:

Both modules must be downloaded into the same directory, although that directory can be anywhere on the computer.

Starting the Quantum Computer Simulator

The programmer starts the quantum computer simulator by double clicking on the Quantum Computer Haskell source file (as shown in figure 1 at the bottom of this article).

Simple Quantum Computations

Skibinski gives some simple examples of how the quantum computer can be used. For example the programmer can create a quantum register containing 5 qubits all initialized to state | 0 >:

zeroRegister 5

The programmer can then see an example of quantum superposition can then by using the mix function:

mix (zeroRegister 5)

The result of this can be seen in figure 2.

A quantum computer simulator cannot, of course, truly replicate the performance that a real quantum computer will be able to achieve. It hasn't got the hardware. However, the programmer will be able to start to understand the concepts involved. And at least they'll have a bit of a head start when they do get their first quantum computer from Ebay.

BNC101


The copyright of the article How to Simulate a Quantum Computer in Computer Programming Languages is owned by Mark Alexander Bain. Permission to republish How to Simulate a Quantum Computer in print or online must be granted by the author in writing.


How to Simulate a Quantum Computer, Mark Alexander Bain
Figure 1: Starting the Quantum Computer Simulator, Mark Alexander Bain
Figure 2: Quantum Superposition, Mark Alexander Bain
   


Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo