[BUG] qjit/jit compatibility with operators that do similar things to Superposition
is hit-or-miss
#6790
Labels
bug 🐛
Something isn't working
Expected behavior
I expect that the input types for templates like
Superposition
are more robust.This doesn't work (nasty tracer error) because
bases
is a JAX array, but works when it's vanilla Numpy. Similar things happen whencoeffs
is defined as follows:Actual behavior
Tracer errors
Additional information
We've had internal discussions about this, and this may be fixable with changes to
is_abstract(coeffs)
. This issue would also happen with other templates likeBasisState
.Source code
Tracebacks
System information
Name: PennyLane Version: 0.40.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: /Users/isaac/.virtualenvs/pl-latest/lib/python3.11/site-packages Requires: appdirs, autograd, autoray, cachetools, diastatic-malt, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, tomlkit, typing_extensions Required-by: PennyLane-Catalyst, PennyLane_Lightning Platform info: macOS-15.2-arm64-arm-64bit Python version: 3.11.9 Numpy version: 2.0.2 Scipy version: 1.13.0 Installed devices: - default.clifford (PennyLane-0.40.0) - default.gaussian (PennyLane-0.40.0) - default.mixed (PennyLane-0.40.0) - default.qubit (PennyLane-0.40.0) - default.qutrit (PennyLane-0.40.0) - default.qutrit.mixed (PennyLane-0.40.0) - default.tensor (PennyLane-0.40.0) - null.qubit (PennyLane-0.40.0) - reference.qubit (PennyLane-0.40.0) - nvidia.custatevec (PennyLane-Catalyst-0.9.0) - nvidia.cutensornet (PennyLane-Catalyst-0.9.0) - oqc.cloud (PennyLane-Catalyst-0.9.0) - softwareq.qpp (PennyLane-Catalyst-0.9.0) - lightning.qubit (PennyLane_Lightning-0.39.0)
Existing GitHub issues
The text was updated successfully, but these errors were encountered: