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
295 stars 116 forks source link

feature: Introduce Validating Emulators with Noise Models to the SDK #1017

Open Altanali opened 1 month ago

Altanali commented 1 month ago

Issue #, if available:

Description of changes:

This PR introduces the notion of device emulators and emulation passes to the BDK; device emulators provide some form of program compilation and validation and may apply a noise model to the program before simulating the program on the BDK LocalSimulator.

AwsDevice specific emulators are created based on the device properties and capabilities; noise models for gate-based QPUs are created based on calibration data retrieved from Braket service when creating an AwsDevice.

Testing done:

Unit testing covers 99% of emulator passes and noise model generation based on AwsDevice calibration data. (TODO: Complete unit tests for 100% coverage).

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

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (ee63777) to head (baccbb1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1017 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 135 149 +14 Lines 9004 9495 +491 Branches 2019 2127 +108 ========================================== + Hits 9004 9495 +491 ```

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

speller26 commented 2 weeks ago

Looking good to me, let's see if @krneta has any feedback!