Overview

Introduction

cuQuantum Python aims to bring the full functionalities of NVIDIA cuQuantum SDK to Python. To do so, we adopt a two-layer approach:

  1. Provide 1:1 Python wrappers for the corresponding C APIs in cuQuantum, including cuDensityMat, cuStateVec, and cuTensorNet.

  2. Provide high-level, pythonic APIs for easier integration with Python applications. These pythonic APIs can be further categorized into two different groups focusing on different quantum domain applications:

    • Quantum simulation based on exact tensor network contraction and approximate tensor network ansatz.

    • Analog quantum dynamics solvers based on the quantum many-body operators and density-matrix (or state-vector) formalism.

In the following sections, we will introduce each component and show examples for the intended usage. Python sample codes (such as those shown below) can be found in the NVIDIA/cuQuantum repository.

Command line support

The outputs of python -m cuquantum can be used in your build system to help discover the location of binaries used by cuQuantum Python.

usage: __main__.py [-h] [--includes] [--libs]
                   [--target {custatevec,cutensornet,cudensitymat}]

options:
  -h, --help            show this help message and exit
  --includes            get cuQuantum include flags
  --libs                get cuQuantum linker flags
  --target {custatevec,cutensornet,cudensitymat}
                        get the linker flag for the target cuQuantum component

Compatibility policy

cuQuantum Python is no different from any Python package, in that we would not succeed without depending on, collaborating with, and evolving alongside the Python community. Given these considerations, we strive to meet the following commitments:

  1. For the low-level Python bindings, we support the latest cuQuantum SDK.

  2. For the high-level pythonic APIs, we keep the APIs backward-compatible to the maximum extent possible. When a breaking change must happen, we raise a run-time warning in the release version YY.MM, also notify users in the release notes, and break it in the next release (after YY.MM). The only exception is the experimental APIs (e.g, the cuquantum.tensornet.experimental module and cuquantum.tensornet.Network.gradients() method) where all APIs are subject to change between releases without prior notice.

  3. We comply with NEP-29 and support a community-defined set of core dependencies (CPython, NumPy, etc).

Citing cuQuantum

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