NGC | Catalog
CatalogContainersNVIDIA cuQuantum Appliance

NVIDIA cuQuantum Appliance

For copy image paths and more information, please view on a desktop device.
Logo for NVIDIA cuQuantum Appliance

Description

The NVIDIA cuQuantum Appliance is a highly performant multi-GPU multi-node solution for quantum circuit simulation. It contains NVIDIA’s cuStateVec and cuTensorNet libraries which optimize state vector and tensor network simulation, respectively.

Publisher

NVIDIA

Latest Tag

23.03

Modified

June 1, 2023

Compressed Size

4.25 GB

Multinode Support

Yes

Multi-Arch Support

No

23.03 (Latest) Scan Results

Linux / amd64

NVIDIA cuQuantum Appliance

The NVIDIA cuQuantum Appliance is a highly performant multi-GPU multi-node solution for quantum circuit simulation. It contains NVIDIA’s cuStateVec and cuTensorNet libraries which optimize state vector and tensor network simulation, respectively. The cuTensorNet library functionality is accessible through Python for Tensor Network operations. With the cuStateVec libraries, NVIDIA provides the following simulators:

IBM’s Qiskit Aer frontend via cusvaer, NVIDIA’s distributed state vector backend solver.
a multi-GPU-optimized Google Cirq frontend via qsim, Google’s state vector simulator.


Prerequisites

Using NVIDIA’s cuQuantum Appliance NGC Container requires the host system to have the following installed:

Docker Engine
NVIDIA GPU Drivers
NVIDIA Container Toolkit
For supported versions, see the container release notes. No other installation, compilation, or dependency management is required.


Running the NVIDIA cuQuantum Appliance with Cirq or Qiskit

The command to pull the container is:

docker pull nvcr.io/nvidia/cuquantum-appliance:23.03

To run the container interactively:

docker run --gpus all -it --rm nvcr.io/nvidia/cuquantum-appliance:23.03

The examples are located under /home/cuquantum/examples. In the container:

(cuquantum-23.03) cuquantum@3581f249df8b:~/examples$ ls -al
total 36
drwxr-xr-x 2 cuquantum cuquantum 4096 Apr 12 22:37 .
drwxr-xr-x 1 cuquantum cuquantum 4096 Apr 12 22:47 ..
-rw-rw-r-- 1 cuquantum cuquantum 2150 Dec  2 00:11 ghz.py
-rw-rw-r-- 1 cuquantum cuquantum 7436 Dec  2 00:11 hidden_shift.py
-rw-rw-r-- 1 cuquantum cuquantum 1396 Apr  7 22:46 qiskit_ghz.py
-rw-rw-r-- 1 cuquantum cuquantum 8364 Dec  2 00:11 simon.py

To run any of the examples, simply use the following command from within the container:

(cuquantum-23.03) cuquantum@3581f249df8b:/home/cuquantum/examples$ python {example-name}.py

Each of the examples has a command-line interface. To query the interface’s help, run this command from within the container:

(cuquantum-23.03) cuquantum@3581f249df8b:/home/cuquantum/examples$ python {example-name}.py --help

For example:

(cuquantum-23.03) cuquantum@3581f249df8b:/home/cuquantum/examples$ python ghz.py --help
usage: ghz.py [-h] [--nqubits NQUBITS] [--nsamples NSAMPLES] [--ngpus NGPUS]
GHZ circuit
optional arguments:
  -h, --help           show this help message and exit
  --nqubits NQUBITS    the number of qubits in the circuit
  --nsamples NSAMPLES  the number of samples to take
  --ngpus NGPUS        the number of GPUs to use

All together from the host's command-line:

docker run --gpus all --rm nvcr.io/nvidia/cuquantum-appliance:23.03 python /home/cuquantum/examples/ghz.py --nqubits 30 --nsamples 1000 --ngpus 2

More sample codes, including multi-node computations by Qiskit, can be found in the NVIDIA/cuQuantum repository.


Utilizing the software environment in the container

A user account cuquantum has been set up with sudo privilege, and it is the user identity upon entry. The password can be found in $HOME/.README.

For installing your own C/C++/Python packages, we recommend using conda install -c conda-forge ... and installing them to the cuquantum-23.03 conda environment that we set up and activate (all pre-installed packages are installed to this environment too). pip install ... from PyPI.org also works. The Python interpreter in use is $CONDA_PREFIX/bin/python.

For building CUDA applications, the container has CUDA Toolkit 11.8 located at the common path /usr/local/cuda.

For building MPI applications, the container has a pre-installed, CUDA-aware Open MPI v4.1.4 located at /usr/local/openmpi/.

For a general guide on pulling and running containers, see Pulling a Container Image and Running a Container in the NGC Container User Guide.


Security notice

This section provides a summary of potential vulnerabilities that are evaluated as high severities by CVSS v3.1 standards. NGC registry integrates security scanning and its latest results are available in the Security Scanning section.

  • CVE ID: CVE-2023-24329
    • Description: An issue in the urllib.parse component of Python before v3.11 allows attackers to bypass blocklisting methods by supplying a URL that starts with blank characters.
    • Base Score: 7.5
    • Vector: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
    • Notes: The functionality is intended to parse URLs, which is not used by cuQuantum libraries inside the container.
  • CVE ID: CVE-2018-20225
    • Description: DISPUTED An issue was discovered in pip (all versions) because it installs the version with the highest version number, even if the user had intended to obtain a private package from a private index. This only affects use of the --extra-index-url option, and exploitation requires that the package does not already exist in the public index (and thus the attacker can put the package there with an arbitrary version number). NOTE: it has been reported that this is intended functionality and the user is responsible for using --extra-index-url securely.
    • Base Score: 7.8
    • Vector: AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
    • Notes: This CVE is still being re-evaluated by the Python community. This functionality is intended and not used by cuQuantum libraries inside the container.

Documentation

The NVIDIA cuQuantum Appliance documentation is hosted here.
A guide for using Qiskit can be found here.
A guide and tutorials for using Cirq can be found here.
A guide to getting started with qsimcirq can be found here.


Additional Resources

The NVIDIA cuQuantum SDK Homepage
The NVIDIA cuQuantum Python Bindings and Examples


License Agreement

The image is governed by the following NVIDIA End User License Agreement. By downloading the NVIDIA cuQuantum Appliance, you accept the terms and conditions of this license. The cuQuantum Appliance End User License Agreement can be viewed here. Since the image includes components licensed under open-source licenses, the source code for these components can be found here.