Skip to main content

Welcome to the CUDA-Q Python API

CUDA-Q is a comprehensive framework for quantum programming. It features:

  • A programming model which extends C++ and Python with quantum kernels, enabling high-level programming in familiar languages
  • A high-performance quantum compiler, nvq++, based on the industry standard LLVM toolchain
  • Interoperability with all of the leading models and tools for accelerated computing, including CUDA, ISO standard parallelism, OpenMP, and OpenACC
  • The ability to utilize and seamlessly switch between different quantum technologies, including state-of-the-art simulator backends with NVIDIA cuQuantum and a number of different physical quantum processors (QPUs)

The CUDA-Q Python wheels contain the Python API and core components of CUDA-Q. This package installs CUDA-Q binaries that are compatible with a CUDA version ${{ cuda_version_requirement }}. More information about available packages as well as a link to the documentation and examples for each version can be found in the release notes. System and compatibility requirements are listed in the Installation Guide of the linked documentation.

Note: CUDA-Q is supported on Linux (x86_64 and aarch64/arm64) and macOS (ARM64/Apple silicon, CPU-only simulation). GPU-accelerated simulation requires Linux with a supported NVIDIA GPU.

Installation Including GPU-Acceleration

CUDA-Q does not require a GPU to use, but some components are GPU-accelerated. Getting started with CUDA-Q requires pip install ${{ package_name }}. Please make sure your pip version is >= 24.0.

${{ deprecation_notice }}

Important: Please check if you have an existing installation of the cuda-quantum, cudaq-quantum-cu11, cuda-quantum-cu12, or cuda-quantum-cu13 package, and uninstall it prior to installation. Different CUDA-Q binary distributions may conflict with each other causing issues.

Platform-specific instructions: Linux | macOS

Linux: GPU-Acceleration and Multi-GPU

If you have an NVIDIA GPU on your host system, you will be able to use it without any further installation steps.

If you want to perform multi-GPU simulations, additional components must be installed. We recommend using Conda to do so. If you are not already using Conda, you can install a minimal version following Miniconda instructions here. The following commands will create and activate a complete environment for CUDA-Q with all its dependencies:

cuda_version=${{ cuda_version_conda }} # set this variable to version ${{ cuda_version_requirement }}
conda create -y -n cudaq-env python=3.11 pip
conda install -y -n cudaq-env -c "nvidia/label/cuda-${cuda_version}" cuda
conda install -y -n cudaq-env -c conda-forge --strict-channel-priority mpi4py openmpi">=5.0.3" cxx-compiler
conda env config vars set -n cudaq-env LD_LIBRARY_PATH="$CONDA_PREFIX/envs/cudaq-env/lib:$LD_LIBRARY_PATH"
conda env config vars set -n cudaq-env MPI_PATH=$CONDA_PREFIX/envs/cudaq-env
conda activate cudaq-env
pip install ${{ package_name }}
source $CONDA_PREFIX/lib/python3.11/site-packages/distributed_interfaces/activate_custom_mpi.sh

Warning (conda-forge): Installing cudaq from the conda-forge channel on recent versions of Python can lead to segmentation faults. If you see such errors, please switch to one of the Python versions 3.11.10 or 3.12.7 as per the issue #2999 or #3104.

You must configure MPI by setting the following environment variables:

export OMPI_MCA_opal_cuda_support=true OMPI_MCA_btl='^openib'

If you do not set these variables you may encounter a segmentation fault.

Important: It is not sufficient to set these variable within the Conda environment, like the commands above do for LD_LIBRARY_PATH. To avoid having to set them every time you launch a new shell, we recommend adding them to ~/.profile (create the file if it does not exist), and to ~/.bash_profile or ~/.bash_login if such a file exists.

macOS

GPU-acceleration is not available on macOS, so a virtual environment is all you need:

python3 -m venv .venv
source .venv/bin/activate
pip install cudaq

MPI uses SSH or RSH to communicate with each node unless another resource manager, such as SLURM, is used. If you are encountering an error "The value of the MCA parameter plm_rsh_agent was set to a path that could not be found", please make sure you have an SSH Client installed.

Running CUDA-Q

You should now be able to import CUDA-Q and start building quantum programs in Python!

import cudaq

kernel = cudaq.make_kernel()
qubit = kernel.qalloc()
kernel.x(qubit)
kernel.mz(qubit)

result = cudaq.sample(kernel)

Additional examples and documentation are linked in the release notes.

Contributing

There are many ways in which you can get involved with CUDA-Q. If you are interested in developing quantum applications with CUDA-Q, our GitHub repository is a great place to get started! For more information about contributing to the CUDA-Q platform, please take a look at Contributing.md.

License

CUDA-Q is an open source project. The source code is available on GitHub and licensed under Apache License 2.0. CUDA-Q makes use of the NVIDIA cuQuantum SDK to enable high-performance simulation, which is held to its own respective license.

Feedback

Please let us know your feedback and ideas for the CUDA-Q platform in the Discussions tab of our GitHub repository, or file an issue. To report security concerns please reach out to cuda-quantum@nvidia.com.

Metadata

