Quantum Computer Emulator (QCE)
Help

QCE (Version 10.11)

This is the final version of QCE. If you find bugs please let us know and we will fix them. For a summary of changes see History.

A detailed account of how QCE works and some examples can be found in our Computer Physics Communication paper (Comp. Phys. Comm. 132, 94 (2000)). See the "DOC" subdirectory for this paper (qce1.pdf) and other .pdf files that contain descriptions of other examples. A much more detailed description of the examples included in the QCE software distribution can be found in qceman.pdf . A long write up on the algorithms used to simulate models for quantum computers can be found in revqcs3.pdf.


Installation (Windows 98/NT4.0/2000/Me/(XP+SP1)/Win7 only)

Do not run INST-QCE.EXE on a Windows 95 system: You may (and probably will) have to reinstall Windows 95.

To install QCE: Run (double-click on) the installation file INST-QCE.EXE . Respond to the questions asked.

In case of problems send e-mail to h.a.de.raedtatrug.nl.

QCE interprets  floating point numbers according to the Window's Regional Settings. Make sure that Regional Settings is set to English (United States) or use the Control Panel/Regional Settings to change the number format (decimal symbol "." , etc.) such that it matches the one used in science.

Here is a snapshot of the Windows 7 screen that shows where to make these changes:

Customize format screen

Note about .ocx files: If "missing file" messages appear during startup, the following may help

  1. Check that the .ocx files are in the same directory as QCE.EXE.
    If they are not, copy all .ocx files and the .dll files that are in subdirectory DLL to the directory where QCE.EXE resides.
    The directory should like this

    QCE directory

  2. Then run QCE.EXE as administrator. This will register the .ocx files etc.
  3. Assuming step 2, works you will see the QCE window. The next time you run QCE, it should not be necessary to run it as administrator.

An uninstall procedure is included.

Note: If you choose to let the QCE installation procedure replace an older QCE version, only files that are part of the installation will be replaced. No files will be deleted.

Animation feature

QCE version 5 and higher has an option to animate qubits in real time. This option requires that Microsoft DirectX7/DirectX8 is installed on your system. Currently Microsoft only supports DirectX7 under Windows 98 (not under NT4) and Windows 2000. The latter has DirectX7 build in. If QCE cannot find DirectX7 support on your machine it will disable the real-time animation feature. 

QCE works with  DirectX7 as well as DirectX8. If your system already has DirectX7 there is no need to install DirectX7. If you don't have DirectX7 and you want to use the animation feature you may as well install DirectX8. DirectX8 can be downloaded from Microsoft Download Center, free of charge.

The "Settings" menu controls the visualization of the qubits. You can also turn on the option to write the qubit information to files (named qubit01.out, etc.).

QCE version 10 does not support DirectX11, the default on Windows 7. Therefore the qubit animation feature is turned off.

Running QCE

Start \QCE\QCE.EXE by your method of choice. A full-screen window opens and the QCE is ready for use.

QCE.EXE expects to find a recent release of some Microsoft DLL's and other system software on your machine. In case there is some incompatibility QCE will most likely crash during start up (see installation).

Below it is assumed that the root directory for QCE is \QCE . Any other name will do too. Part of the directory structure, namely
\QCE\QCE.EXE , \QCE\*.DLL
\QCE\MI
\QCE\DOC
should not be modified, moved etc.

Using QCE

To execute a Quantum Program (QP) with QCE: 

  • Select a MI set (MI stands for Micro Instruction).
    Each MI set contains a number of instructions that perform certain elementary operations on one or more qubits, e.g. a rotation about the x-axis of pi/2 etc. You may start by looking at some of the examples that simulate the NMR-QC experiments by Chuang et al, Nature 393, 143 (1998), Phys.Rev. Lett. 80, 3408 (1998). The notation used in the examples is very similar to the one used in the papers by Chuang et al.: X1 <= > X_A etc.
  • Select a program (click on file/open or Open Icon), e.g. double-click on Grover and then double-click on Grov0.QCP.
    • Several sample MI'sets and QCE programs are included in the software distribution,  see examples.
  • Click on the Run Button in the "QP grov0" window to run the program. QCE first copies the MI's used by the program to the directory on which the program resides.
  • Point with the mouse on the red/blue colored fields that appear in the program window to see the value of the qubits (the value of "z"). Qubit 1 corresponds to the first column in the qubit table, etc. Double-click on an entry in the qubit table to see the color coding.

