qiboteam / qibocal

Quantum calibration, characterization and validation module for Qibo.
https://qibo.science
Apache License 2.0
30 stars 7 forks source link

unify execution pars for dispersive shift #892

Closed rodolfocarobene closed 3 months ago

rodolfocarobene commented 3 months ago

Closes #887, but does not take care at all of #890.

How could we use params.execution_parameters and also pass standard values?

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 97.44%. Comparing base (d209e87) to head (1ba3b8b).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/qiboteam/qibocal/pull/892/graphs/tree.svg?width=650&height=150&src=pr&token=3EA9ZUNKUY&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)](https://app.codecov.io/gh/qiboteam/qibocal/pull/892?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) ```diff @@ Coverage Diff @@ ## main #892 +/- ## ======================================= Coverage 97.44% 97.44% ======================================= Files 115 115 Lines 8684 8685 +1 ======================================= + Hits 8462 8463 +1 Misses 222 222 ``` | [Flag](https://app.codecov.io/gh/qiboteam/qibocal/pull/892/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qiboteam/qibocal/pull/892/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | `97.44% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/qiboteam/qibocal/pull/892?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [src/qibocal/protocols/dispersive\_shift.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/892?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fdispersive_shift.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL2Rpc3BlcnNpdmVfc2hpZnQucHk=) | `100.00% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/qiboteam/qibocal/pull/892/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)
alecandido commented 3 months ago

Closes #887, but does not take care at all of #890.

That's fine, one issue at a time. #890 is for the longer term

How could we use params.execution_parameters and also pass standard values?

We extend the routine object to contain an ExecutionParameters object, possibly with some fields set to None (that might require a mirror object, to possibly fix the attribute types with Optional), and the executor will inspect the routine attribute when determining which are the params.execution_parameters, setting them according to the following priority:

and that's what the routine should get access to in the params.execution_parameters. But it has to be implemented at the level of the execution, not the individual routine.

andrea-pasquale commented 3 months ago

How could we use params.execution_parameters and also pass standard values?

As @alecandido suggested, we can take care of ExecutionParameters in a separate PR.