Closed maliasadi closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.96%. Comparing base (
76df3f7
) to head (2d611ba
). Report is 203 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Before submitting
Please complete the following checklist when submitting a PR:
[x] All new functions and code must be clearly commented and documented.
[x] Ensure that code is properly formatted by running
make format
. The latest version of black andclang-format-14
are used in CI/CD to check formatting.[x] All new features must include a unit test. Integration and frontend tests should be added to
frontend/test
, Quantum dialect and MLIR tests should be added tomlir/test
, and Runtime tests should be added toruntime/tests
.When all the above are checked, delete everything above the dashed line and fill in the pull request template.
Context: We currently don't check if an unsupported controlled operation has a matrix and always prefer applying the operation as a QubitUnitary over PL's decomposition rules. As the result applying the controlled operations like
TrotterProduct
is not supported in Catalyst. This PR fixes the issue by checkingoperation.has_matrix
before trying to generate & use the unitary matrix.Description of the Change:
ctrl(TrotterProduct)
Benefits: Support control of gates without matrix. For example, QJIT compiling
ctrl(TrotterProduct)
would throw the following compiler error without the proposed patch:Possible Drawbacks:
Related GitHub Issues: [sc-66427]