Raise an error or warning in qml.compile
if basis_set
contains operations instead of strings.
#6132
Labels
qml.compile
if basis_set
contains operations instead of strings.
#6132
Feature details
As the title suggests:
qml.compile
takes an argumentbasis_set
, which is expected to be a sequence of operation names, i.e. strings.If a user passes a sequence of PennyLane operator types, no error is raised but the basis set becomes equivalent to
[]
.It would be nice to raise a warning, or even an error, if users pass non-empty sequences that contain operators instead of operator names.
Implementation
Straightforward.
How important would you say this feature is?
1: Not important. Would be nice to have.
Additional information
No response
The text was updated successfully, but these errors were encountered: