-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix decompositions with LightningQubit
#687
Conversation
[sc-61467] |
"BasisState", | ||
"QubitStateVector", | ||
"StatePrep", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the reference, these ops are also decomposed in Catalyst by default
pennylane-lightning/pennylane_lightning/lightning_qubit/lightning_qubit.toml
Lines 72 to 78 in d0e1c51
decomp = [ | |
"BasisState", | |
"QubitStateVector", | |
"StatePrep", | |
"QFT", | |
"MultiControlledX", | |
] |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/test_templates #687 +/- ##
=========================================================
Coverage ? 95.72%
=========================================================
Files ? 173
Lines ? 24507
Branches ? 0
=========================================================
Hits ? 23459
Misses ? 1048
Partials ? 0 ☔ View full report in Codecov by Sentry. |
LightningQubit
LightningQubit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. +1 on @maliasadi 's suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. One more +1 to @maliasadi's suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @mudit2812 .
Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mudit2812! Nice job 🥳
…ix LQ decomposition strategy of QFT and GroverOperator (#684) * Add test for QSVT. * Auto update version * Update changelog. * Add tests for embedding, layer and stateprep templates. * Parametrize tests over n_qubits. * Add qchem template tests. * Add a few misc template tests. * Auto update version * trigger ci * Fix serialize. * Fix formatting. * Update tests/test_templates.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_templates.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Add xfail condition for AmplitudeEmbedding. * Fix pytest.skip top cond. * Update tests/test_templates.py Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/_serialize.py Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Add breaking tests for if not observable * trigger ci * Auto update version * Fix decompositions with `LightningQubit` (#687) * Fix bug; add tests; update changelog * Auto update version * Update tests * Update qft/grover decomp * Addressing code review * Update pennylane_lightning/lightning_qubit/lightning_qubit.py Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Trigger CI * Auto update version --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Fix test params --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
Context:
PL Issue #5526. State prep operations in the middle of circuits were not being decomposed with
lightning.qubit
.Description of the Change:
stopping_condition
to decomposeqml.QFT
andqml.GroverOperator
if number of wires is >= 10 or 13 respectively.Benefits:
Feature parity with
default.qubit
/oldlightning.qubit
.Possible Drawbacks:
Related GitHub Issues: