New released QiliSDK 0.3.1 version enhances multi-GPU execution to its backend powered by NVIDIA CUDA-Q. Any emulation that no longer fits in the memory of one GPU can now be spread across all the GPUs of a node, with no change to the user code. A benchmark was run on a node with four NVIDIA RTX PRO 6000 NVIDIA Blackwell GPUs, allowing emulation of random circuits of 34 qubits, two qubits beyond what a single GPU can hold, and run them about five times faster than on the QiliSim CPU simulator by surpassing CPU bottlenecks.
Multimodal quantum computing at Qilimanjaro
Qilimanjaro’s systems run inside European HPC centres and through Qilimanjaro Speqtrum® following a multimodal approach: analog and digital quantum processors that work next to CPUs and GPUs, in the same facility and under the same software.
This multimodal approach also shapes the questions Qilimanjaro works on: what industrial-scale quantum computing infrastructure requires, how AI, HPC and quantum processing converge in the same facility, and what a stronger and more sovereign European quantum ecosystem needs underneath it.
For users, software is what makes this multimodal setup work in practice. QiliSDK is the layer that lets one program move between CPUs, GPUs and quantum processors, with a CUDA-Q-powered backend that connects it to GPUs.
QiliSDK in a nutshell
QiliSDK is an open-source Python framework for developing, running and emulating both digital and analog quantum algorithms, built by Qilimanjaro. Its modular design covers prototyping circuits, building Hamiltonians, designing variational workflows and defining quantum reservoir models, and all of them can be deployed on local or remote backends.
QiliSDK is the software that glues multimodality: the same high-level code can target a laptop CPU, a GPU, an analog or a digital QPU, so the boundary between classical and quantum execution is handled by the software and not by the user.
Backends
Emulation in QiliSDK is available through three backends: QiliSim, QutipBackend and CudaqBackend. QiliSim is the CPU simulator built by Qilimanjaro. It has almost no start-up cost, which makes it the natural choice for small circuits and quick iteration.
QutipBackend uses QuTip, a well-known library for simulating the dynamics of open quantum systems. Last, the CudaqBackend, drawing on NVIDIA CUDA-Q and introduced in a previous post, wraps CUDA-Q and uses it to select the right target for the workload:
- State vector emulation on one GPU (fp32 or fp64) or on several GPUs, with a CPU fallback.
- Tensor networks i matrix product states (with bond-dimension truncation) for circuits whose entanglement allows it.
- Dynamics for direct analog evolution of time-dependent Hamiltonians, without Trotterisation.
The CudaqBackend also supports noisy emulation. A QiliSDK NoiseModel is converted into its CUDA-Q equivalent, with bit-flip, phase-flip, depolarising, Kraus and Lindblad channels that can be set globally, per gate type, per qubit or per (gate, qubit) pair.
Multi-GPU execution
A state-vector emulator stores 2ⁿ complex amplitudes for n qubits, so every additional qubit doubles the memory needed. On a single GPU, that memory is the limit. With double precision, a 32-qubit state takes 64 GiB, which fits in the 96 GB of a single GPU. A 33-qubit state takes 128 GB, which does not.
The CudaqBackend can now distribute the state vector across all the GPUs of a node, which pools their memory, using four NVIDIA RTX PRO 6000 Blackwell GPU, summing a total of 380 GB of memory, enough for a 34-qubit state (256 GiB in double precision). The QiliSDK program does not change: the same circuit runs on one GPU or on several.
Benchmark
Workload and hardware
The benchmark sampled random Clifford+T circuits with 1,000 gates and 100 samples, from 4 to 34 qubits. Every point is the average of 5 runs. Three configurations of QiliSDK 0.3.1 were compared: QiliSim on CPU, CUDA-Q 0.16.0.post1 on a single GPU, and CUDA-Q 0.16.0.post1 on four GPUs. All runs used the same machine: an Intel Xeon Platinum 8559C with 1,024 GB of RAM and four NVIDIA RTX PRO 6000 Blackwell Server Edition GPUs (96 GB each).
from qilisdk.digital import Circuit, H, X, Y, Z, CNOT, T
from qilisdk.backends import CudaqBackend
from qilisdk.functionals import DigitalPropagation
from qilisdk.readout import Readout
# General settings
nqubits = 5
nshots = 100
ngates = 1000
# Random circuit
c = Circuit.random(nqubits=nqubits, ngates=ngates, single_qubit_gates=[H, X, Y, Z, T],
two_qubit_gates=[CNOT])
# Set everything up
func = DigitalPropagation(c)
readout = Readout().with_sampling(nshots=nshots)
backend = CudaqBackend()
# Run the simulation
res = backend.execute(func, readout)
print(res)
Results
Figure 1 shows the execution time of the three configurations from 4 to 34 qubits. For small circuits, every run finishes in under a second. Up to about 20 qubits, QiliSim completes them in 13 to 30 ms, while CUDA-Q carries a fixed overhead of about 0.35 s per run that does not depend on the number of qubits, so at these sizes the run time reflects set-up rather than emulation.
As circuits grow, the GPU execution takes the lead. QiliSim’s time roughly doubles with each added qubit: at 25 qubits it takes about 0.4 s against 0.5 s for CUDA-Q, and at 26 qubits CUDA-Q is already ahead (0.6 s against 0.9 s). From there the gap widens with every qubit: at 30 qubits the GPU takes about 4 s against 15 s on CPU, and at 32 qubits about 15 s against 62 s (Figure 1).
Multi-GPU execution extends the reachable size. Up to 32 qubits, the single-GPU and multi-GPU curves in Figure 1 overlap, so distributing the state vector across four GPUs adds no noticeable cost. Beyond 32 qubits a single GPU runs out of memory, while the four-GPU configuration continues to 33 and 34 qubits, where one run takes 50 s, about 5 times faster than on CPU.
Figure 1. Execution time (log scale) for random circuit sampling, 4 to 34 qubits.
Which backend to use?
For the heaviest workloads, from 33 qubits up to the memory of the node, NVIDIA CUDA-Q on multiple GPUs is the configuration to use: pooling the memory of every GPU in the node removes the single-GPU limit, and at 34 qubits it runs about 5 times faster than CPU emulators. Between about 26 and 32 qubits, a single GPU is enough, being 1.4 to 4 times faster than CPU, with a speed-up that grows with every added qubit. Below about 25 qubits, QiliSim on CPU remains a convenient option for quick prototyping and iteration.
Conclusion
Multi-GPU support removes the single-GPU memory limit from QiliSDK’s CUDA-Q-powered backend. A state-vector emulation reaches 34 qubits on four 96 GB GPUs, without affecting the performance from the limit of a single GPU (32 qubits) to the limit of the benchmarked hardware (34 qubits). The same program runs on a laptop, a single GPU, a multi-GPU node or in Qilimanjaro Quantum Computers: the user writes the algorithm once and the software chooses where it runs.
Get started with QiliSDK
- Instal·la: pip install qilisdk
- Docs (EN / ES / CA): https://qilimanjaro-tech.github.io/qilisdk/
- Font: https://github.com/qilimanjaro-tech/qilisdk
- Cita: DOI 10.5281/zenodo.20411054