Skip to main content

Welcome to the CUDA Quantum Python API

CUDA Quantum 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 Quantum Python wheels contain the Python API and core components of CUDA Quantum. 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 requirements and compatibility are listed in the Getting Started section of the linked documentation.

Installing CUDA Quantum

To install the latest stable version of CUDA Quantum, run

python3 -m pip install cuda-quantum

CUDA Quantum can be used to compile and run quantum programs on a CPU-only system, but a GPU is highly recommended and necessary to use the some of the simulators. The GPU-based simulators included in the CUDA Quantum Python wheels require an existing CUDA installation. Additionally, multi-GPU simulators require an existing CUDA-aware MPI installation.

To install the necessary dependencies, we recommend using Conda. If you are not already using Conda, you can install a minimal version following the instructions here. The following commands will create and activate a complete environment for CUDA Quantum with all its dependencies:

    conda create -y -n cuda-quantum python==3.10 pip
    conda install -y -n cuda-quantum -c "nvidia/label/cuda-11.8.0" cuda
    conda install -y -n cuda-quantum -c conda-forge mpi4py openmpi cxx-compiler cuquantum
    conda env config vars set -n cuda-quantum LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CONDA_PREFIX/envs/cuda-quantum/lib"
    conda env config vars set -n cuda-quantum MPI_PATH=$CONDA_PREFIX/envs/cuda-quantum
    conda run -n cuda-quantum pip install cuda-quantum
    conda activate cuda-quantum
    source $CONDA_PREFIX/lib/python3.10/site-packages/distributed_interfaces/activate_custom_mpi.sh

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 Quantum

You should now be able to import CUDA Quantum 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 Quantum. If you are interested in developing quantum applications with CUDA Quantum, our GitHub repository is a great place to get started! For more information about contributing to the CUDA Quantum platform, please take a look at Contributing.md.

License

CUDA Quantum is an open source project. The source code is available on GitHub and licensed under Apache License 2.0. CUDA Quantum 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 Quantum 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 0.6.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 0.6.0
File Actions
cuda_quantum-0.6.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-0.6.0-cp311-cp311-manylinux_2_28_x86_64.whl
cuda_quantum-0.6.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details for cuda_quantum-0.6.0-cp311-cp311-manylinux_2_28_aarch64.whl
cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details for cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_aarch64.whl
cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details for cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_x86_64.whl
cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ ARM64 Details for cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_aarch64.whl
cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64 Details for cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_x86_64.whl
cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ ARM64 Details for cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_aarch64.whl

Total release size: 464.2 MB

Release files / cuda_quantum-0.6.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL cuda_quantum-0.6.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 59.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
343a1c118748dfa0530d589f0b46264f67f83d33b4d55b7bf9195c96781ca283
BLAKE2b-256 checksum
How to use checksums
a2e8b62701d006a20952aa61f942fad4c2ecf7f0353273c7302a7a03711ffd86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / cuda_quantum-0.6.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL cuda_quantum-0.6.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 57.0 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
e8073936f07b1d3feb1cc456669a1485ac52b705812039eb12e9a8de783cb291
BLAKE2b-256 checksum
How to use checksums
f714d541e86502c43fd3839f54f6ba0d457d6d83db127e0f3d8e50d9d3b83a20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 59.0 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
362a8c45af9a2f009c5a3a8100ba90431be578d62163e75b2811f4df779931bd
BLAKE2b-256 checksum
How to use checksums
43098c1e799a633ec70f4fe980f4d492cdea174ab42900d54764c6900950e9f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL cuda_quantum-0.6.0-cp310-cp310-manylinux_2_28_aarch64.whl
Size 57.0 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
e2f8c6c2096b63b849744015c4bc7d7be4a2e3f1045ed5351bfe2a5d58ec39cf
BLAKE2b-256 checksum
How to use checksums
11bf3ada8946676ac2b34f1f13568a33f409552573147468e03e0908af93bcf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_x86_64.whl
Size 59.0 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d32b36bfc7a6d7045900d48ef646787d1b691f831c3a5e86b02684d2b72eb40f
BLAKE2b-256 checksum
How to use checksums
f23729530949c985d9819e7bd3ed29e12f6efe43afb5383cbb7e60baa12d8b2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_aarch64.whl

Download URL cuda_quantum-0.6.0-cp39-cp39-manylinux_2_28_aarch64.whl
Size 57.0 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
9b700e96506238808d1bf924ab936433f9ae62dc3791e02c3ff41e99412a4d0a
BLAKE2b-256 checksum
How to use checksums
723e62aa7802a0b361e275ee64c640c7e4da6156deea34306ec202edb7b92e04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_x86_64.whl

Download URL cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_x86_64.whl
Size 59.0 MB
Tags CPython 3.8 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b049b9420d2554371ae458c13f55449ad83b3f273b2e8174523844d6297a1caf
BLAKE2b-256 checksum
How to use checksums
604b37692f1033312629efcfcadfc17f4b584e20d4da0655c21fce420f0e445a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_aarch64.whl

Download URL cuda_quantum-0.6.0-cp38-cp38-manylinux_2_28_aarch64.whl
Size 57.0 MB
Tags CPython 3.8 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
03823e75035a99a751a9a0899d6db249213b9e2cf7d968a278141e944969a2c1
BLAKE2b-256 checksum
How to use checksums
ae77bf8afb9f7ec81dcfbd2a742af549c8fd3d0f2dfdd483f454c10a83bd31bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for cuda-quantum 0.6.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