amazon-braket / Braket.jl

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

change: use nospecialize for some calls for compilation and make sure… #92

Closed kshyatt-aws closed 2 months ago

kshyatt-aws commented 3 months ago

… basis rotation instructions are counted

Issue #, if available: N/A

Description of changes: use @nospecialize for some methods to avoid unnecessary compilations. Also, make sure the qubits in basis_rotation_instructions are counted for Programs in case we have non-contiguous measurements.

Testing done: Unit tests passed 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[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.04%. Comparing base (a389d80) to head (b0a71aa).

Files Patch % Lines
src/local_simulator.jl 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #92 +/- ## ======================================= Coverage 89.03% 89.04% ======================================= Files 36 36 Lines 3914 3915 +1 ======================================= + Hits 3485 3486 +1 Misses 429 429 ```

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

kshyatt-aws commented 2 months ago

The examples will be unhappy until we tag a new version