ImportError Traceback (most recent call last)
Cell In[1], line 7
3 from pennylane import numpy as np
6 n_qubits = 2
----> 7 dev = qml.device(“lightning.qubit”, wires=n_qubits+1)
9 @qml.qnode(dev, )
10 def circuit(weights, x):
12 qml.AmplitudeEmbedding(x, wires=range(n_qubits), normalize=True)
File ~/.conda/envs/cent7/2020.11-py38/tqc/lib/python3.9/site-packages/pennylane/devices/device_constructor.py:280, in device(name, *args, **kwargs)
274 raise qml.DeviceError(
275 f"The {name} plugin requires PennyLane versions {required_versions}, "
276 f"however PennyLane version {qml.version()} is installed."
277 )
279 # Construct the device
→ 280 dev = plugin_device_class(*args, **options)
282 # Once the device is constructed, we set its custom expansion function if
283 # any custom decompositions were specified.
284 if custom_decomps is not None:
File ~/.conda/envs/cent7/2020.11-py38/tqc/lib/python3.9/site-packages/pennylane_lightning/lightning_qubit/lightning_qubit.py:504, in LightningQubit.init(self, wires, c_dtype, shots, seed, mcmc, kernel_name, num_burnin, batch_obs)
491 def init( # pylint: disable=too-many-arguments
492 self,
493 wires,
(…)
501 batch_obs=False,
502 ):
503 if not self._CPP_BINARY_AVAILABLE:
→ 504 raise ImportError(
505 "Pre-compiled binaries for lightning.qubit are not available. "
506 "To manually compile from source, follow the instructions at "
507 “https://docs.pennylane.ai/projects/lightning/en/stable/dev/installation.html.”
508 )
510 super().init(wires=wires, shots=shots)
512 if isinstance(wires, int):
ImportError: Pre-compiled binaries for lightning.qubit are not available. To manually compile from source, follow the instructions at Installation — Lightning 0.39.0 documentation.
It was working when I have pennylane=0.28.0, but after upgrading to 0.38.0, it stopped working.
Name: PennyLane
Version: 0.38.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: /home/bhatia87/.conda/envs/cent7/2020.11-py38/xyz2/lib/python3.10/site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, toml, typing-extensions
Required-by: PennyLane_Lightning
Platform info: Linux-3.10.0-1160.108.1.el7.x86_64-x86_64-with-glibc2.17
Python version: 3.10.14
Numpy version: 1.23.5
Scipy version: 1.10.0
Installed devices:
- lightning.qubit (PennyLane_Lightning-0.38.0)
- default.clifford (PennyLane-0.38.0)
- default.gaussian (PennyLane-0.38.0)
- default.mixed (PennyLane-0.38.0)
- default.qubit (PennyLane-0.38.0)
- default.qubit.autograd (PennyLane-0.38.0)
- default.qubit.jax (PennyLane-0.38.0)
- default.qubit.legacy (PennyLane-0.38.0)
- default.qubit.tf (PennyLane-0.38.0)
- default.qubit.torch (PennyLane-0.38.0)
- default.qutrit (PennyLane-0.38.0)
- default.qutrit.mixed (PennyLane-0.38.0)
- default.tensor (PennyLane-0.38.0)
- null.qubit (PennyLane-0.38.0)