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: Raise an error when an AutoQASM program is nested inside another program #962

Merged
merged 1 commit into from
May 6, 2024

Conversation

rmshaffer
Copy link
Contributor

Issue #, if available:
#809

Description of changes:
Raise a NestedMainProgramError if the user attempts to build an AutoQASM program from within the context of another AutoQASM program.

Testing done:
tox passes. Test previously marked xfail is now passing.

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.

@rmshaffer rmshaffer self-assigned this Apr 24, 2024
@rmshaffer rmshaffer changed the title fix: Raise an error when an AutoQASM program is nested inside another program feat: Raise an error when an AutoQASM program is nested inside another program Apr 24, 2024
@rmshaffer rmshaffer marked this pull request as ready for review April 24, 2024 16:23
@rmshaffer rmshaffer requested a review from a team as a code owner April 24, 2024 16:23
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8193c7c) to head (a7e7142).

Additional details and impacted files
@@                Coverage Diff                 @@
##           feature/autoqasm      #962   +/-   ##
==================================================
  Coverage            100.00%   100.00%           
==================================================
  Files                   172       172           
  Lines                 10540     10543    +3     
  Branches               2254      2255    +1     
==================================================
+ Hits                  10540     10543    +3     

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

@rmshaffer rmshaffer merged commit 72af596 into feature/autoqasm May 6, 2024
23 checks passed
@rmshaffer rmshaffer deleted the rmshaffer/issue-809 branch May 6, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add checker to verify no AutoQASM Program usage within @main wrapped Program definition
2 participants