Skip to main content

Python bindings for the CUDA Quantum toolkit for heterogeneous quantum-classical workflows.

Project description

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 low-level virtual machine (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. For more information about available packages and documentation, see our release notes.

Installing CUDA Quantum

CUDA Quantum Python wheels are available on PyPI.org. To install the latest release, simply run

pip install cuda-quantum

At this time, wheels are distributed for Linux operating systems only. To build the CUDA Quantum Python API from source using pip:

git clone https://github.com/NVIDIA/cuda-quantum.git
cd cuda-quantum && ./scripts/install_prerequisites.sh
pip install .

For more information about building the entire C++ and Python API's, please see the CUDA Quantum documentation.

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()

result = cudaq.sample(kernel)

Documentation

To see more examples, go to python examples, or check out the Python API reference.

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

The PennyLane-Lightning-GPU plugin is free and open source, released under the Apache License, Version 2.0. The PennyLane-Lightning-GPU plugin makes use of the NVIDIA cuQuantum SDK headers to enable the device bindings to PennyLane, which are held to their own respective 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

cuda_quantum-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl (54.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

cuda_quantum-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl (54.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

cuda_quantum-0.4.0-cp39-cp39-manylinux_2_28_x86_64.whl (54.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

cuda_quantum-0.4.0-cp38-cp38-manylinux_2_28_x86_64.whl (54.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page