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

fix!: Use latest results extension spec #370

Merged
merged 3 commits into from
Aug 12, 2024
Merged

fix!: Use latest results extension spec #370

merged 3 commits into from
Aug 12, 2024

Conversation

mark-koch
Copy link
Collaborator

@mark-koch mark-koch commented Aug 12, 2024

Fixes #369 and fixes #365.

Make Guppy conform with the latest results spec introduced in CQCL/tket2#494

BREAKING CHANGE:

  • Result tags are now strings instead of ints
  • Only numeric values and arrays thereof are allowed as results

@mark-koch mark-koch requested a review from ss2165 August 12, 2024 11:51
@mark-koch mark-koch requested a review from a team as a code owner August 12, 2024 11:51
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 7 lines in your changes missing coverage. Please review.

Project coverage is 91.32%. Comparing base (7bf419f) to head (8fe1191).

Files Patch % Lines
guppylang/compiler/expr_compiler.py 80.64% 6 Missing ⚠️
examples/random_walk_qpe.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
- Coverage   91.42%   91.32%   -0.10%     
==========================================
  Files          47       47              
  Lines        5249     5294      +45     
==========================================
+ Hits         4799     4835      +36     
- Misses        450      459       +9     

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

Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

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

Some minor queries

guppylang/compiler/expr_compiler.py Outdated Show resolved Hide resolved
Comment on lines +304 to +305
assert isinstance(ty_arg, TypeArg)
assert isinstance(len_arg, ConstArg)
Copy link
Member

Choose a reason for hiding this comment

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

can these asserts result in unhelpful errors?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, failing asserts would be a compiler bug since you shouldn't be able to construct an array type with invalid args

guppylang/prelude/_internal.py Outdated Show resolved Hide resolved
@mark-koch mark-koch requested a review from ss2165 August 12, 2024 12:55
Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

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

LGTM

@mark-koch mark-koch added this pull request to the merge queue Aug 12, 2024
Merged via the queue into main with commit d9cc8d2 Aug 12, 2024
3 checks passed
@mark-koch mark-koch deleted the fix/results branch August 12, 2024 12:59
github-merge-queue bot pushed a commit that referenced this pull request Aug 12, 2024
🤖 I have created a release *beep* *boop*
---


## [0.9.0](v0.8.1...v0.9.0)
(2024-08-12)


### ⚠ BREAKING CHANGES

* 

### Bug Fixes

* Use latest results extension spec
([#370](#370))
([d9cc8d2](d9cc8d2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants