Hi everyone, I would like to ask you how I can install the lightning.qubit in my macbookair.
My mac has 1.6 GHz dual core intel core i5 and installs Sonoma 14.1.1. For this, I tried to install the lightning.qubit while constructing an environment with anaconda3, as follows,
conda create -n test -y python=3.9
conda run -n test pip install pennylane-lightning
Then, activating the environment “test”, as follows,
conda activate test
we run the following codes in the python,
import pennylane as qml
dev = qml.device(“lightning.qubit”, wires=2)
Then, I got the following warning,
/Users/test/anaconda3/envs/qlstm-env/lib/python3.9/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:824: 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 — Lightning 0.34.0-dev20 documentation.
This would say that the lightning.qubit is not used.
Following the last comment of the warning, I tried
PL_BACKEND=lightning_qubit pip install pybind11 pennylane-lightning --no-binary :all:
, but I obtained the same result.
The other useful information I can share would be the result of qml.about() :
Name: PennyLane
Version: 0.33.1
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
Home-page: GitHub - PennyLaneAI/pennylane: PennyLane is a cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural network.
Author:
Author-email:
License: Apache License 2.0
Location: /Users/test/anaconda3/envs/qlstm-env/lib/python3.9/site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane-Lightning
Platform info: macOS-10.16-x86_64-i386-64bit
Python version: 3.9.18
Numpy version: 1.26.2
Scipy version: 1.11.4
Installed devices:
- default.gaussian (PennyLane-0.33.1)
- default.mixed (PennyLane-0.33.1)
- default.qubit (PennyLane-0.33.1)
- default.qubit.autograd (PennyLane-0.33.1)
- default.qubit.jax (PennyLane-0.33.1)
- default.qubit.legacy (PennyLane-0.33.1)
- default.qubit.tf (PennyLane-0.33.1)
- default.qubit.torch (PennyLane-0.33.1)
- default.qutrit (PennyLane-0.33.1)
- null.qubit (PennyLane-0.33.1)
- lightning.qubit (PennyLane-Lightning-0.33.1)
Finally, I note that, even if I install the pennylane at a different python version, including 3.10 and 3.11, I get the same result (lightning.qubit does not work).
Could anyone teach me how I can successfully install the lightning.qubit ?
Thank you for your advice.