q-optimize / c3

Toolset for control, calibration and characterization of physical systems
https://c3-toolset.readthedocs.io/
Apache License 2.0
66 stars 36 forks source link

Add gate name setter #234

Closed YonatanGideoni closed 2 years ago

YonatanGideoni commented 2 years ago

What

Adds a setter/getter for the Instruction.name attribute (in a backwards compatible manner)

Why

When changing name directly ideal gate does not change accordingly - Closes #233

How

Implemented getter/setter and changed current name attribute to be _name. Also made the exporting/importing still work with this change.

Remarks

Should not break anything and be totally transparent.

Checklist

Please include and complete the following checklist. Your Pull Request is (in most cases) not ready for review until the following have been completed. You can create a draft PR while you are still completing the checklist. Check the Contribution Guidelines for more details. You can mark an item as complete with the - [x] prefix

codecov[bot] commented 2 years ago

Codecov Report

Merging #234 (4fac852) into dev (60dfd01) will increase coverage by 0.02%. The diff coverage is 89.47%.

@@            Coverage Diff             @@
##              dev     #234      +/-   ##
==========================================
+ Coverage   74.85%   74.87%   +0.02%     
==========================================
  Files          38       38              
  Lines        5535     5549      +14     
==========================================
+ Hits         4143     4155      +12     
- Misses       1392     1394       +2     
Impacted Files Coverage Δ
c3/signal/gates.py 94.89% <89.47%> (-0.71%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.