The realisation of large-scale physical quantum computer appears to be challenging, alongside the efforts to design quantum computers, significant efforts are focusing on the the development of useful quantum algorithms. In the absence of large physical quantum computer, accurate software simulation of quantum computers on a classical computers is required to simulate the execution of those quantum algorithms and to study the behaviour of a quantum computer and improve its design.
The QX Simulator is a universal quantum computer simulator developped at QuTech by Nader Khammassi. The QX allows quantum algorithm designers to simulate the execution of their quantum circuits on a quantum computer. The simulator defines a low-level quantum assembly language namely Quantum Code which allows the users to describe their circuits in a simple textual source code file. The source code file is then used as the input of the simulator which executes its content.
The Quantum Code language allows the users to :
- Defining quantum register with a given qubits number.
- Building the circuit through a sequence of quantum gates.
- Simulating the calssical-quantum interface through binary-controlled gates.
- Splitting the main circuit into several smaller sub-circuit.
- Debugging the circuit through special instructions which display the quantum state and the measurement outcomes at any point of the circuit.
- Commenting the different circuit parts.
- Looping over a sub-circuit: executing a sub-circuit several iterations.
- Scheduling sequential or parallel quantum gates.
Beside simulating error-free execution quantum circuits on a perfect quantum computer, the QX Simulator can simulate realistic noisy execution using different error models such as the depolarizing noise. The user can activate the error model and define a physical error probability to simulate a specific target quantum computer. This error rate can be defined based on the gate fidelity and the qubit decoherence of the target platform.
The command line version of QX is a light version which do not expose any dependencies. It can be dowloaded and used immediately without special prequisites.
Note: In n order to ease the port of QX to the Microsoft Windows system, several optimizations such as instruction-level and thread-level parallelism has been disabled temporarly in the first version. This can limit the performance for large number of qubits. These optimizations will be enabled in the incoming versions.
- QX Simulator for Linux x86_64 Systems ................. download.
- QX Simulator for Mac OS X Systems ......................download.
- QX Simulator for Microsoft Windows Systems .............download (beta version)
Quantum Studio is a graphical interface for QX, it offers syntax highlighting and circuit rendering. This software uses the QT 5 library and thus require it to be installed on your system. To enable circuit rendering you need also to install a latex compiler such as TexView but it is not required for the circuit simulation.
- Quantum Studio for Linux x86_64 Systems (Intel Haswell CPU and later) ............. download.
- Quantum Studio for Linux x86_64 Systems ........................................... download.
- Quantum Studio for Mac OS X Systems ............................................... download.
In order to install the QT library on Mac OS X system, you can use the brew package manager as follow:
brew install qt5
If brew is not installed on your machine your installed through the following commandline then go pack to the previous step:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
For Linux systems you can use your favorite package manager to install QT5. For example, for Linux Debian or Ubuntu systems you can use this command line to install it:
sudo apt-get install qt5-default
For more information on QT installation on the different Linux distributions and systems, please follow this link: https://wiki.qt.io/Main
A ready-to-use Linux Ubuntu virtual machine with Quantum Studio already installed is available, it can be used on wide range of systems.
All you need is to have Virtual Box installed on your machine. To use it, you can follow these steps:
1. Install VirtualBox on your machine (if it is not already installed).
2. Download the ready-to-use virtual machine image from this link: QX Virtual Machine
3. Double-click on the downloaded file, it will be loaded in Virtual Box as "QX_VM".
4. In Virtual Box, select the loaded "QX_VM" and click "start".
That’s all, then the machine will start, the default user account is "student" and the password for it is "password".
Once you login, you will find a desktop shortcut to launch QX and a folder containing some examples of circuits.
Note: you don’t need to redo these steps each time you want to use it, once loaded in Virtual Box the first time, it will be there all the time, so you can open Virtual Box, select QX_VM and start the machine.
Installing QX (Commandline version)
First, download the simulator and save it in a folder of your choice.
Open a terminal and go to that folder:
Make it executable using this command:
chmod +x qx_simulator.0.1.beta_linux_x86_64
Using QX (Commandline Version)
To use the QX Simulator, open a terminal, go to the directory where you save it:
Then run the simulator using a circuit file as argument:
Note: If you are using the Windows version, you can follow the same steps using the Microsoft PowerShell as a commandline interpreter.
Now you can write your own circuit using the text editor of your choice, then save them *.qc file and execute them.
That's all !
Quantum Code v1.0 User's Manual ......................... pdf