Skip to main content

NVIDIA cuQuantum Python

Project description

cuQuantum Python

Documentation

Please visit the NVIDIA cuQuantum Python documentation.

Building

Requirements

Build-time dependencies of the cuQuantum Python package and some versions that are known to work are as follows:

  • CUDA Toolkit 11.x
  • cuQuantum 22.07+
  • cuTENSOR 1.5.0+
  • Python 3.8+
  • Cython - e.g. 0.29.21
  • packaging

Install cuQuantum Python from conda-forge

If you already have a Conda environment set up, it is the easiest to install cuQuantum Python from the conda-forge channel:

conda install -c conda-forge cuquantum-python

The Conda solver will install all required dependencies for you.

Install cuQuantum Python from PyPI

Alternatively, assuming you already have a Python environment set up (it doesn't matter if it's a Conda env or not), you can also install cuQuantum Python this way:

pip install cuquantum-python

The pip solver will also install both cuTENSOR and cuQuantum for you.

Note: To properly install the wheels the environment variable CUQUANTUM_ROOT must not be set.

Install cuQuantum Python from source

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

  1. Set CUDA_PATH to point to your CUDA installation
  2. Set CUQUANTUM_ROOT to point to your cuQuantum installation
  3. Set CUTENSOR_ROOT to point to your cuTENSOR installation
  4. Make sure CUDA, cuQuantum and cuTENSOR are visible in your LD_LIBRARY_PATH
  5. Run pip install -v .

Notes:

  • For the pip install step, adding the -e flag after -v would allow installing the package in-place (i.e., in "editable mode" for testing/developing).
  • If CUSTATEVEC_ROOT and CUTENSORNET_ROOT are set (for the cuStateVec and the cuTensorNet libraries, respectively), they overwrite CUQUANTUM_ROOT.
  • For local development, set CUQUANTUM_IGNORE_SOLVER=1 to ignore the dependency on the cuquantum wheel.

Running

Requirements

Runtime dependencies of the cuQuantum Python package include:

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

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

If you build cuQuantum Python from source, please make sure the paths to the cuQuantum and cuTENSOR libraries are added to your LD_LIBRARY_PATH environment variable.

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!
  • In certain environments, if PyTorch is installed import cuquantum could fail (with a segmentation fault). It is currently under investigation and a temporary workaround is to import torch before importing cuquantum.

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

Pleae click this Zenodo badge to see the citation format: DOI

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-22.7.1-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

  • Download URL: cuquantum_python-22.7.1-cp310-cp310-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.10
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for cuquantum_python-22.7.1-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa99abffb192ce9e960d9541574368dc44ca411edc31a7c3f811af3c758e9885
MD5 5b74c6f2d590d5faaf3000751305def8
BLAKE2b-256 3541e5b3218b3d98e2ad6345a260e3af75c16e8643c4a717961c1e79727cbc1a

See more details on using hashes here.

File details

Details for the file cuquantum_python-22.7.1-cp310-cp310-manylinux2014_aarch64.whl.

File metadata

  • Download URL: cuquantum_python-22.7.1-cp310-cp310-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.10
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for cuquantum_python-22.7.1-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8879e7ec1e418ac5962408f8d31ac8ab1f9b18ec64f5616d82dc853a7e9ecb3a
MD5 a39df3fc3a1018ba4076018780e17e41
BLAKE2b-256 f58eab51ef762a91ce6118aaea64d3dd0a644f9be5b50fd5b8a6c7ac199b87e7

See more details on using hashes here.

File details

Details for the file cuquantum_python-22.7.1-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

  • Download URL: cuquantum_python-22.7.1-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for cuquantum_python-22.7.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 330d8046e99bde0a44fb01292f65dba971d10d15b789ea9b7b1051f1b6d559ce
MD5 b944c59691d6e67fea0a90b054f54f07
BLAKE2b-256 24c320fbbe4052fbcac8b0277d08377c1155ee0036c4d4021279d9655193f989

See more details on using hashes here.

File details

Details for the file cuquantum_python-22.7.1-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

  • Download URL: cuquantum_python-22.7.1-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for cuquantum_python-22.7.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 206cb51a7471250737477be7b5dc169d0f473cb03a57595ea16db90c5bcbf8ea
MD5 301ac663cb90c92379e11754f1ea1ae6
BLAKE2b-256 7366b1275b33150baf4fcc789b4570022d7e1fbf2d1ebf08ef462c9493f691ae

See more details on using hashes here.

File details

Details for the file cuquantum_python-22.7.1-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: cuquantum_python-22.7.1-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for cuquantum_python-22.7.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b38fcaaa844a4edbc1a168072646c50c70ffcaf28fde75148e08c062ce314c5e
MD5 9cc91d937086200eabfa0dfbeae2128a
BLAKE2b-256 2c2d8d9d1b5c16a2cd925022e05bf2cd1e49f530fc053197d9c42665ba2109d0

See more details on using hashes here.

File details

Details for the file cuquantum_python-22.7.1-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

  • Download URL: cuquantum_python-22.7.1-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.9.13

File hashes

Hashes for cuquantum_python-22.7.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 908a1021d07849433663d88a4c67f8722bf950d4061aef49c7cf75302ad01a9d
MD5 c925c24164c2f08c3e33dc4f1dbc1cfe
BLAKE2b-256 4ef166a05e87636da32964e98242a57d5d5e0b3fcc5b0d3e7a8a71350461956b

See more details on using hashes here.

Supported by

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