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: Add @aq.hybrid_job decorator #21

Merged
merged 3 commits into from
Jun 7, 2024
Merged

Conversation

rmshaffer
Copy link
Contributor

@rmshaffer rmshaffer commented May 28, 2024

Issue #, if available:
#6

Description of changes:
Porting @yitchen-tim's changes from amazon-braket/amazon-braket-sdk-python#855 to the AutoQASM repo.

This includes the following changes as compared to the braket.jobs.hybrid_job decorator:

  • Persist source code of all inner functions of the job decorated function as .py files
  • Upload the .py files to the job as input data
  • Replace the source location of all inner functions to the respective path in the job

Testing done:
Tests added to cover all new code.

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 linked an issue May 28, 2024 that may be closed by this pull request
@rmshaffer rmshaffer self-assigned this May 28, 2024
Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (aebde14) to head (d1952ec).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #21   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           43        44    +1     
  Lines         1907      1991   +84     
  Branches       320       337   +17     
=========================================
+ Hits          1907      1991   +84     

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

@yitchen-tim yitchen-tim self-requested a review May 29, 2024 03:08
@yitchen-tim
Copy link
Contributor

Thanks for refactoring the code old PR. The PR looks good to me and I updated the doc. Should we make it a regular PR and merge it?

@rmshaffer rmshaffer marked this pull request as ready for review June 6, 2024 20:29
@rmshaffer rmshaffer requested a review from a team as a code owner June 6, 2024 20:29
@rmshaffer rmshaffer merged commit 24e6fa1 into main Jun 7, 2024
15 checks passed
@rmshaffer rmshaffer deleted the rmshaffer/hybrid-job-decorator branch June 7, 2024 14:39
@laurencap
Copy link
Contributor

🙌 🎉

atharva-satpute pushed a commit to atharva-satpute/autoqasm that referenced this pull request Jun 10, 2024
* Add @aq.hybrid_job decorator implementation

* Update hybrid_jobs.md

---------

Co-authored-by: Tim <[email protected]>
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.

Error when using AutoQASM with Braket @hybrid_job decorator
3 participants