Cannot Import Name 'adjoint_ops' from 'pennylane.devices.default_qubit' When Using lightning.qubit Device
Opened this issue · 1 comments
AIdjis commented
Issue description
when i use the lightning.qubit device i got the error below i already install pennylane-lightning
latest version.
Source code and tracebacks
import pennylane as qml
dev = qml.device("lightning.qubit", wires=2,)
File c:\Users\pc1\anaconda3\envs\quantum\lib\site-packages\pennylane_lightning\lightning_qubit\__init__.py:18
[14](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/__init__.py:14) """PennyLane lightning_qubit package."""
[16](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/__init__.py:16) from pennylane_lightning.core import __version__
---> [18](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/__init__.py:18) from .lightning_qubit import LightningQubit
File c:\Users\pc1\anaconda3\envs\quantum\lib\site-packages\pennylane_lightning\lightning_qubit\lightning_qubit.py:25
[23](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:23) import pennylane as qml
[24](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:24) from pennylane.devices import DefaultExecutionConfig, Device, ExecutionConfig
---> [25](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:25) from pennylane.devices.default_qubit import adjoint_ops
[26](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:26) from pennylane.devices.modifiers import simulator_tracking, single_tape_support
...
(...)
[34](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:34) validate_observables,
[35](file:///C:/Users/pc1/anaconda3/envs/quantum/lib/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:35) )
ImportError: cannot import name 'adjoint_ops' from 'pennylane.devices.default_qubit'
- System information:
Name: PennyLane
Version: 0.37.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: [c:\users\pc1\anaconda3\envs\quantum\lib\site-packages](file:///C:/users/pc1/anaconda3/envs/quantum/lib/site-packages)
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane-Honeywell, PennyLane-qiskit, PennyLane_Lightning
Platform info: Windows-10-10.0.22621-SP0
Python version: 3.10.13
Numpy version: 1.26.4
Scipy version: 1.14.0
Installed devices:
- default.clifford (PennyLane-0.37.0)
- default.gaussian (PennyLane-0.37.0)
- default.mixed (PennyLane-0.37.0)
- default.qubit (PennyLane-0.37.0)
- default.qubit.autograd (PennyLane-0.37.0)
- default.qubit.jax (PennyLane-0.37.0)
- default.qubit.legacy (PennyLane-0.37.0)
- default.qubit.tf (PennyLane-0.37.0)
- default.qubit.torch (PennyLane-0.37.0)
- default.qutrit (PennyLane-0.37.0)
- default.qutrit.mixed (PennyLane-0.37.0)
- default.tensor (PennyLane-0.37.0)
- null.qubit (PennyLane-0.37.0)
- honeywell.hqs (PennyLane-Honeywell-0.34.1)
- lightning.qubit (PennyLane_Lightning-0.37.0)
- qiskit.aer (PennyLane-qiskit-0.36.0)
- qiskit.basicaer (PennyLane-qiskit-0.36.0)
- qiskit.basicsim (PennyLane-qiskit-0.36.0)
- qiskit.ibmq (PennyLane-qiskit-0.36.0)
- qiskit.ibmq.circuit_runner (PennyLane-qiskit-0.36.0)
- qiskit.ibmq.sampler (PennyLane-qiskit-0.36.0)
- qiskit.remote (PennyLane-qiskit-0.36.0)