pennylane
pennylane copied to clipboard
Jitting Projector gives ValueError
Towards #4977.
Opened a new PR, please review and let me know if I need to do anything else.
[sc-52777]
Thanks for the fresh PR @AnuravModak :)
hey @albi3ro , is there anything else i need to do for this PR, i can see it has some merge conflicts in changelog-dev.md, not sure why its giving that issue, do you want me to resolve it?
Next steps would be:
- [ ] Make sure all tests are passing.
It looks like right now we are seeing failures with error like:
AttributeError: 'numpy.ndarray' object has no attribute 'at'
This is due to the fact that at
syntax should only be used if we have confirmed that the interface is actually jax:
if qml.math.get_interface(basis_state) == "jax":
# perform jax logic
return value
# perform non jax logic
return value
Once we have fixed the failing tests, the next step would be to:
- [ ] Add a test covering the situation we are trying to fix.
Since this would be a jit-test, it would need to be an integration test where we jit a qnode. The failing example in the issue can serve as a good starting point for this test.