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

FIX: Detuning modulation for custom EOM buffer times #619

Closed HGSilveri closed 7 months ago

HGSilveri commented 7 months ago

Fixes #614 .

The example outlined in #614 now renders like this:

image

HGSilveri commented 7 months ago

So the error was that the detuning during the EOM buffers was not constant ? Now the detuning during the EOM buffers is taken as detuning off right ? I am not sure I have the full motivation with only the comments line 304-305, but other than the rest is clear and fixes the issue so I approve :)

Sorry, it's a bit complex so I didn't want to go into a lot of detail. In simple terms, what we do in these modulations is to modulate the full samples with the AOM and EOM bandwidths separately and then combine them to make the final modulated samples. Plus, there are also the EOM buffers which take a different modulation bandwidth that is calculated based of custom_buffer_time (if defined). The problem here was coming from the modulation bandwidth in the buffer being lower than the AOM bandwidth (when they are the same there is no issue). The best solution I could find was to modify the samples that are modulated with the "buffer bandwidth" so that we avoid showing a delayed transient regime.

a-corni commented 7 months ago

So the error was that the detuning during the EOM buffers was not constant ? Now the detuning during the EOM buffers is taken as detuning off right ? I am not sure I have the full motivation with only the comments line 304-305, but other than the rest is clear and fixes the issue so I approve :)

Sorry, it's a bit complex so I didn't want to go into a lot of detail. In simple terms, what we do in these modulations is to modulate the full samples with the AOM and EOM bandwidths separately and then combine them to make the final modulated samples. Plus, there are also the EOM buffers which take a different modulation bandwidth that is calculated based of custom_buffer_time (if defined). The problem here was coming from the modulation bandwidth in the buffer being lower than the AOM bandwidth (when they are the same there is no issue). The best solution I could find was to modify the samples that are modulated with the "buffer bandwidth" so that we avoid showing a delayed transient regime.

Ah I think I get it, now when the modulated detuning in the buffer is computed, the detuning he sees from 0 to the starting time of the buffer is 0 and not 5 from 0 to 200 and 0 from 200 to the starting time of the buffer (we used to see the modulation of the constant detuning from 0 to 200 with the modulation bandwidth of the buffer)

HGSilveri commented 7 months ago

Ah I think I get it, now when the modulated detuning in the buffer is computed, the detuning he sees from 0 to the starting time of the buffer is 0 and not 5 from 0 to 200 and 0 from 200 to the starting time of the buffer (we used to see the modulation of the constant detuning from 0 to 200 with the modulation bandwidth of the buffer)

Exactly :)