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

[UnitaryHack]Barrier and Delays #980

Closed Manvi-Agrawal closed 1 month ago

Manvi-Agrawal commented 1 month ago

Issue , if available:

Fixes https://github.com/amazon-braket/amazon-braket-sdk-python/issues/974

Testing done:

circ = Circuit().barrier([0, 1, 2]) circ = Circuit().delay([0, 1, 2], 30)

print(circ.to_ir("OPENQASM").source)


#### OUTPUT
```text
OPENQASM 3.0;
bit[3] b;
qubit[3] q;
delay[30 s] q[0], q[1], q[2];
b[0] = measure q[0];
b[1] = measure q[1];
b[2] = measure q[2];

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 1 month ago

Codecov Report

Attention: Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.

Project coverage is 99.89%. Comparing base (1c46ca7) to head (deb0202). Report is 2 commits behind head on main.

:exclamation: Current head deb0202 differs from pull request most recent head 86bb75f

Please upload reports for the commit 86bb75f to get more accurate results.

Files Patch % Lines
src/braket/circuits/gates.py 68.96% 9 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #980 +/- ## =========================================== - Coverage 100.00% 99.89% -0.11% =========================================== Files 135 135 Lines 8920 8948 +28 Branches 2002 2012 +10 =========================================== + Hits 8920 8939 +19 - Misses 0 9 +9 ```

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

Manvi-Agrawal commented 1 month ago

@rmshaffer , created https://github.com/amazon-braket/amazon-braket-sdk-python/pull/992 to use the commit format as prescibed.

rmshaffer commented 1 month ago

@rmshaffer , created #992 to use the commit format as prescibed.

The commit format is actually referring to the PR title, which is what becomes the commit title when the PR is squashed and merged. (The individual commits in the PR will disappear anyway when they are squashed and merged.)

rmshaffer commented 1 month ago

Closing this PR in favor of https://github.com/amazon-braket/amazon-braket-sdk-python/pull/992

Manvi-Agrawal commented 1 month ago

The commit format is actually referring to the PR title, which is what becomes the commit title when the PR is squashed and merged. (The individual commits in the PR will disappear anyway when they are squashed and merged.)

Thanks @rmshaffer for the clarification. I saw a couple of merged PRs like (https://github.com/amazon-braket/amazon-braket-sdk-python/pull/977/commits) which was following this convention

Do you think we can update the contributing doc and merge checklist to account for this fact, so that it doesnt confuse new people like me? Currently, merge checklist explicitly says: I used the commit message format described in CONTRIBUTING. Maybe say that I used the PR title format described in CONTRIBUTING to make it more clear. Thoughts?