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

Update type hints #753

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

laurencap
Copy link
Contributor

@laurencap laurencap commented Oct 21, 2023

Issue #, if available: Closes #754

Description of changes:

Update type hints to use built-ins rather than typing. This is recommended for Python 3.9+.

This also allows us to remove a bit of code from api.py which was handling these different inputs, as AutoQASM needs to inspect type hints.

Testing done:
no new functionality, updates handled by existing 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.

@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f51964f) 100.00% compared to head (8bd9f7f) 100.00%.
Report is 8 commits behind head on feature/autoqasm.

❗ Current head 8bd9f7f differs from pull request most recent head 3b0683a. Consider uploading reports for the commit 3b0683a to get more accurate results

Additional details and impacted files
@@                Coverage Diff                 @@
##           feature/autoqasm      #753   +/-   ##
==================================================
  Coverage            100.00%   100.00%           
==================================================
  Files                   162       162           
  Lines                  9660      9650   -10     
  Branches               2080      2077    -3     
==================================================
- Hits                   9660      9650   -10     
Files Coverage Δ
src/braket/experimental/autoqasm/api.py 100.00% <100.00%> (ø)
...experimental/autoqasm/instructions/instructions.py 100.00% <100.00%> (ø)
...experimental/autoqasm/instructions/measurements.py 100.00% <100.00%> (ø)
...raket/experimental/autoqasm/instructions/qubits.py 100.00% <100.00%> (ø)
...rc/braket/experimental/autoqasm/program/program.py 100.00% <100.00%> (ø)
src/braket/experimental/autoqasm/pulse/pulse.py 100.00% <100.00%> (ø)
...ket/experimental/autoqasm/transpiler/transpiler.py 100.00% <100.00%> (ø)
src/braket/experimental/autoqasm/types/types.py 100.00% <100.00%> (ø)

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

@laurencap laurencap marked this pull request as ready for review October 23, 2023 15:30
@laurencap laurencap requested a review from a team as a code owner October 23, 2023 15:30
@laurencap laurencap requested a review from speller26 October 23, 2023 15:36
@laurencap laurencap merged commit a079c52 into amazon-braket:feature/autoqasm Oct 23, 2023
20 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