Installing qsimcirq

The qsim-Cirq Python interface is available as a PyPI package for Linux, MacOS and Windows users. For all others, Dockerfiles are provided to install qsim in a containerized environment.

Before installation

Prior to installation, consider creating a virtual environment.

Prerequisites for installing and running qsim are included in the requirements.txt file, and will be automatically installed along with qsimcirq when you install it with pip.

If you'd like to develop qsimcirq, a separate set of dependencies are defined in the pyproject.toml file. Using pip version 25.1 or higher, you can install them with the following commands:

pip install -r requirements.txt
pip install --group dev

Linux installation

We provide qsimcirq Python wheels on 64-bit x86 architectures with Python 3.{10,11,12,13}. The installation process will automatically check for CUDA and GPUs on your computer if they exist and attempt to build a version of qsim that can make use of the GPU(s). (Note that this is presently an installation-time action and will take several minutes to finish.)

Simply run pip3 install qsimcirq.

MacOS installation

We provide qsimcirq Python wheels on x86 and Apple Silicon architectures with Python 3.{10,11,12,13}.

Simply run pip3 install qsimcirq.

Note that, due to architectural differences, CUDA support is not available on MacOS. The version of qsimcirq on MacOS will only use the CPU, without GPU acceleration.

Windows installation

We provide qsimcirq Python wheels on 64-bit x86 and amd64 architectures with Python 3.{10,11,12,13}.

Simply run pip3 install qsimcirq.

Help! There's no compatible wheel for my machine!

If existing wheels do no meet your needs, please open an issue with your machine configuration (i.e., CPU architecture, Python version) and consider using the Docker config provided in the qsim GitHub repository.

Testing

After installing qsimcirq on your machine, you can test the installation by copying qsimcirq_tests/qsimcirq_test.py to your machine and running python3 -m pytest qsimcirq_test.py.

The file qsimcirq_test.py also has examples of how to use qsimcirq.