amazon-braket / Braket.jl

Experimental Julia implementation of the Amazon Braket SDK
Apache License 2.0
98 stars 7 forks source link

fix: qubit printing to OpenQASM and handling of OpenQasmProgram inputs #48

Closed kshyatt-aws closed 1 year ago

kshyatt-aws commented 1 year ago

Issue #, if available:

N/A

Description of changes:

Fix formatting of Qubit types when printing IR to OQ3. Fix handling of inputs in the case that an OpenQasmProgram has nothing in its inputs field. Added more tests and fixed a whitespace.

Testing done:

Tests pass locally.

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-commenter commented 1 year ago

Codecov Report

Base: 94.87% // Head: 95.22% // Increases project coverage by +0.34% :tada:

Coverage data is based on head (8923533) compared to base (28ae55c). Patch coverage: 87.50% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #48 +/- ## ========================================== + Coverage 94.87% 95.22% +0.34% ========================================== Files 33 33 Lines 3828 3830 +2 ========================================== + Hits 3632 3647 +15 + Misses 196 183 -13 ``` | [Impacted Files](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs) | Coverage Δ | | |---|---|---| | [src/compiler\_directive.jl](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL2NvbXBpbGVyX2RpcmVjdGl2ZS5qbA==) | `91.66% <0.00%> (ø)` | | | [src/raw\_schema.jl](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL3Jhd19zY2hlbWEuamw=) | `95.06% <ø> (ø)` | | | [src/circuit.jl](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL2NpcmN1aXQuamw=) | `99.34% <100.00%> (+0.88%)` | :arrow_up: | | [src/irtypes.jl](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL2lydHlwZXMuamw=) | `100.00% <100.00%> (+7.14%)` | :arrow_up: | | [src/observables.jl](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL29ic2VydmFibGVzLmps) | `99.33% <100.00%> (+2.00%)` | :arrow_up: | | [src/task.jl](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL3Rhc2suamw=) | `97.62% <100.00%> (+1.19%)` | :arrow_up: | | [src/Braket.jl](https://codecov.io/gh/awslabs/Braket.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL0JyYWtldC5qbA==) | `100.00% <0.00%> (+5.55%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.