amazon-braket / amazon-braket-sdk-python

A Python SDK for interacting with quantum devices on Amazon Braket
https://aws.amazon.com/braket/
Apache License 2.0
294 stars 118 forks source link

feat: Raise an error when an AutoQASM program is nested inside another program #962

Closed rmshaffer closed 2 months ago

rmshaffer commented 2 months ago

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

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

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.