To modify/add/manipulate MI's and MI sets use the buttons on the MI Set window:

  • Edit any MI by double-clicking on it (you may need to look in qce1.pdf or qceman.pdf to understand the meaning of the various items). 
  • Copy an entire set to another location. 
  • Select another MI set, e.g. nmr_ideal. 
  • Running a program again will replace the MI's currently used by the program before the program is actually executed. 
  • Change the number of qubits of the QC. 
  • Add a working QP to the MI set.
  • ...

To modify a QP:

  • Use drag-and-drop to pick an MI from the MI set and add it to the program.
  • Use drag-and-drop to move an MI within a program.
  • Use the buttons on the QP window.
  • Running a program automatically saves the program. You can copy a QP by saving it under another name (use Tools/Save as).

Examples

The list below gives an overview of the MI-sets and QP's that will be installed. These examples serve to illustrate the use of QCE. You can "click" yourself through these examples, just to see how QCE works. The basic examples are discussed in more detail in qceman.pdf which can be found in the QCE\DOC directory. Other papers may be found on the QCE\DOC directory or on this Web site.

Quantum Algorithm MicroInstruction set QuantumProgram Directory Comments
Basic examples
Deutsch-Jozsa ideal Deutsch-Jozsa Ideal QC
Deutsch-Jozsa nmr Deutsch-Jozsa NMR experiment of Chuang et al. at T=0
Grover ideal Grover Ideal QC
Grover nmr Grover NMR experiment of Chuang et al. at T=0
Grover ideal-jones Jones experiment of Jones et al. on an ideal QC, see qcejon1.pdf
Grover nmr-jones Jones NMR experiment of Jones et al. at T=0, see qcejon1.pdf
Grover nmr-jones02 Jones nmr-jones, with the strength of the pulse /2, see qcejon1.pdf
Grover nmr-jones04 Jones nmr-jones, with the strength of the pulse /4, see qcejon1.pdf
Grover nmr-jones08 Jones nmr-jones, with the strength of the pulse /8, see qcejon1.pdf
Grover nmr-jones10 Jones nmr-jones, with the strength of the pulse /10, see qcejon1.pdf
Collins et al. ideal Collins see qce1.pdf
Collins et al. nmr Collins see qce1.pdf
D-J, Grover, Collins nmr-long see above nmr, very small time-step, test of TDSE solver
The examples below illustrate the sensitivity of non-ideal QCs to changes in the basic instructions (MI's), see cnot4.pdf
CNOT cnot-ideal cnot ideal QC
CNOT cnot-nmr-k*** cnot nmr, RF field in x or y difrection
CNOT cnot-rf-k*** cnot nmr, rotating RF field
Grover grov-ideal grover2 ideal QC
Grover grov-nmr-k*** grover2 nmr, RF field in x or y difrection
Grover nmr-rf-k*** grover2 nmr, rotating RF field
Examples of a 4 qubit QC, using 2 qubits for the database and another 2 qubits for Grover's algorithm, see qceathxx.pdf, qcejon1.pdf
Grover ideal4qubits 4qubits 4-qubit version, demonstrates copy qubit, etc.
Grover nmr4qubits 4qubits 4-qubit version, demonstrates copy qubit, etc.
Simple gates
gates (ideal QC) gates gates CNOT and Toffoli gate
gates (NMR-like QC) xyz xyz CNOT and Toffoli gates, also see QCE examples
Quantum Fourier Transform
QFT dft dft QFT on 2,3,4 qubits
Number partitioning on a 15 qubit QC: Examples that show how a QC solves the partitioning problems {1,2,3,4}, {1,1,1,4}, {2,2,2,4}
Npp npp npp see physletta.pdf for more details
Order finding on an ideal QC, see L.M.K. Vandersypen et al. , Phys. Rev. Lett. 85, 5452 (2000)
Order finding order r=1 order of permutation = 1
Order finding order r=2 order of permutation = 2
Order finding order r=3 order of permutation = 3
Order finding order r=4 order of permutation = 4
Fourier transform order dft3 quantum Fourier transform on 3 qubits
CNOT & Toffoli gates order cnot14, ..., tof145, ... simple gates, many examples
Factoring 15 using Shor's algorithm on an ideal QCs, see L.M.K. Vandersypen et al., Nature 414, 883 (2001)
Shor shor Figure1b See Fig1b in L.M.K. Vandersypen et al., Nature 414, 883 (2001)
Shor Shor a=2 Factoring using a=2 as random input
Shor Shor a=7 Factoring using a=7 as random input
Shor Shor a=11 Factoring using a=11 as random input
Fourier transform Shor dft3 quantum Fourier transform on 3 qubits
CNOT & Toffoli gates Shor cnot34, ..., tof257, ... CNOT and Toffoli gates, several examples
Example of a 3 (4-qubit) register adder (see Fig3.4 in S.Bettelli's PhD thesis)
Fig3.4 Fig3.4 1+1+1 1+1+1=3 mod 16
Fig3.4 Fig3.4 1+2+3 1+2+3=6 mod 16
Fig3.4 Fig3.4 9+9+9  9+9+9=11 mod 16
Examples of a 8 qubit QC, simulating spin waves in the Heisenberg  model (requires DirectX support, see above)
Schrödinger eq. spinwaves antiferromagnet visualization of 8 spins in a ring, antiferromagnet
Schrödinger eq. spinwaves spinwaves visualization of 8 spins in a ring, ferromagnet

History

Version 10.11 (28 November 2010)

  • Fix a number of GUI issues if QCE runs on Windows 7
  • QCE does not support DirectX11, the default on Windows 7. Therefore the qubit animation feature is turned off.

Version 8.1.1 (27 June 2004)

  • New document (revqcs3.pdf) reviews software for simulating various aspects of quantum computation and describes numerical techniques to simulate models for quantum computer hardware.
  • Correct mistakes in example DFT.

Version 8.1.0 (26 July 2003)

  • Minor improvement to the GUI (drop MI).
  • Add new document (qceman.pdf) that may serve as a kind of users guide and describes many of the examples such as CNOT and TOFFOLI gates, the Quantum Fourier Transform, Grover's algorithm, order finding, Shor's algorithm, number partitioning, and a three-input adder.
  • Update examples.

Version 8.0.4 (07 November 2002)

  • Add example of a three-input adder (Fig3.4 in S.Bettelli's PhD thesis)

Version 8.0.3 (25 March 2002)

  • Correct a bug in the GUI (long instead of short integers for main/intermediate time steps)
  • Add examples of Toffoli gates
  • Update of some .pdf files in the .doc subdirectory.

Version 8.0.2 (29 December 2001)

  • Minor improvements in the GUI (handling of MI windows)
  • Add example of factoring 15 using Shor's algorithm
  • Update of some .pdf files in the .doc subdirectory.

Version 8.0.1 (19 October 2001)

  • Fix a bug that prevents removal of the second microinstruction in some cases (GUI only).
  • Update of some .pdf files in the .doc subdirectory.
  • The installation procedure will no longer try to replace system files.

Version 8.0.0 (2 April 2000)

  • Update old examples and add new examples, see table above
  • Add  cnot0.pdf and npp1.pdf to DOC directory
  • After a MI-set has been copied, QCE also sets the MI-set directory to the new one. However, this change was not reflected in the title of the MI-set window. This has been corrected.
  • Use long  instead of short (8 characters)  file names
  • Enlarge MI-set selection window

Version 7.1.2 (07 January 2000)

  • Correct a few spelling mistakes in text boxes

Version 7.1.1 (19 December 2000)

  • Fix a problem that occurs if Netscape is the default Web browser and F1 (help) is pressed
  • The minimum number of qubits is set to 2 instead to 1 (the simulator expects at least 2 qubits)

Version 7.0.1 (30 September 2000)

  • Add more examples (gates and number partitioning)
  • The maximum number of qubits in now 16 instead of 8 (so far used by MI-set "npp" only)
  • By default QCE writes the wave function of the final state to the file final.state in the current quantum-program directory
  • Some aesthetic changes in the GUI that do no affect the operation
    • Notes: Increasing the number of qubits to 16 may (an probably will) have a significant impact on the execution time of your quantum program. On the QCE the execution time scales as 2**(number of qubits). Therefore it is good practice to set the number of qubits to the value you actually use, not more.
  • On some systems, QCE reports that one or more .DLL files are missing. We have added these .DLL files to the distribution (see subdirectory dll).

Version 7.0.0 (08 August 2000)

  • Disable maximize button on MI-set window
  • Minor bug fixes to the GUI
  • Add new examples

Version 6.1.6 (30 April 2000)

  • Several minor improvements to the GUI such as
    • Remove 16-bit restriction on the number of main and intermediate time steps
    • Add "Program steps only" to Settings menu
    • Remove qubit visualization window if "animate qubits" is switched off
  • Add more examples

Version 6.1.5 (7 February 2000)

  • Correct an error in the GUI that sometimes forces the user to exit QCE. This error occurs after several rename/delete microinstructions operations
  • Add text to help.htm (Examples, history)