Skip to main content

cuQuantum Python

Documentation

Please visit the NVIDIA cuQuantum Python documentation.

For instructions on installing cuQuantum Python, refer to our getting started section

Building and installing cuQuantum Python from source

Requirements

The build-time dependencies of the cuQuantum Python package include:

  • CUDA Toolkit 12.x or 13.x
  • Python >=3.11, <3.15
  • Cython >=3.0.4,!=3.1.0,!=3.1.1 (>=3.1.3 for Python 3.14)
  • pip 21.3.1+
  • packaging
  • setuptools 77.0.3+
  • wheel 0.34.0+

Note: Starting with cuQuantum Python v25.06, cuQuantum C libraries including cuDensityMat, cuStateVec and cuTensorNet are no longer build-time dependencies. However, they are still required at runtime.

Except for CUDA and Python, the rest of the build-time dependencies are handled by the new PEP-517-based build system (see Step 7 below).

To compile and install cuQuantum Python from source, please follow the steps below:

  1. Clone the NVIDIA/cuQuantum repository: git clone https://github.com/NVIDIA/cuQuantum
  2. Set CUDA_PATH to point to your CUDA installation
  3. [optional] Make sure cuQuantum and cuTENSOR are visible in your LD_LIBRARY_PATH
  4. Switch to the directory containing the Python implementation: cd cuQuantum/python
  5. Build and install:
    • Run pip install . if you skip Step 3 above
    • Run pip install -v --no-deps --no-build-isolation . otherwise (advanced)

Notes:

  • For Step 5, if you are building from source for testing/developing purposes you'd likely want to insert a -e flag before the last period (so pip ... . becomes pip ... -e .):
    • -e: use the "editable" (in-place) mode
    • -v: enable more verbose output
    • --no-deps: avoid installing the run-time dependencies
    • --no-build-isolation: reuse the current Python environment instead of creating a new one for building the package (this avoids installing any build-time dependencies)
  • Please ensure that you use consistent binaries and packages for either CUDA 12 or 13. Mixing-and-matching will result in undefined behavior.

Running

Requirements

Runtime dependencies of the cuQuantum Python package include:

  • An NVIDIA GPU with compute capability 7.5+
  • Driver: Linux (525.60.13+ for CUDA 12, 580.65.06+ for CUDA 13)
  • CUDA Toolkit 12.x or 13.x
  • cuStateVec 1.15.1+
  • cuTensorNet 2.15.0+
  • cuDensityMat >=0.7.1, <0.8.0
  • cuPauliProp >=0.5.1, <0.6.0
  • cuStabilizer >=0.5.0, <0.6.0
  • Python >=3.11, <3.15
  • NumPy v1.21+
  • nvmath-python >=1.0.0, <2.0.0
  • cuda-pathfinder >=1.6.0, <2
  • cuda-bindings >=12.9.4, <13.0.0 for CUDA 12 or cuda-bindings >=13.0.3, <14.0.0
  • CuPy v13.0.0+ (see installation guide)
  • PyTorch v1.10+ (optional, see installation guide)
  • Qiskit v1.4.2+ (optional, see installation guide)
  • Cirq v0.6.0+ (optional, see installation guide)
  • mpi4py v3.1.0+ (optional, see installation guide)
  • cuSolverMp >=0.9.1, <0.10.0 (optional, see installation guide)
  • NCCL >=2.29, <3.0 (optional, see installation guide)

If you install everything from conda-forge, all the required dependencies are taken care for you (except for the driver).

If you install the pip wheels, CuPy, cuTENSOR and cuQuantum (but not CUDA Toolkit or the driver, please make sure the CUDA libraries are visible through your LD_LIBRARY_PATH) are installed for you.

If you build cuQuantum Python from source, please make sure that the paths to the CUDA, cuQuantum, and cuTENSOR libraries are added to your LD_LIBRARY_PATH environment variable, and that a compatible CuPy is installed.

Known issues:

  • If a system has multiple copies of cuTENSOR, one of which is installed in a default system path, the Python runtime could pick it up despite cuQuantum Python is linked to another copy installed elsewhere, potentially causing a version-mismatch error. The proper fix is to remove cuTENSOR from the system paths to ensure the visibility of the proper copy. DO NOT ATTEMPT to use LD_PRELOAD to overwrite it --- it could cause hard to debug behaviors!
  • Please ensure that you use consistent binaries and packages for either CUDA 12 or 13. Mixing-and-matching will result in undefined behavior.