Release files for cuda-quantum-cu13 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cuda-quantum-cu13 0.16.0
File
cuda_quantum_cu13-0.16.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
cuda_quantum_cu13-0.16.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
cuda_quantum_cu13-0.16.0-cp314-cp314-macosx_13_0_arm64.whl CPython 3.14 CPython 3.14 macOS 13.0+ ARM64 Details
cuda_quantum_cu13-0.16.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
cuda_quantum_cu13-0.16.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
cuda_quantum_cu13-0.16.0-cp313-cp313-macosx_13_0_arm64.whl CPython 3.13 CPython 3.13 macOS 13.0+ ARM64 Details
cuda_quantum_cu13-0.16.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
cuda_quantum_cu13-0.16.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
cuda_quantum_cu13-0.16.0-cp312-cp312-macosx_13_0_arm64.whl CPython 3.12 CPython 3.12 macOS 13.0+ ARM64 Details
cuda_quantum_cu13-0.16.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
cuda_quantum_cu13-0.16.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
cuda_quantum_cu13-0.16.0-cp311-cp311-macosx_13_0_arm64.whl CPython 3.11 CPython 3.11 macOS 13.0+ ARM64 Details

Total release size: 943.2 MB

Release files / cuda_quantum_cu13-0.16.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu13-0.16.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 91.9 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
303873d8c9521c1d36b87c75b68dea9fc23663f8b8f9049809a5d33cc253e6af
BLAKE2b-256 checksum
How to use checksums
3a19415181c4d06e723a92393eefcc8e8656c9e5d137a8873172c52944e8f324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.16.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 80.0 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
4f51029ccb0c99d4ba70a878fc739dec46e4457bc3765c40e378e42c8b7aeed2
BLAKE2b-256 checksum
How to use checksums
04b9c24829e3a2fbe4957dcceab123cf2e53fa00bb2f9f338c07e4ad4a026f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp314-cp314-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.16.0-cp314-cp314-macosx_13_0_arm64.whl
Size 63.9 MB
Tags CPython 3.14 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
809de7b0d980ec35918a5bc9aab4f21ac1b64386da3037a87c9e0175c127765e
BLAKE2b-256 checksum
How to use checksums
16191c0ed4d237bf930cc2357dddc696fa179b178b9526126b5ba9ba3a7c94d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu13-0.16.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 91.9 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c2efa2801fa1e95b5d96b4244499ff272264e47c09d2eb5bba71bf41abac65f7
BLAKE2b-256 checksum
How to use checksums
489d5f7a4b6c44d5fbc20958f9f3b6312658ea9ba5bf7f2156cccbd01b674128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.16.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 80.0 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
d85e878923b0d5891b24216be800a651598a14fec03b8106592e1e6ce31cd8b2
BLAKE2b-256 checksum
How to use checksums
6eacfdb87c46199d7a9471b660afa3bc81acd5e1a0d39a1ef9343a7db2bd14fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp313-cp313-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.16.0-cp313-cp313-macosx_13_0_arm64.whl
Size 63.9 MB
Tags CPython 3.13 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
a032ee9de325515b257786d1eb13bf530531b3bd11172bf8de505fa5c7d4d4a3
BLAKE2b-256 checksum
How to use checksums
11dc566db9383d3b2dd7197e744b0a26162a11152f415f6388ba0aafb4a2d011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu13-0.16.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 91.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ed3d7131255440790e1cfda7825f8f8680697c192791fa510ae8447f4554b4da
BLAKE2b-256 checksum
How to use checksums
1c4132b2fc99d3b6e10d42a23d0d13697ad21a688c15bd5c6ec20f7554326aba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.16.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 80.0 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
5313d8bb0a1b4fb2b5dd7f29347e017fa6b9767643d1cc43c47d9a3e2df9f76d
BLAKE2b-256 checksum
How to use checksums
fabd2cdb63dbceefb72e9be30fd6b0dd0ed6126558419eab0ef52b39b860bcfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp312-cp312-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.16.0-cp312-cp312-macosx_13_0_arm64.whl
Size 63.9 MB
Tags CPython 3.12 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
a89abf7628a0cac9d172cc4aff32071f921eae0f7af079c24a7d2f05f4fdecb1
BLAKE2b-256 checksum
How to use checksums
e005101bae7c873973ad6aace03cc189bd1736618132cbe080d77fc2c3e9cf67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu13-0.16.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 91.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ed1c1f8bf18ce389b85fba1c42aa0237e43a42593450e6e9e3f8b9e65fdd136a
BLAKE2b-256 checksum
How to use checksums
2dd38d7b9faef7caf9c33e866046ad1b463e9faaf863a06eb024ec70f738eafd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.16.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 80.0 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
96b994cb989313b68a7861db4bd30d80484555cc31c6ecee83abcfccdfb5b87d
BLAKE2b-256 checksum
How to use checksums
2c1ffde5ee1efad99d524050209de6ebe274707c619b2feb60d37b6d272e097c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cuda_quantum_cu13-0.16.0-cp311-cp311-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.16.0-cp311-cp311-macosx_13_0_arm64.whl
Size 63.9 MB
Tags CPython 3.11 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
3f2a30ba3345b5fb38026cc15571e1b7d5407d05ac77c1e07ecbe69784471598
BLAKE2b-256 checksum
How to use checksums
ae5d6bf09f360880af17e1f370a50b0d1344bf36753175267ca968f0bea7af65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.16.0 This release

12 release files

0.14.2

9 release files

0.14.0

9 release files

0.13.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page