Skip to content

Add a default fallback for the equal_up_to_global_phase protocol #6950

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

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

dstrain115
Copy link
Collaborator

  • This will add a default fallback for cirq.Gate instances to use their unitary decomposition for the equal_up_to_global_phase protocol.

Fixes: #6574

- This will add a default fallback for cirq.Gate instances to use
their unitary decomposition for the equal_up_to_global_phase protocol.

Fixes: quantumlib#6574
@dstrain115 dstrain115 requested review from vtomole and a team as code owners January 14, 2025 14:40
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@5ffb3ad). Learn more about missing BASE report.
Report is 64 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6950   +/-   ##
=======================================
  Coverage        ?   97.86%           
=======================================
  Files           ?     1084           
  Lines           ?    94413           
  Branches        ?        0           
=======================================
  Hits            ?    92401           
  Misses          ?     2012           
  Partials        ?        0           

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

@CirqBot CirqBot added the size: S 10< lines changed <50 label Jan 18, 2025
@babacry
Copy link
Collaborator

babacry commented Jan 21, 2025

cc: @babacry

@dstrain115 dstrain115 added this pull request to the merge queue Jan 28, 2025
Merged via the queue into quantumlib:main with commit b73eb28 Jan 28, 2025
37 checks passed
@dstrain115 dstrain115 deleted the fix_equal_up_to_global_phase branch January 28, 2025 17:36
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
…ntumlib#6950)

* Add a default fallback for the equal_up_to_global_phase protocol

- This will add a default fallback for cirq.Gate instances to use
their unitary decomposition for the equal_up_to_global_phase protocol.

Fixes: quantumlib#6574

* Add fallback if no unitary exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

equal_up_to_global_phase on gates doesn't work as expected
4 participants