qiboteam / qibolab

Quantum hardware module and drivers for Qibo.
https://qibo.science
Apache License 2.0
41 stars 12 forks source link

Use pulse UUID instead of serial when returning execution results #687

Open stavros11 opened 9 months ago

stavros11 commented 9 months ago
          In this case, the serial is being used as an ID for the readout.

However, while pulse.serial is unique within a sequence, this is not the case across multiple sequences. Indeed, to my understanding, the uniqueness mostly comes from the pulse channel and start time (since there can't be two pulses on the same channel at the same time). But it could be possible in different sequences (e.g. in amplitude sweep on a drive pulse unrolled, in which the measurement would be the exact same in all sequences).

I propose to change the usage of pulse.serial for a UUID assigned to the pulse at creation time https://docs.python.org/3/library/uuid.html

In this case, there is not even the need of building a map for the new to old readout, since the IDs would be globally unique.

_Originally posted by @AleCandido in https://github.com/qiboteam/qibolab/pull/618#discussion_r1412735952_

stavros11 commented 6 months ago

@alecandido is there something to be done for this before 0.2.0? Since we are dropping serial anyway, I am not sure if it is worth looking at this. If you agree, we can move to the 0.2.0 milestone.

alecandido commented 6 months ago

We could even implement before 0.2.0, but it's definitely not worth...