Catalyst does not support QJIT-compiling a parameterized circuit with qml.ctrl
#1266
Labels
bug
Something isn't working
qml.ctrl
#1266
We discovered this issue when attempting to QJIT-compile a circuit implementing Grover's algorithm.
Consider the following PennyLane program that applies the qml.ctrl function to a Z gate, which results in an error only when
@qjit
is applied:The issue is that the input to the circuit,
basis_state
, which is a traced JAX array during compilation, is being using in Python control flow, which is not allowed. Using AutoGraph does not resolve the issue.The appropriate changes to Catalyst and/or PennyLane should be made to add support for controlled gates in QJIT-compiled circuits, where one of the input arguments to the parameterized circuit is used as input to
qml.ctrl
.The text was updated successfully, but these errors were encountered: