A Quantum Development Library
Project description
Welcome to the Quantum Rings SDK for NVIDIA GPU
Minimum System Requirements
A system with a configuration better than the minimum requirements is advised. Lower configurations may affect the number of qubits that can be supported and may perform poorly.
Operating systems recommended:
Ubuntu 22.04.4 LTS
Ubuntu 24.04.4 LTS
Windows 11 Pro
WSL2 based Linux Instances on Windows 11 Pro
64-bit Intel i9 x86 CPU (14 cores 20 logical processors recommended) or equivalent
DDR5 or better memory channels recommended
32 GB Installed physical memory
18 GB Available physical memory
64-bit Python version 3.11 or later
Supported GPU Architectures
Amphere, compute capabilities 8.0, 8.6
Hopper, compute capability 9.0
or later
A minimum of 4 GB public memory on the GPU is required to run the SDK. The actual amount of memory required depends upon the number of qubits used and the gate operations involved.
Installting the Quantum Rings SDK for NVidia GPU
Quantum Rings SDK now supports Nvidia GPUs, either in the native mode or together with the toolkit for Qiskit.
The following steps outline the installation procedure.
STEP - 1
Obtain your license to the Quantum Rings SDK by selecting the Login menu.
Skip this step, if you are already registered.
Login to the Quantum Rings portal. Download your access keys by selecting the Manage Keys menu in the left-hand side bar.
STEP - 2
Update the NVIDIA drivers for your system. For some linux installations, you may be required to install the NVIDIA drivers directly from the linux distribution. Search for the documentation from your linux operating system provider and go by their recommendation.
STEP - 3
Create a virtual environment for your python version using the following example.
virtualenv --python=/usr/bin/python3.11 myenv
source myenv/bin/activate
In some installations, the virtual environment can be created as follows:
python3.11 -m venv myenv
source myenv/bin/activate
Note that installing a python virtual environment may require additional steps.
You can optionally choose to install Jupyter notebook, at this time using the following command.
pip install notebook
STEP - 4
Install the CUDA Toolkit by following the instructions in the link: CUDA runtime
If the environment variables are not set properly, there will be linkage problems and the SDK will not load. If you are a Windows user, see additional instructions at the end of this page to setup the DLL search path with Python.
If you are using your university supercomputer or a cloud environment with NVIDIA GPUs, then your system administrator may have already installed the necessary runtime components optimized for your hadware platform. You may just have to select the cuda runtime module. This is typically done using a module loader, as shown below. Browse the modules installed in your system and select the most recent cuda run time. Note that your system may use a different way of loading runtime components.
module load cuda-12.6.1-gcc-12.1.0
STEP - 5
Install the Quantum Rings SDK using the following command:
pip install quantumrings-nvidia-gpu
STEP - 6
Store your credentials to the Quantum Rings SDK locally using the following commands from your terminal. Edit the <…> fields and enter the values provided for you.
If you are using the Jupyter notebook, open the termnial as follows:
From your Jupyter notebook, select File->New->Terminal. This launches the terminal window.
From this terminal window, create the configuration file holding the license key as follows:
mkdir ~/.config/quantumrings
echo -e '[default]\nemail = <YOUR_ACCOUNT_ID>\nkey = <YOUR_ACCESS_KEY>\nbackend = scarlet_quantum_rings' > ~/.config/quantumrings/quantumrings.conf
If you are a Windows user, create this file in the folder %APPDATA%\quantumrings\.
STEP - 7
Now, try the following program from your Jupyter notebook to ensure that everything is working fine.
# For Windows users. Linux users may skip this.
# Setup the CUDA Runtime path with Python
import os
cuda_path = os.getenv("CUDA_PATH", "")
if "" == cuda_path:
# set a hard-coded path based on your CUDA installation
cuda_path = "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.9\\bin"
else:
# create from the environment
cuda_path += "\\bin"
os.add_dll_directory(cuda_path)
##
#
import QuantumRingsLib
from QuantumRingsLib import QuantumRegister, AncillaRegister, ClassicalRegister, QuantumCircuit
from QuantumRingsLib import QuantumRingsProvider
from QuantumRingsLib import job_monitor
from QuantumRingsLib import JobStatus
from QuantumRingsLib import OptimizeQuantumCircuit
from matplotlib import pyplot as plt
import numpy as np
import math
provider = QuantumRingsProvider(token =<YOUR_TOKEN_HERE>, name=<YOUR_ACCOUNT_NAME_HERE>)
backend = provider.get_backend("amber_quantum_rings")
numberofqubits = 50
shots = 100
q = QuantumRegister(numberofqubits , 'q')
c = ClassicalRegister(numberofqubits , 'c')
qc = QuantumCircuit(q, c)
qc.h(0);
for i in range (qc.num_qubits - 1):
qc.cnot(i, i + 1);
qc.measure_all();
job = backend.run(qc, shots=shots)
job_monitor(job)
result = job.result()
counts = result.get_counts()
Using the GPU Mode
Certain programs with large number of qubits (> 22) with complex entanglements and a large number of gate operations can benefit from using a GPU.
To switch to the GPU mode, select the amber_quantum_rings backend as follows
backend = provider.get_backend("amber_quantum_rings")
To switch to the CPU mode, select the scarlet_quantum_rings backend as follows
backend = provider.get_backend("scarlet_quantum_rings")
You can also store backend name in the configuration file using the key backend and allow the method provider.get_backend select it automatically by not providing any arguments. For saving the backend name in the configuration file, please follow the instruction in the in the SDK. Once the backend name is saved in the configuration file, you can obtain the backend by providing no arguments to the provider.get_backend method as follows:
provider = QuantumRingsProvider()
backend = provider.get_backend()
Windows Users
Please note that the following dynamically linkable libraries are required in the search path for the SDK to load.
cublas64_X.dll
cublasLt64_X.dll
cudart64_X.dll
cusolver64_X.dll
cusparse64_X.dll
nvJitLink_X_Y.dll
In these library names, X and Y indicate your CUDA Runtime versions.
In some installations, Python does not load these libraries from the installed search paths. In such installations, before importing QuantumRingsLib, the directory where the CUDA Runtime components are installed is to be set with the os.add_dll_directory API. Otherwise import QuantumRingsLib will throw an exception ImportError: DLL load failed while importing QuantumRingsLib: The specified module could not be found. Add the path where the CUDA Runtime is installed as follows:
import os
os.add_dll_directory("C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.9\\bin")
import QuantumRingsLib
Edit the CUDA Runtime path to suit your installation.
Alternatively, if the environment variable CUDA_PATH is set, you can use the following code to set this automatically.
import os
cuda_path = os.getenv("CUDA_PATH", "")
if "" == cuda_path:
#set a hard-coded path
cuda_path = "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.9\\bin"
else:
#create from the environment
cuda_path += "\\bin"
os.add_dll_directory(cuda_path)
import QuantumRingsLib
Feedback and getting support
We love to hear from you! Please join our Discord community to discuss anything quantum computing.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantumrings_nvidia_gpu-0.10.213-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: quantumrings_nvidia_gpu-0.10.213-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89c7ca3293ad4377c6d79d8f14f15fc184b0fb468e62ad567fe0b274bc3ebfaf
|
|
| MD5 |
97c7df61f5706d6def3c4077b68dd877
|
|
| BLAKE2b-256 |
8e672a8145625f0e01317e51ea88ee3e958a7b259108de7ddcab50ec8092e1ca
|
File details
Details for the file quantumrings_nvidia_gpu-0.10.213-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: quantumrings_nvidia_gpu-0.10.213-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
021422d34f3d25a1be62f8a30cc866cd3ea4e04c717005af6875b3279a0a6ddd
|
|
| MD5 |
e60bd5096e6813e1140695074fde766b
|
|
| BLAKE2b-256 |
90080a8458d713a98f8e327b66a43328ce8bea328f1072a12712af2a579efcfb
|