PennyLaneAI / PennyLaneAI/catalyst
Failure to qjit two workflows transformed by `clifford_t_decomposition` and gridsynth when using AOT capture
Open
@josephleekl is already working on this.
Since Oct 22, 2025.
bug
upstream
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
@qml.qjit()
@partial(qml.transforms.clifford_t_decomposition, method="gridsynth")
@qml.qnode(qml.device('lightning.qubit', wires=1))
def c():
qml.H(0)
#qml.RZ(x, 0)
qml.RZ(0.5, 0)
return qml.expval(qml.X(0))
@qml.qjit()
@partial(qml.transforms.clifford_t_decomposition, method="gridsynth")
@qml.qnode(qml.device('lightning.qubit', wires=1))
def c2(x):
qml.RZ(x, 0)
return qml.expval(qml.X(0))
c2(0.5)
If one qnode with AOT capture transformed by clifford_t_decomposition with grid_synth has already been defined, another new qnode transformed by the same transform cannot be compiled.
This does not happen if the first qjit object is captured on the first call. It does not matter if the second workflow is AOT or lazily captured.
While it looks like method="sk" is causing concretization problems with parametrized inputs, it does not cause failures with AOT capture.
This is mostly just really weird.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.