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

Truncating large parameters #225

Closed nwittler closed 2 years ago

nwittler commented 2 years ago

What

Truncate large vector or matrix valued parameters in human output.

Why

Closes #224

How

Introduce a human parameter to the str method, truncate when it's set and a parameter has more than 4 values.

Remarks

The number when to truncate is negotiable, input welcome.

New look:

Q1-freq                               : 5.000 GHz 2pi 
Q2-freq                               : 5.600 GHz 2pi 
Q1-anhar                              : -150.000 MHz 2pi 
Q2-anhar                              : -150.000 MHz 2pi 
Q1-Q2-strength                        : 50.000 MHz 2pi 
cr90-d1-pwc-quadrature                : <100 values>
cr90-d1-pwc-inphase                   : <100 values>

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 #225 (12801bc) into dev (24211ba) will increase coverage by 0.14%. The diff coverage is 75.00%.

@@            Coverage Diff             @@
##              dev     #225      +/-   ##
==========================================
+ Coverage   74.68%   74.82%   +0.14%     
==========================================
  Files          38       38              
  Lines        5534     5534              
==========================================
+ Hits         4133     4141       +8     
+ Misses       1401     1393       -8     
Impacted Files Coverage Δ
c3/parametermap.py 93.46% <75.00%> (-0.36%) :arrow_down:
c3/qiskit/c3_backend_utils.py 56.52% <0.00%> (-4.20%) :arrow_down:
c3/experiment.py 74.83% <0.00%> (-2.32%) :arrow_down:
c3/qiskit/c3_backend.py 91.11% <0.00%> (-1.92%) :arrow_down:
c3/optimizers/optimalcontrol.py 67.44% <0.00%> (-0.80%) :arrow_down:
c3/qiskit/c3_gates.py 98.43% <0.00%> (+0.25%) :arrow_up:
c3/libraries/chip.py 62.08% <0.00%> (+0.28%) :arrow_up:
c3/model.py 87.60% <0.00%> (+1.14%) :arrow_up:
c3/generator/devices.py 72.76% <0.00%> (+1.15%) :arrow_up:
c3/utils/tf_utils.py 67.42% <0.00%> (+2.39%) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 24211ba...12801bc. Read the comment docs.