-
Notifications
You must be signed in to change notification settings - Fork 677
Improved decomposition of DiagonalQubitUnitary
#7370
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
Conversation
Co-authored-by: Korbinian Kottmann <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7370 +/- ##
==========================================
- Coverage 99.69% 99.69% -0.01%
==========================================
Files 529 529
Lines 50745 50738 -7
==========================================
- Hits 50590 50583 -7
Misses 155 155 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DiagonalQubitUnitary
DiagonalQubitUnitary
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 great and works perfectly! ✅
Context:
A diagonal unitary operator can be decomposed iteratively into
RZ
multiplexers (SelectPauliRot
) and a global phase.PennyLane is not using this quite established decomposition yet.
Similar to the
QubitUnitary
decomposition implemented in #7277, the method implemented here stems from Shende et al. (2004).It uses fewer CNOTs that the current implementation, but has larger classical computing/memory cost.
Description of the Change:
Replace current decomposition of
DiagonalQubitUnitary
by multiplexer-based decomposition.Also fixes a validation in
__init__
ofSelectPauliRot
to allow for parameter broadcasting.Benefits:
Quantumly cheaper decomposition of
DiagonalQubitUnitary
.Possible Drawbacks:
Increase classical computing /memory cost if the decomposition is carried out down to elementary gates (due toSelectPauliRot
decomposition).This increased classical cost is remedied by #7377
Related GitHub Issues:
[sc-90706]