[BUG] KeyError when running QNode(qfun, dev)(graph) with graph an instance of networkx Graph object #6585
Closed
1 task done
Labels
bug 🐛
Something isn't working
Expected behavior
Let
qfun
take a networkx Graph as an argument. When I callQNode(qfun, dev)(graph)
I expect not to get an error because no error occurs for arguments of different types (including various non numeric types).Actual behavior
Instead when I run
QNode(qfun, dev)(graph)
I getKeyError: 'networkx'
.Additional information
No response
Source code
Tracebacks
System information
Name: PennyLane Version: 0.39.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: /opt/miniconda3/envs/qml/lib/python3.11/site-packages Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, toml, typing-extensions Required-by: PennyLane_Lightning Platform info: macOS-15.1-arm64-arm-64bit Python version: 3.11.10 Numpy version: 1.26.4 Scipy version: 1.14.1 Installed devices: - default.clifford (PennyLane-0.39.0) - default.gaussian (PennyLane-0.39.0) - default.mixed (PennyLane-0.39.0) - default.qubit (PennyLane-0.39.0) - default.qutrit (PennyLane-0.39.0) - default.qutrit.mixed (PennyLane-0.39.0) - default.tensor (PennyLane-0.39.0) - null.qubit (PennyLane-0.39.0) - reference.qubit (PennyLane-0.39.0) - lightning.qubit (PennyLane_Lightning-0.39.0)
Existing GitHub issues
The text was updated successfully, but these errors were encountered: