catalyst
catalyst copied to clipboard
Apply instrumentation to each pass within NamedSequenceOp
Context:
For saving IR, apply-transform-sequence pass is counted as a single pass instead of potentially many passes
@qjit(keep_intermediate='pass', verbose=True)
@apply_pass("merge-rotations")
@apply_pass("remove-chained-self-inverse")
@qml.qnode(qml.device("lightning.qubit", wires=2))
def test_chained_apply_passes_workflow(x: float):
qml.Hadamard(wires=[1])
qml.RX(x, wires=[0])
qml.RX(-x, wires=[0])
qml.Hadamard(wires=[1])
return qml.expval(qml.PauliY(wires=0))
test_chained_apply_passes_workflow(0.1)
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues:
#1909 [sc-95633]
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 97.47%. Comparing base (5ebe59f) to head (633cd32).
:warning: Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1978 +/- ##
=======================================
Coverage 97.47% 97.47%
=======================================
Files 93 93
Lines 10817 10817
Branches 1038 1038
=======================================
Hits 10544 10544
Misses 211 211
Partials 62 62
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.