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

feat: add boolean xor support #747

Merged
merged 3 commits into from
Jan 3, 2025
Merged

feat: add boolean xor support #747

merged 3 commits into from
Jan 3, 2025

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Dec 23, 2024

implement with not and equality for now - can be replaced with op once CQCL/hugr#1418 is done

Closes #750

implement with not and equality for now - can be replaced with op once CQCL/hugr#1418 is done
@ss2165 ss2165 requested a review from a team as a code owner December 23, 2024 17:20
@ss2165 ss2165 requested a review from acl-cqc December 23, 2024 17:20
@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.00%. Comparing base (ee8926b) to head (61bef9d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
guppylang/std/builtins.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #747      +/-   ##
==========================================
- Coverage   93.00%   93.00%   -0.01%     
==========================================
  Files          71       71              
  Lines        8151     8178      +27     
==========================================
+ Hits         7581     7606      +25     
- Misses        570      572       +2     

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

@ss2165 ss2165 requested review from mark-koch and removed request for acl-cqc January 3, 2025 16:04
# TODO: Use hugr op once implemented: https://github.com/CQCL/hugr/issues/1418
@guppy
def __xor__(self: bool, other: bool) -> bool:
return not (self == other) # noqa: SIM201
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should definitely add a __ne__ implementation 😅

Raised an issue #750

@ss2165 ss2165 requested a review from mark-koch January 3, 2025 16:23
Copy link
Collaborator

@mark-koch mark-koch left a comment

Choose a reason for hiding this comment

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

Thanks!

@ss2165 ss2165 enabled auto-merge January 3, 2025 16:27
@ss2165 ss2165 added this pull request to the merge queue Jan 3, 2025
Merged via the queue into main with commit 7fa4c8d Jan 3, 2025
4 checks passed
@ss2165 ss2165 deleted the ss/xor branch January 3, 2025 16:30
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.

Add bool.__ne__ method
3 participants