The qBraid Lab GPU server provides access to an NVIDIA Tesla V100 GPU, and is tailored for researchers and developers requiring enhanced computational capabilities. This high-performance Lab instance allows users to leverage GPUs for accelerated circuit simulation, to explore quantum machine learning applications with GPU-enabled quantum gradients, and more.

Launch GPU instance

Use the drop-down at the top of your account page to select the GPU Lab image, and then click Launch Lab.

Upon launching the GPU instance, you may see a warning similar to the following:

The GPU server is designed to auto-scale to maintain performance and availability, and thus, automatically creates additional pods as required by the workload. This warning message is an expected part of that scaling operation, which should only take a minute or two. During this time, do not refresh the page. If you encounter a 500 TimeOutError, click Home in the top-left, and re-start your server.

Configuration

qBraid Lab GPUs instances are configured with the following specification:

ProviderNVIDIA
GPU ArchitectureVolta
GPU NameTesla V100
CUDA12.0
Driver525.105.17

Further information can be retrieved using the NVIDIA System Management Interface (nvidia-smi) and NVIDIA CUDA Toolkit (nvcc) command line utilities.

GPU-enabled environments

The GPU Lab image comes pre-configured with the NVIDIA cuQuantum SDK GPU simulator library, and includes GPU integrations with other popular quantum softwares packages such as Pennylane-Lightning, Qiskit Aer, and Qsim-Cirq.

Pennylane-Lighting

PennyLane is a cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations. The PennyLane-Lightning-GPU plugin extends the Pennylane-Lightning state-vector simulator written in C++, and offloads to the NVIDIA cuQuantum SDK for GPU accelerated circuit simulation.

The lightning.gpu device is an extension of PennyLane’s built-in lightning.qubit device. It extends the CPU-focused Lightning simulator to run using the NVIDIA cuQuantum SDK, enabling GPU-accelerated simulation of quantum state-vector evolution.

A lightning.gpu device can be loaded using:

import pennylane as qml

dev = qml.device("lightning.qubit", wires=2)

The above device will allow all operations to be performed on the pre-configured CUDA capable GPU. If not used inside the qBraid GPU instance, or if the cuQuantum libraries are not installed in the given environment, the device will fall-back to lightning.qubit and perform all simulation on the CPU.

Qiskit Aer

Qiskit is an open-source framework for working with noisy quantum computers at the level of pulses, circuits, and algorithms. The Qiskit Aer library provides high-performance quantum computing simulators with realistic noise models.

On qBraid, the Qiskit Aer GPU environment comes with the qiskit-aer-gpu package, extending the same functionality of the canonical qiskit-aer package, plus the ability to run the GPU supported simulators: statevector, density matrix, and unitary.

Here is a basic example:

import qiskit
from qiskit_aer import AerSimulator

# Generate 3-qubit GHZ state
circ = qiskit.QuantumCircuit(3)
circ.h(0)
circ.cx(0, 1)
circ.cx(1, 2)
circ.measure_all()

# Construct an ideal simulator
aersim = AerSimulator(method='statevector', device='GPU')

# Perform an ideal simulation
result_ideal = qiskit.execute(circ, aersim).result()
counts_ideal = result_ideal.get_counts(0)
print('Counts(ideal):', counts_ideal)
# Counts(ideal): {'000': 493, '111': 531}