You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PennyLane Lightning encounters a "filesystem error" when trying to access the scipy.libs directory due to an incorrect path construction. The error message indicates that a forward slash is missing before the ../../ sequence in the path.
Steps to Reproduce
Install PennyLane and PennyLane Lightning (latest versions).
Run any code that utilizes PennyLane Lightning's quantum operations.
Expected behavior: PennyLane Lightning should be able to locate and access the necessary SciPy files without errors.
Actual behavior: The following error occurs: RuntimeError: filesystem error: directory iterator cannot open directory: No such file or directory [/usr/local/lib/python3.10/dist-packages/pennylane_lightning/lightning_qubit_ops.cpython-310-x86_64-linux-gnu.so../../scipy.libs/]
Reproduces how often: 100%
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: /usr/local/lib/python3.10/dist-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane_Lightning
Thanks @xaviere97 for reporting this issue! This is actually an interesting one. Currently, Lightning doesn't support system-level Python binaries on Debian/Ubuntu distros where packages are installed in dist-packages instead of site-packages. We can provide a fix if requested. In the meantime, I suggest using venv to create a Python virtual environment and re-install pennylane-lightning in the default pip site-packages. You may also need to upgrade scipy on your machine to use the latest features of PennyLane.
Issue description
PennyLane Lightning encounters a "filesystem error" when trying to access the
scipy.libs
directory due to an incorrect path construction. The error message indicates that a forward slash is missing before the../../
sequence in the path.Expected behavior: PennyLane Lightning should be able to locate and access the necessary SciPy files without errors.
Actual behavior: The following error occurs: RuntimeError: filesystem error: directory iterator cannot open directory: No such file or directory [/usr/local/lib/python3.10/dist-packages/pennylane_lightning/lightning_qubit_ops.cpython-310-x86_64-linux-gnu.so../../scipy.libs/]
Reproduces how often: 100%
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: /usr/local/lib/python3.10/dist-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane_Lightning
Platform info: Linux-6.1.85+-x86_64-with-glibc2.35
Python version: 3.10.12
Numpy version: 1.25.2
Scipy version: 1.11.4
Installed devices:
Additional information
../../scipy.libs/
.Possible Solution
Adding the missing forward slash in the relevant PennyLane Lightning code might resolve the issue.
The text was updated successfully, but these errors were encountered: