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

Usability: Warning when user calls "return" from their autoqasm entry point function #661

Conversation

laurencap
Copy link
Contributor

@laurencap laurencap commented Aug 7, 2023

Issue #, if available:

Description of changes:

Warn if the called function returns a value

Testing done:

New unit tests

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@laurencap laurencap requested a review from a team as a code owner August 7, 2023 21:29
@laurencap laurencap requested a review from kshitijc August 7, 2023 21:30
@laurencap laurencap changed the title Warning when user calls "return" from their autoqasm entry point function Usability: Warning when user calls "return" from their autoqasm entry point function Aug 7, 2023
@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #661 (378aeb9) into feature/autoqasm (10a80e2) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@                 Coverage Diff                  @@
##           feature/autoqasm     #661      +/-   ##
====================================================
- Coverage             99.92%   99.92%   -0.01%     
====================================================
  Files                   148      149       +1     
  Lines                  8764     8752      -12     
  Branches               1879     1872       -7     
====================================================
- Hits                   8757     8745      -12     
  Misses                    4        4              
  Partials                  3        3              
Files Changed Coverage Δ
...erimental/autoqasm/converters/return_statements.py 100.00% <100.00%> (ø)
...ket/experimental/autoqasm/transpiler/transpiler.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@yitchen-tim
Copy link
Contributor

Looks great!

Copy link
Contributor

@rmshaffer rmshaffer left a comment

Choose a reason for hiding this comment

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

Makes sense overall, thanks for doing this! Left a few comments/questions.

@laurencap laurencap force-pushed the lcap/aq-error-msgs-no-return-from-main branch from 3540278 to 378aeb9 Compare August 8, 2023 18:43
@laurencap laurencap merged commit 97f6cab into amazon-braket:feature/autoqasm Aug 9, 2023
27 of 28 checks passed
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.

3 participants