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.0+
  • cuTensorNet 2.14.0+
  • cuDensityMat >=0.7.0, <0.8.0
  • cuPauliProp >=0.5.0, <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

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp314-cp314-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp314-cp314-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9cae5e74c0d6bf5dcfc1ebc40033fd241c622583f58106ab91c6890edc8c754
MD5 c633f35fcb59d570386d8c4bc5e967af
BLAKE2b-256 49c288aaac975753278ec5cc13f9ae0f27404c180ab2d860294a49d69b458e28

See more details on using hashes here.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp314-cp314-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp314-cp314-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dd71af221d66adfb6525fbff97e8760209dda1886477a17cd07028c7cec521c3
MD5 08943e7c296787af46ecacb7b57fdcc7
BLAKE2b-256 8b9e986ea82f0aa0b89bf48aa228ecdb5a09f2e42c3de9dbd5301a46aa549d21

See more details on using hashes here.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp313-cp313-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp313-cp313-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4a0876ca9c43f936f8e5ea476cffc6a99f4aa0090fdbe12ff510267a14c557dc
MD5 78b5df4c198b8ecb8c1a8d81c27dafdf
BLAKE2b-256 6314cc2c3385de7dbd06290db7156e133808804e2f8fa5f7c869087f6354e84c

See more details on using hashes here.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp313-cp313-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp313-cp313-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 524efcdc4a15dafad9336e873d41a6b2ab377ea709ad04b5c084e854a802bb6f
MD5 306a745b9165d7de9257b23b3ba21b58
BLAKE2b-256 76622e7f98800359e48e8addeb345cf4126b6cc04472f4c6a35675559b784ad8

See more details on using hashes here.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7190d646f42b937f8b82b056c19052f6bb20c897044ddfd5332754b5f4faf229
MD5 47e4fd80e07875ef6d95de9b7cae166c
BLAKE2b-256 8a0e168954ec8d26880c14bb5c286a9a033132ae43aa6e6cceea54340793e82f

See more details on using hashes here.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp312-cp312-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f727d306be9aee1936a937010d6ee56844e1a1568ec5484278c8c3ef947cdffb
MD5 2cf6cef124997ed00de43d43c6bb9284
BLAKE2b-256 3e739052875e49d5554abe06ffc07d4498a82b8311bbfbf76b39eeace8cec8ba

See more details on using hashes here.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d76005de71f97d6086f9b34f1829a7b671e3d753e6eb35c66faed91c1509335
MD5 ed2824243497581caa991fff309d7f36
BLAKE2b-256 35f8edf8881c8e2e7fc853676349d5de97149a7a8090c412329e999259a8629e

See more details on using hashes here.

File details

Details for the file cuquantum_python_cu12-26.9.0-cp311-cp311-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for cuquantum_python_cu12-26.9.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4cd3878a1bfc51b08c0711e781e3e616f9306d8dd6993a82bd71544b32c0c403
MD5 750c52b0c31619f6c1a468a72b47af47
BLAKE2b-256 417bea26ce3a17454addc2527b59fe73f2629793f7e44f78aa34209904bcef7f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

26.9.0 This release

8 files

26.6.0

8 files

26.3.2

6 files

26.3.1

6 files

26.3.0

6 files

26.1.0

6 files

25.11.1

6 files

25.11.0

6 files

25.9.1

12 files

25.9.0

6 files

25.6.0

6 files

25.3.0.post0

6 files

25.3.0

6 files

24.11.0

6 files

24.8.0

6 files

24.3.0.post1

8 files

23.10.0

6 files

23.6.0

6 files

23.3.0

8 files

0.0.1.dev0

1 file

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