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

Add documentation about decorators #714

Merged

Conversation

laurencap
Copy link
Contributor

Add decorator documentation, link from README

Co-authored-by: Tim Chen <yitchen-tim>
Co-authored-by: Ryan Shaffer <[email protected]>
@laurencap laurencap requested a review from a team as a code owner September 27, 2023 20:18
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (3850d1e) 100.00% compared to head (0fc286c) 100.00%.
Report is 8 commits behind head on feature/autoqasm.

Additional details and impacted files
@@                Coverage Diff                 @@
##           feature/autoqasm      #714   +/-   ##
==================================================
  Coverage            100.00%   100.00%           
==================================================
  Files                   155       156    +1     
  Lines                  9395      9446   +51     
  Branches               2035      2040    +5     
==================================================
+ Hits                   9395      9446   +51     

see 5 files with indirect coverage changes

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

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.

Looks great, thanks for adding this! I left a few suggestions.

src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
Comment on lines +79 to +84
@aq.gate
def ch(q0: aq.Qubit, q1: aq.Qubit):
"""Define a controlled-Hadamard gate."""
ry(q1, -math.pi / 4)
cz(q0, q1)
ry(q1, math.pi / 4)
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this example!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can't take credit! @yitchen-tim

src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
src/braket/experimental/autoqasm/doc/decorators.md Outdated Show resolved Hide resolved
@rmshaffer
Copy link
Contributor

[nit] PR title should be prefixed with doc:

@laurencap laurencap merged commit 9cf49c2 into amazon-braket:feature/autoqasm Sep 28, 2023
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.

2 participants