Skip to content
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

Revert special handling of PhaseShift in ctrl #5148

Merged
merged 3 commits into from
Feb 2, 2024
Merged

Revert special handling of PhaseShift in ctrl #5148

merged 3 commits into from
Feb 2, 2024

Conversation

astralcai
Copy link
Contributor

Context:
Multi-wire controlled PhaseShift should not be converted to a one-less-wire controlled ControlledPhaseShift

Description of the Change:

  • qml.ctrl no longer convert multi-wire controlled PhaseShift to a one-less-wire controlled ControlledPhaseShift
  • Special handling of multi-wire controlled PhaseShift in decompositions

Benefits:

  1. Fixes test failing in lightning
  2. Correct decomposition of multi-wire controlled PhaseShift

@astralcai astralcai marked this pull request as ready for review February 2, 2024 18:28
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast turnaround 🎉

I think that adding the backslash to the link should pacify sphinx, but if not we can just remove the duplicate link.

@astralcai astralcai enabled auto-merge (squash) February 2, 2024 18:52
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (127beeb) 99.69% compared to head (066a3dd) 99.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5148      +/-   ##
==========================================
- Coverage   99.69%   99.68%   -0.01%     
==========================================
  Files         394      394              
  Lines       36075    35801     -274     
==========================================
- Hits        35964    35689     -275     
- Misses        111      112       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@astralcai astralcai merged commit 35af47f into master Feb 2, 2024
35 checks passed
@astralcai astralcai deleted the cp-bug branch February 2, 2024 18:52
@trbromley
Copy link
Contributor

Multi-wire controlled PhaseShift should not be converted to a one-less-wire controlled ControlledPhaseShift

What do we currently do in the case where there is a single control wire on the PhaseShift? Do we still convert it to a ControlledPhaseShift?

@astralcai
Copy link
Contributor Author

Multi-wire controlled PhaseShift should not be converted to a one-less-wire controlled ControlledPhaseShift

What do we currently do in the case where there is a single control wire on the PhaseShift? Do we still convert it to a ControlledPhaseShift?

Yes we do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants