qiboteam / qibocal

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

Deserialize task parameters #907

Open alecandido opened 1 week ago

alecandido commented 1 week ago

The parameters specified either in the runcard or directly to run_protocol are not deserialized until they are queried, and they are just loaded into the original Action, as a generic dictionary.

While this was a temporary workaround, to avoid a more complicate implementation, we should now take the longer track, and validate the parameters as soon as possible, i.e. when the Task is created, at the beginning of run_protocol.

While we could preload all tasks at the beginning of a sequential execution, since they are all known from the very beginning, we can consider this an optimization for the specific case of runcards.

alecandido commented 3 days ago

Since it was confusing myself: it just means that Action should validate the parameters (loading them in the suitable class), instead of holding the dictionary as it is.