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

Update Parameters through Gate in Qiskit interface #208

Closed lazyoracle closed 2 years ago

lazyoracle commented 2 years ago

What

Allow updating parameters of the underlying experiment object through custom qiskit gates, as below:

amp = Qty(value=0.8, min_val=0.2, max_val=1, unit="V")
opt_map = [[["rx90p[0]", "d1", "gaussian", "amp"]]]
param_gate = SetParamsGate(params=[[amp.asdict()], opt_map])
qc.append(param_gate, [0])

Why

Closes #200

How

Remarks

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 #208 (9f705ec) into dev (24211ba) will increase coverage by 0.10%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #208      +/-   ##
==========================================
+ Coverage   74.68%   74.78%   +0.10%     
==========================================
  Files          38       38              
  Lines        5534     5552      +18     
==========================================
+ Hits         4133     4152      +19     
+ Misses       1401     1400       -1     
Impacted Files Coverage Δ
c3/qiskit/c3_backend.py 93.75% <100.00%> (+0.72%) :arrow_up:
c3/qiskit/c3_gates.py 98.43% <100.00%> (+0.25%) :arrow_up:

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...9f705ec. Read the comment docs.