Skip to content

muhos/QuaSARQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 Build Status

QuaSARQ

QuaSARQ stands for Quantum Simulation and Automated Reasoning. It is a parallel simulator of quantum stabilizer circuits capable of harnessing NVIDIA CUDA-enabled GPUs to accelerate the simulation of stabilizer gates.

Build

To build the simulator, make sure you have a CUDA-capable GPU with pre-installed NVIDIA driver and CUDA toolkit.

For installing CUDA v12, run the following commands on Ubuntu 24.04:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-8

The source code is also platform-compatible with Windows and WSL2. To install CUDA on those platforms, follow the installation guide in https://docs.nvidia.com/cuda/.

Now, the simulator can be built via the command cd src && make && make install.
The quasarq binary and the library libquasarq.a will be created by default in the build directory.

Debug and Testing

Add assert=1 argument with the make command to enable assertions or debug=1 to collect debugging information.

Usage

The simulator can be used via the command quasarq [<circuit>.<stim>/<qasm>][<option> ...].
For more options, type quasarq -h or quasarq --helpmore.

Equivalence Checking

QuaSARQ supports equivalence checking of two stabilizer circuits. For example, quasarq C1.stim C2.stim checks if C1 == C2. The outcome will be EQUIVALENT or otherwise NOT EQUIVALENT, indicating the failing initial state. Check our paper in TACAS'25 for more insights. The following plots compares the performance of QuaSARQ against CCEC (a Stim-based checker) and Quokka-Sharp (universal circuit simulator based on model counting). Circuits have qubits in range of 1,000 to 500,000 qubits.

Runtime for QuaSARQ vs CCEC Runtime for QuaSARQ vs Quokka-Sharp

Energy for QuaSARQ vs CCEC Energy for QuaSARQ vs Quokka-Sharp