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

= 11.8. 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 currently only supported on Linux operating systems using x86_64 or aarch64/arm64 processors.

Installation Including GPU-Acceleration

CUDA-Q does not require a GPU to use, but some components are GPU-accelerated.

Getting started with CUDA-Q simply requires pip install cuda-quantum-cu11. Please make sure your pip version is >= 24.0. If you have an NVIDIA GPU on your host system, you will be able to use it without any further installation steps.

Note: Support for CUDA 11 will be removed in future releases. Please update to CUDA 12.

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

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=11.8.0 # set this variable to version >= 11.8
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 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 cuda-quantum-cu11
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.10.15, 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.

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-cu11 0.12.0.post1

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-cu11 0.12.0.post1
File Actions
cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Total release size: 924.2 MB

Release files / cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 118.5 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c1ec065e717f5025a71189110b385afd7b72b107776c4c9176c3da07adb06bc5
BLAKE2b-256 checksum
How to use checksums
6518f9f5f8666ed77f973540e82a75be53dae1a912ee292ca208eceb19e47970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 112.5 MB
Tags CPython 3.13 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
77459890c880930f3531f784420aeff871f04c0cf9723852c4df320d6f9e2e19
BLAKE2b-256 checksum
How to use checksums
40b31053fcf2e602b33b870954f2b7c3d6eeaddcebd966392dc394f4e65d4a00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 118.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
fe18e3d40630bff7125af383b554f91ad13e2ae298e40b65023a8be12d2c8318
BLAKE2b-256 checksum
How to use checksums
7c09274befcc18b23be69322e6e6ef5e6ba8ecb87ba55cd9031f810859462fc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 112.5 MB
Tags CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
550620aa22a3e7066c1bd2b802945b45fa8754591f924049cf04b923f414e894
BLAKE2b-256 checksum
How to use checksums
05481ce99e211f2b21aa2cbfbc7e34d833f861e366019717c8d81e753f40bf72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 118.6 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6eacf6833ef3d719cf99a6ea3b68f24f8b8d66e8d08e8fc16b57ea86cf7f536f
BLAKE2b-256 checksum
How to use checksums
af8dc9434aaf42d5189d167dabf1c6c44bed4859dde1e8c9d6872f1f70a40c9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 112.5 MB
Tags CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
e3d5a10df11b4d2bbb4b78b6383a014276c439227e5157df8a78d70ea92f3e7f
BLAKE2b-256 checksum
How to use checksums
5622a2f63c3a008db771570d4bc6bc3fb2785410e017f1315ee2c8c4d23e46fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 118.5 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c5eec0005ea85d1d3390c3bf18c85a0ec4cbb5086ae054c256415b507102cd04
BLAKE2b-256 checksum
How to use checksums
d7417267112cb6112ec7ed2c7192703c7a4268df0461a231367e268dcbc7a1b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL cuda_quantum_cu11-0.12.0.post1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 112.5 MB
Tags CPython 3.10 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
ec010ed19106bbd19900ca6fb05fe2562e5e624d90f544aa4c10ce227f21b386
BLAKE2b-256 checksum
How to use checksums
47b583fd1b2d26e236245fb85b598cc80356ff86135238cfae6a12bab7ced75d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for cuda-quantum-cu11 0.12.0.post1

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