-
Notifications
You must be signed in to change notification settings - Fork 118
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
[UnitaryHack]Barrier and Delays #980
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on! If you'd like to continue toward merging this, please ensure that you add tests to validate the new functionality and reach 100% code coverage. You can use tox
to run linters and unit tests locally.
@@ -68,6 +69,8 @@ class SingleNegControlModifier: | |||
(Gate.Ry, "ry", ir.Ry, [SingleTarget, Angle], {}), | |||
(Gate.Rz, "rz", ir.Rz, [SingleTarget, Angle], {}), | |||
(Gate.U, "u", None, [SingleTarget, TripleAngle], {}), | |||
(Gate.Barrier, "barrier", None, [SingleTarget], {}), | |||
(Gate.Delay, "delay", None, [Duration, SingleTarget], {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on! If you'd like to continue toward merging this, please ensure that you add tests to validate the new functionality and reach 100% code coverage.
Hi @rmshaffer , I did some changes in the test file and the input file. I could get some unit tests passing for Barrier
but not Delay
. Its complaining about missing parameter "duration".
Q1. Schema modification in amazon-braket-schemas
doesnt work
- Step 1: Cloning the
amazon-braket-schemas
repo and adding below class.
class Duration(BaseModel):
duration: confloat(ge=0)
-
Step 2: Installed editable version of
amazon-braket-schemas
by runningpip install -e .
inamazon-braket-schemas
. -
Step 3: Run the Unit tests in this repo(aka
amazon-braket-sdk-python
). They still failedQ2: Bind values
And its confusing to me how do we decide whether to use
bind_values
or not. Gates derieved fromAngledGate
callbind_values
function butUnitary
gate which takes 2D matrix, hasTwoDimensionalMatrix
atamazon-braket-schemas
repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rmshaffer , did you get a chance to look into this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rmshaffer , the coverage is now 100%. For now, I have added Duration
class here. Could you please help regarding this?
PS: Working to fix tests. I realized that OpenQASM isnt working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rmshaffer , I have raised #993 which has 100% test coverage so that I can follow commit message format. I didnt want to do git rebase
. Could you please review it?
@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.) |
Closing this PR in favor of #992 |
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: |
Issue , if available:
Fixes #974
Testing done:
OUTPUT
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.