*************** 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 :doc:`cuStateVec Guide ` and :doc:`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 :doc:`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: .. code-block:: bash conda install -c conda-forge cuquantum If you need to select the target CUDA version, use the new ``cuda-version`` package: .. code-block:: bash 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: .. code-block:: bash 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 :doc:`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: .. code-block:: bash 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: .. code-block:: bash tar zxvf cuquantum-linux-xxxxx-aa.bb.cc.dd-archive.tar.xz and update the environment variable: .. code-block:: bash export CUQUANTUM_ROOT=/path/to/where/tarball/is/unpacked .. note:: To enable automatic MPI parallelism for *cuTensorNet*, please refer to :doc:`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, .. code-block:: bash 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`` .. code-block:: bash 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 ---------- .. list-table:: :widths: 50 50 * - 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 ----------- .. list-table:: :widths: 50 50 * - 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 ---------------- .. list-table:: :widths: 50 25 25 :header-rows: 1 * - - 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 ------------------- .. list-table:: :widths: 50 50 * - CUDA - 11.x * - Driver - 470.57.02+ (Linux)