Hello!
I am using lightning.gpu
to accelerate my quantum simulator, but I got an error when I ran it.
Here is the code I am testing:
dev = qml.device("lightning.gpu", wires=1)
The error I got is:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../anaconda/anaconda3/envs/QAG/lib/python3.10/site-packages/pennylane/__init__.py", line 393, in device
dev = plugin_device_class(*args, **options)
File ".../anaconda/anaconda3/envs/QAG/lib/python3.10/site-packages/pennylane_lightning/lightning_gpu/lightning_gpu.py", line 254, in __init__
super().__init__(wires, shots=shots, c_dtype=c_dtype)
File ".../anaconda/anaconda3/envs/QAG/lib/python3.10/site-packages/pennylane_lightning/core/lightning_base.py", line 74, in __init__
raise ImportError(
ImportError: Pre-compiled binaries for lightning.gpu are not available. To manually compile from source, follow the instructions at https://pennylane-lightning.readthedocs.io/en/latest/installation.html.
The version of PennyLane I am using is shown bellow:
Name: PennyLane
Version: 0.36.0
Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Home-page: https://github.com/PennyLaneAI/pennylane
Author:
Author-email:
License: Apache License 2.0
Location: .../anaconda/anaconda3/envs/QAG/lib/python3.10/site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane_Lightning, PennyLane_Lightning_GPU, PennyLane_Lightning_Kokkos, Quantum_Angle_Generator
Platform info: Linux-3.10.0-1160.105.1.el7.x86_64-x86_64-with-glibc2.17
Python version: 3.10.14
Numpy version: 1.26.4
Scipy version: 1.13.0
Installed devices:
- lightning.gpu (PennyLane_Lightning_GPU-0.36.0)
- default.clifford (PennyLane-0.36.0)
- default.gaussian (PennyLane-0.36.0)
- default.mixed (PennyLane-0.36.0)
- default.qubit (PennyLane-0.36.0)
- default.qubit.autograd (PennyLane-0.36.0)
- default.qubit.jax (PennyLane-0.36.0)
- default.qubit.legacy (PennyLane-0.36.0)
- default.qubit.tf (PennyLane-0.36.0)
- default.qubit.torch (PennyLane-0.36.0)
- default.qutrit (PennyLane-0.36.0)
- default.qutrit.mixed (PennyLane-0.36.0)
- null.qubit (PennyLane-0.36.0)
- lightning.kokkos (PennyLane_Lightning_Kokkos-0.36.0)
- lightning.qubit (PennyLane_Lightning-0.36.0)
The status of my GPU, as displayed by nvidia-smi
, is
Thu May 23 19:04:02 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla V100-SXM2... On | 00000000:15:00.0 Off | 0 |
| N/A 41C P0 43W / 300W | 0MiB / 32768MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 Tesla V100-SXM2... On | 00000000:16:00.0 Off | 0 |
| N/A 42C P0 45W / 300W | 0MiB / 32768MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
I would greatly appreciate any guidance or insights to help address this issue. Thank you!