Getting Started¶
In this section, we briefly describe how to install cuQuantum which contains both cuStateVec and cuTensorNet.
For C/C++ users, the easiest way to get started is through the installation from conda-forge described below. More detailed explanations on installation, compilation and usage of each component can be found in cuStateVec Guide and cuTensorNet Guide.
For Python users, cuQuantum Python delivers all functionalities of cuStateVec and cuTensorNet with Python APIs. The easiest way to get started with cuQuantum Python is also through installation from conda-forge described below. For more detailed guide on the installation and usage, please refer to cuQuantum Python Guide.
Install cuQuantum from conda-forge¶
If you already have a Conda environment set up (if not, Miniforge/Mambaforge is a great starting point), cuQuantum can be easily installed from the conda-forge channel, via:
conda install -c conda-forge cuquantum
If you need to select the target CUDA version, use the new cuda-version
package:
conda install -c conda-forge cuquantum cuda-version=12
The conda
solver will install all required dependencies for you. The package is installed to the current $CONDA_PREFIX
, so you can simply update the environment variable as follows:
export CUQUANTUM_ROOT=$CONDA_PREFIX
Note
To enable automatic MPI parallelism for cuTensorNet, you can install cuquantum
with an MPI from conda-forge, e.g., conda install -c conda-forge cuquantum openmpi
.
For detailed guide, please refer to cuTensorNet Guide.
Install cuQuantum Python from conda-forge¶
Similar to the cuQuantum installation introduced above, cuQuantum Python can also be easily installed from the conda-forge channel, via:
conda install -c conda-forge cuquantum-python
The conda
solver will install all required dependencies for you. Again, the cuda-version
metapackage can be used to constrain the CUDA version.
Install cuQuantum from NVIDIA DevZone¶
cuQuantum package can be downloaded or installed from https://developer.nvidia.com/cuQuantum-downloads?target_os=Linux Further, the cuTensorNet component relies upon the functionality of the cuTENSOR package, available for download at https://developer.nvidia.com/cutensor.
For tarball users, once the tarball file is downloaded to CUQUANTUM_ROOT
directory,
you can unpack it via:
tar zxvf cuquantum-linux-xxxxx-aa.bb.cc.dd-archive.tar.xz
and update the environment variable:
export CUQUANTUM_ROOT=/path/to/where/tarball/is/unpacked
Note
To enable automatic MPI parallelism for cuTensorNet, please refer to cuTensorNet Guide.
For rpm/deb users, We will be using rpm to illustrate some keypoints. For detailed instruction, please refer to the Download page linked above. Please note,
yum -y install cuquantum
The above installation command would install both cuQuantum SDK for CUDA 11.x and CUDA 12.x. CUDA 12.x would be the default. To switch between them, please use update-alternatives
sudo update-alternatives --config cuquantum
There are 2 programs which provide 'cuquantum'.
Selection Command
-----------------------------------------------
*+ 1 /usr/src/libcuquantum/12/distributed_interfaces
2 /usr/src/libcuquantum/11/distributed_interfaces
Enter to keep the current selection[+], or type selection number: 2
If you only need CUDA 11.x or CUDA 12.x, you may perform yum -y install cuquantum-cuda-11
or yum -y install cuquantum-cuda-12
.
When using the rpm/deb packages and the system compiler to build a cuQuantum-based program,
it is possible to set CUQUANTUM_ROOT
and/or CUSTATEVEC_ROOT
/CUTENSORNET_ROOT
to /usr/
.
Symlinks to the headers and shared libraries are set up by the package installer.
Note
Fedora 37 was supported starting from CUDA 12.0 Update 1, so only cuquantum-cuda-12
will be supported on Fedora 37.
cuQuantum Dependencies¶
Below we provide a summary of dependencies required for all cuQuantum components:
cuStateVec¶
GPU Architectures |
Volta, Turing, Ampere, Ada, Hopper |
NVIDIA GPU with Compute Capability |
7.0+ |
CUDA |
11.x, 12.x |
CPU architectures |
x86_64, ppc64le, ARM64 |
Operating System |
Linux |
Driver |
450.80.02+ (Linux) for CUDA 11.x
525.60.13+ (Linux) for CUDA 12.x
|
cuTensorNet¶
GPU Architectures |
Volta, Turing, Ampere, Ada, Hopper |
NVIDIA GPU with Compute Capability |
7.0+ |
CUDA |
11.x or 12.x |
CPU architectures |
x86_64, ppc64le, ARM64 |
Operating System |
Linux |
Driver |
450.80.02+ (Linux/CUDA 11) or 525.60.13+ (Linux/CUDA 12) |
cuTENSOR |
1.6.1+ |
cuQuantum Python¶
When Building |
When Running |
|
---|---|---|
Python |
3.9+ |
3.9+ |
pip |
22.3.1+ |
N/A |
setuptools |
>=61.0.0 |
N/A |
wheel |
>=0.34.0 |
N/A |
Cython |
>=0.29.22,<3 |
N/A |
cuStateVec |
1.4.0 |
~=1.3 |
cuTensorNet |
2.2.0 |
~=2.1 |
NumPy |
N/A |
v1.21+ |
CuPy (see CuPy installation guide) |
N/A |
v10.0.0+ |
PyTorch (optional, see PyTorch installation guide) |
N/A |
v1.10+ |
Qiskit (optional, see Qiskit installation guide) |
N/A |
v0.24.0+ |
Cirq (optional, see Cirq installation guide) |
N/A |
v0.6.0+ |
mpi4py (optional, see mpi4py installation guide) |
N/A |
v3.1.0+ |
cuQuantum Appliance¶
CUDA |
11.x |
Driver |
470.57.02+ (Linux) |