Hi! Here’s my question.
After installing cuQuantum and Lightning[gpu] plugin,
I tried to use the code below:
dev = qml.device("lightning.gpu", wires=n_qubits)
But I got the error message below:
/bin/python3 /home/zoe_jack/test_penny/hymenoptera_data/pennytest.py
Traceback (most recent call last):
File "/home/zoe_jack/test_penny/hymenoptera_data/pennytest.py", line 39, in <module>
dev = qml.device("lightning.gpu", wires=n_qubits)
File "/home/zoe_jack/.local/lib/python3.10/site-packages/pennylane/__init__.py", line 336, in device
plugin_device_class = plugin_devices[name].load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2465, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2471, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/zoe_jack/.local/lib/python3.10/site-packages/pennylane_lightning/lightning_gpu/__init__.py", line 17, in <module>
from .lightning_gpu import LightningGPU
File "/home/zoe_jack/.local/lib/python3.10/site-packages/pennylane_lightning/lightning_gpu/lightning_gpu.py", line 23, in <module>
from pennylane_lightning.core.lightning_base import (
File "/home/zoe_jack/.local/lib/python3.10/site-packages/pennylane_lightning/core/lightning_base.py", line 30, in <module>
from pennylane.devices import DefaultQubitLegacy
ImportError: cannot import name 'DefaultQubitLegacy' from 'pennylane.devices' (/home/zoe_jack/.local/lib/python3.10/site-packages/pennylane/devices/__init__.py)
What’s wrong with my code or installation? Plz help me to solve it!
(PennyLane version : 0.32.0)