amazon-braket-sdk-python icon indicating copy to clipboard operation
amazon-braket-sdk-python copied to clipboard

feat: add circuit drawer module with Matplotlib (#1083)

Open Qubit1718 opened this issue 6 months ago • 1 comments

Issue #, if available: #1083

Description of changes:

  1. Added a new file in src/braket/circuits/text_diagram_builders - matplotlib_circuit_diagram.py
  2. Added the new function(MatplotlibCircuitDiagram) into init.py
  3. Added matplotlib as requirement in setup.py
  4. Added a new file for testing

Testing done: Yes

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

  • [ 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.

Qubit1718 avatar Jun 12 '25 02:06 Qubit1718

Codecov Report

:x: Patch coverage is 87.01299% with 20 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 99.78%. Comparing base (47aad1f) to head (ce5b01c). :warning: Report is 87 commits behind head on main.

Files with missing lines Patch % Lines
...ext_diagram_builders/matplotlib_circuit_diagram.py 86.92% 11 Missing and 9 partials :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1094      +/-   ##
===========================================
- Coverage   100.00%   99.78%   -0.22%     
===========================================
  Files          137      138       +1     
  Lines         9246     9400     +154     
  Branches      1077     1110      +33     
===========================================
+ Hits          9246     9380     +134     
- Misses           0       11      +11     
- Partials         0        9       +9     

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

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 12 '25 13:06 codecov[bot]

Closing due to inactivity. Please re-open this one (or make a new PR) if you'd like to continue working on this!

rmshaffer avatar Jul 18 '25 15:07 rmshaffer