Samples

Samples for demonstrating the usage of both low-level and high-level Python APIs are available in the samples directory. The low-level API samples are 1:1 translations of the corresponding samples written in C. The high-level API samples demonstrate pythonic usages of the cuTensorNet and cuDensityMat library in Python.

Testing

If pytest is installed, typing pytest tests at the command prompt in the Python source root directory will run all tests. Some tests would be skipped if cffi is not installed or if the environment variable CUDA_PATH is not set.

Citing cuQuantum

H. Bayraktar et al., "cuQuantum SDK: A High-Performance Library for Accelerating Quantum Science", 2023 IEEE International Conference on Quantum Computing and Engineering (QCE), Bellevue, WA, USA, 2023, pp. 1050-1061, doi: 10.1109/QCE57702.2023.00119

Metadata

Release files for cuquantum-python-cu13 26.11.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 cuquantum-python-cu13 26.11.0
File Actions
cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details for cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_x86_64.whl
cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ ARM64 Details for cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_aarch64.whl
cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_x86_64.whl
cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details for cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_aarch64.whl
cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_x86_64.whl
cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details for cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_aarch64.whl
cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_x86_64.whl
cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details for cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_aarch64.whl

Total release size: 84.6 MB

Release files / cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_x86_64.whl

Download URL cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_x86_64.whl
Size 10.4 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fbd0ad4a33ec9d4fd4ca24bc01e96bd5d1315792f8fe0c7011818f6dc851fded
BLAKE2b-256 checksum
How to use checksums
13a0777155803ddac49ad1dd19650169e0639f232fe48f1c9475a2b2c0ff9ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_aarch64.whl

Download URL cuquantum_python_cu13-26.11.0-cp314-cp314-manylinux2014_aarch64.whl
Size 10.6 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
cfcaf28c59a476e4788ab519b2f74e3b4772249d9a7bbc4282668dc1e4d62dc5
BLAKE2b-256 checksum
How to use checksums
2f8cdf10990e2f87cce5daf0e5324f638995d991c86bc74fd1d9ad7e5f823076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_x86_64.whl

Download URL cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_x86_64.whl
Size 10.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fc34c181b785459dd6b3c139dbdd8b6da012e14e8a61683859c85ba8515b1e6c
BLAKE2b-256 checksum
How to use checksums
44760f5231c39e937689efb8bdc5bf38ce078bbadc5261b8eafacd1a3f36935c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_aarch64.whl

Download URL cuquantum_python_cu13-26.11.0-cp313-cp313-manylinux2014_aarch64.whl
Size 10.6 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
55f874285c8c330ea11d95371723f0295b6596288ee1210d73abea0b385748f7
BLAKE2b-256 checksum
How to use checksums
d93a09f1f48f9b5d9eba52ece3c36a566baea1001fb7e253601285c47cce7afc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_x86_64.whl

Download URL cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_x86_64.whl
Size 10.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b65aefd6c20c8550ab5cf3332525d259994352dfa9e6b564d92a7382bb1b792f
BLAKE2b-256 checksum
How to use checksums
5212c58775a7f2bf89821ff2f87306e05ba8b4b172f4e04eb2bc5a07fe3559cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_aarch64.whl

Download URL cuquantum_python_cu13-26.11.0-cp312-cp312-manylinux2014_aarch64.whl
Size 10.7 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
afbf8c1f0498f61103487d335cbf43b8cd84561ff84cc425c10f16b1c4149ab6
BLAKE2b-256 checksum
How to use checksums
9c8d8f56a6e36a72ae0aaa3212c92bf5af9d4c86c707d75f38de9769ded21bee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_x86_64.whl

Download URL cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_x86_64.whl
Size 10.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b39b364a63d7e8595eea5b6666b7c1c0ecc9a7c4bcd3e878e411b27edb8ff07f
BLAKE2b-256 checksum
How to use checksums
c647d98acc603901170416d1676db3f41c17d469596576ccee6c8a6ef54d3f49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_aarch64.whl

Download URL cuquantum_python_cu13-26.11.0-cp311-cp311-manylinux2014_aarch64.whl
Size 10.7 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
b98831c8fc5ad543b7c15251fb39a9665b2b1cd4a1baf30a81421eba6e0f9638
BLAKE2b-256 checksum
How to use checksums
b7b7ff2ded67a87547cd32bf74e5f4356dec5a5b7b3df68419228bd5088b49f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for cuquantum-python-cu13 26.11.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