pasqal-io / Pulser

Library for pulse-level/analog control of neutral atom devices. Emulator with QuTiP.
Apache License 2.0
159 stars 57 forks source link

Provide public access to the settings of each EOM block #562

Closed HGSilveri closed 10 months ago

HGSilveri commented 11 months ago

During EOM mode, though the Rabi frequency and the detuning_on are chosen by the user, the detuning_off is not, and there should be an easy way to find out what the chosen value was, which can then be used to correct for incurred phase changes with a phase shift, for example.

The way to implement this is straightforward for a non-parametrized sequence (simply access the chosen value and return it), but what if the sequence is parametrized? There are two scenarios here:

  1. amp_on and detuning_on are not parametrized: In this case, we could still calculate the EOM parameters, with a method like calculate_eom_parameters(). This is more flexible that just accessing the chosen values because when the sequence becomes parametrized they stop being calculated.
  2. amp_on and/or detuning_on are parametrized: Here, we would have to somehow suspend the call to calculate_eom_parameters(), returning a parametrized object instead. Although possible, it sounds overly complex. I propose we leave this for later, in case it is requested.

Built-in phase correction

The usecase I currently have in mind could also be incorporated in add_eom_pulse() and it would be available under any scenario. I'm thinking we could call it correct_phase: bool = False. At build-time, it would have all the information it needs for the correction.