The Mathematica Journal
Feature Articles
New Products
New Publications
News Bulletins
Write Us
About the Journal
Staff and Contributors
Back Issues
Download this Issue

Simulating the Qubit

It turns out that a few years after the appearance of the DiVincenzo article, Gershenfeld and Chuang [4] used nuclear magnetic resonance to make a coffee-cup-sized quantum computer. The and states are represented by the upward and downward spin of the electrons respectively. It is a truly exciting contraption, getting us closer to a practical realization all of the time. Unfortunately, we are still going to have to wait a little bit for the real thing to make it into our personal digital assistants, but that does not mean we cannot get started using the tried and true concept of the simulator.

The SENKO Quantum Computer Simulator

The SENKO Corporation has produced a very novel cross-platform quantum computing simulator for Macintosh and Windows. It has a straightforward user interface that allows you to easily map out your quantum circuits and run them. It has a complete set of gates including various flavors of conditional NOTs, swap, exponentiation, discrete Fourier transform, observation, and arbitrary gates. If you have enough memory you can have 32 qubits (remember, that is [Graphics:../Images/index_gr_45.gif] billion possible states so we are talking some serious RAM requirements). The process is reasonably simple, you set up your quantum circuitry, set the initial state of the qubits, and start the simulation. At the end of the execution the various possible states of the qubits are available along with their respective probabilities, and complex coefficients.


Figure 3. Two windows from the SENKO Quantum Computer Simulator. On the left, the actual configuration of quantum gates and input qubits and on the right the configuration of the qubits and their associated probabilities after the simulation has been run.

Most important to Mathematica users is the ability to import and export arbitrary gates via MathLink. Custom gates can be easily imported via the ImportMatrixFromMathematica[] command (the semantics of the command names are a little confusing, since you are actually exporting it from the program you are typing the command into). For example, we can create a controlled NOT manually and import it using the following.



Figure 4. A custom gate, imported from Mathematica.

The resulting gate appears in the simulator for further manipulation. Symmetrically, you can export a given matrix back to Mathematica for further manipulation. Here we export a [Graphics:../Images/index_gr_50.gif] gate from one of the quantum simulations we tried out.


All in all the quantum computer simulator is quite a nice tool for experimenting with various algorithms. If you want to play around with this future potential technology and you do not have an extra NSF grant lying around to get started on building one, this is the best way to go.

Mathematica Implementations

Paul Dumais of Université du Montréal has written a publicly available package called QuCalc [5] that is available as part of this issue's supplemental materials. QuCalc contains a wide array of quantum operators and data representations that are all manipulatable directly in Mathematica. What it lacks in terms of the drag-and-drop front end of the SENKO simulator it makes up for in completeness.

For example, here is a quantum teleportation gate array as defined in QuCalc.


If you are feeling particularly saucy you can import that matrix into the SENKO simulator for further processing and graphical manipulation.


Converted by Mathematica      

[Article Index] [Prev Page][Next Page]