amazon-braket-default-simulator-python icon indicating copy to clipboard operation
amazon-braket-default-simulator-python copied to clipboard

Support contiguous qubits for OpenQASM IR

Open yitchen-tim opened this issue 1 year ago • 1 comments

Description of changes:

  • Qubits are mapped to contiguous qubits before simulation
  • Adapt the indices of measuredQubit in the returned simulation result

Testing done: tox

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

  • [x] I have read the CONTRIBUTING doc
  • [x] I used the commit message format described in CONTRIBUTING
  • [x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • [x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [x] I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

yitchen-tim avatar Apr 05 '24 15:04 yitchen-tim

Codecov Report

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

Project coverage is 100.00%. Comparing base (420aeaf) to head (1b9fdcf). Report is 28 commits behind head on main.

:exclamation: Current head 1b9fdcf differs from pull request most recent head ae762a6

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #237   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        48           
  Lines         3770      3798   +28     
  Branches       915       925   +10     
=========================================
+ Hits          3770      3798   +28     

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

codecov[bot] avatar Apr 05 '24 15:04 codecov[bot]