Hello,
When I install PennyLane-Lightning, I can use it perfectly.
But then I install PennyLane-Braket, I run the same code, it gave me the following error:
C:\important_software\anaconda\envs\pl\lib\site-packages\pennylane_lightning\lightning_qubit.py:704: UserWarning: Pre-compiled binaries for lightning.qubit are not available. Falling back to using the Python-based default.qubit implementation. To manually compile from source, follow the instructions at Installation — PennyLane-Lightning 0.29.0-dev11 documentation.
warn(
Hence, I suspect that PennyLane-Braket Plugin is not compatible with PennyLane-Lightning Plugin because I found PennyLane-Braket requires a lower version for PennyLane compared to PennyLane-Lightning.
Hi @Ban_Wong,
PennyLane-Lightning already comes with the latest PennyLane versions so you don’t need to install it on the side. And PennyLane-Lightning definitely works with Braket! I think you may have a code issue here. If you share your code we may be able to figure out what’s going on here.
I have tried that again and did not install PennyLane-Lightning on the side. The issue still exists.
UserWarning: Pre-compiled binaries for lightning.qubit are not available. Falling back to using the Python-based default.qubit implementation. To manually compile from source, follow the instructions at Installation — PennyLane-Lightning 0.29.0-dev11 documentation.
warn(
here is code:
import pennylane as qml
from pennylane import numpy as np
dev1 = qml.device(“lightning.qubit”, wires=1)
Hi @Ban_Wong,
The best option in this case is to create a new virtual environment.
Usually having the latest Python and PennyLane versions is best. Using Python 3.8-3.11 and PennyLane 0.28 should work for you. I would recommend that you follow these steps. Note that where it says “name_of_your_environment
" you can choose any name that you want:
Create a new conda environment with:conda create --name name_of_your_environment python=3.11
Activate the environment:conda activate name_of_your_environment
After this you can install the needed packages:python -m pip install pennylane amazon-braket-pennylane-plugin
Please let me know if this works for you! If this doesn’t solve your issue please post the output of qml.about()
and your full error traceback.