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)

Install cudaq for the complete Python API. The metapackage selects a matching cudaq-core and CUDA-specific frontend, plus cudaq-logical on Linux. Extension authors can install cudaq-core directly for the native foundation and cudaq.mlir bindings without frontend execution or simulator dependencies. Core and frontend versions must match exactly; logical has its own version and pins the compatible core release. 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.17.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.17.0
File Actions
cuda_quantum_cu13-0.17.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu13-0.17.0-cp314-cp314-manylinux_2_28_x86_64.whl
cuda_quantum_cu13-0.17.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp314-cp314-manylinux_2_28_aarch64.whl
cuda_quantum_cu13-0.17.0-cp314-cp314-macosx_13_0_arm64.whl CPython 3.14 CPython 3.14 macOS 13.0+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp314-cp314-macosx_13_0_arm64.whl
cuda_quantum_cu13-0.17.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu13-0.17.0-cp313-cp313-manylinux_2_28_x86_64.whl
cuda_quantum_cu13-0.17.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp313-cp313-manylinux_2_28_aarch64.whl
cuda_quantum_cu13-0.17.0-cp313-cp313-macosx_13_0_arm64.whl CPython 3.13 CPython 3.13 macOS 13.0+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp313-cp313-macosx_13_0_arm64.whl
cuda_quantum_cu13-0.17.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu13-0.17.0-cp312-cp312-manylinux_2_28_x86_64.whl
cuda_quantum_cu13-0.17.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp312-cp312-manylinux_2_28_aarch64.whl
cuda_quantum_cu13-0.17.0-cp312-cp312-macosx_13_0_arm64.whl CPython 3.12 CPython 3.12 macOS 13.0+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp312-cp312-macosx_13_0_arm64.whl
cuda_quantum_cu13-0.17.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu13-0.17.0-cp311-cp311-manylinux_2_28_x86_64.whl
cuda_quantum_cu13-0.17.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp311-cp311-manylinux_2_28_aarch64.whl
cuda_quantum_cu13-0.17.0-cp311-cp311-macosx_13_0_arm64.whl CPython 3.11 CPython 3.11 macOS 13.0+ ARM64 Details for cuda_quantum_cu13-0.17.0-cp311-cp311-macosx_13_0_arm64.whl

Total release size: 229.1 MB

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

Download URL cuda_quantum_cu13-0.17.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 29.0 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bb2e715e8d3192f874f681d1f205d05a0e475967e10503210c6b5261dc3e8993
BLAKE2b-256 checksum
How to use checksums
7a03cb5b2dec12a9486f14f34813deb3676a3ef4ccbee488e128184010e20e2a
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.17.0-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.17.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 19.3 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
10803f84a8783f16757ae81e784b06508f4923c6d141c7950e7ad375bdf857bc
BLAKE2b-256 checksum
How to use checksums
3b20487f06546ec9b8df43ef53f24bc79136d96b4866b8c7d84c87236d174555
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.17.0-cp314-cp314-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.17.0-cp314-cp314-macosx_13_0_arm64.whl
Size 9.1 MB
Tags CPython 3.14 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
2ff7e912c7f61acad12e168e0f41357d87cce9163259fef014e0199e907fff4a
BLAKE2b-256 checksum
How to use checksums
ad15d5302ae632b8325b780c0c8827a0dffd8ceb40ce49798621c2071ad22ca3
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.17.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu13-0.17.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 29.0 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
97f8d7f3ba45b0e709ffae58a3a933ba1408f09b8c3496eb8c8c1e44639d7cda
BLAKE2b-256 checksum
How to use checksums
064bea49c49bfa93cadc021b06493aae34ac4df632c9f3467388c7936eed6a8f
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.17.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.17.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 19.3 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
57195c5e17689e0321792e5602e27dc3f5e6321727c670ce10b2a97ef37b11fa
BLAKE2b-256 checksum
How to use checksums
990bb00f1342dbc407f906817a2f75be735b4ca396234e820e68c1aee4689cd1
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.17.0-cp313-cp313-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.17.0-cp313-cp313-macosx_13_0_arm64.whl
Size 9.1 MB
Tags CPython 3.13 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
dc287c70dc8ceffe15c6975b38e39c89826fe31f38f319f9360e86552550e9f0
BLAKE2b-256 checksum
How to use checksums
f93e6ee278846ef8f0ed5f21740c63cd60d1dfbe1d510abf47dafdf967c6daee
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.17.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu13-0.17.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 29.0 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5a61d70bd435b025c7af49c6dac2df4df968aaf63111c724861f7a33ee357b42
BLAKE2b-256 checksum
How to use checksums
4eb9a46f726849e800eb4625f5c863c79ec4e081bcd76d38e45ad17e58013e5f
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.17.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.17.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 19.3 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
209ff826c3f243ffb1b27408c2f4a98b108eec0aa5cb0b9170cb027c698c71eb
BLAKE2b-256 checksum
How to use checksums
5adc7338b7e0c18b0645ae05c7f687e804d34069d7757a67e776a2e8c159333e
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.17.0-cp312-cp312-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.17.0-cp312-cp312-macosx_13_0_arm64.whl
Size 9.1 MB
Tags CPython 3.12 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
e9084c36e2265b259114f464f2d4ee0fa62c7d1c33d7a31d9c6d913b5389b65b
BLAKE2b-256 checksum
How to use checksums
6df6452eca92564ffb0aff4e80f4858358d8526d481d1537525452b1800b3a89
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.17.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu13-0.17.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 29.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
57112c3d8025cfe7deed710e07f0b3fea2ac1c3fb767e42b0c832a53aaad946c
BLAKE2b-256 checksum
How to use checksums
57fa7dbd7535a8eb1821c880977e8c43f258c9acd54acb1f0c9d947dc0f4ca23
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.17.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu13-0.17.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 19.2 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
f81d08cd9aab9397f37aaf437578d1c697e99c6bfc4f0041977591e5b0689023
BLAKE2b-256 checksum
How to use checksums
7d82b45f309c256361a822e8564e81a3a7ab5d8096cc2f50fa4f6a42acd0bc8b
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.17.0-cp311-cp311-macosx_13_0_arm64.whl

Download URL cuda_quantum_cu13-0.17.0-cp311-cp311-macosx_13_0_arm64.whl
Size 9.1 MB
Tags CPython 3.11 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
7fc2095ced1c0e0b37525016ee2e7bf18f1860a0550ff594b1a56f8af4798212
BLAKE2b-256 checksum
How to use checksums
38fdb874ce22f89403d8431097ac940d6be44cce9aaf9dfd1413a4495ba85ade
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for cuda-quantum-cu13 0.17.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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