Skip to content

Commit

Permalink
docs: improve docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Dec 10, 2024
1 parent 6cefd7e commit ca35c73
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/qibolab/_core/instruments/qm/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,16 @@ def register_pulses(self, configs: dict[str, Config], sequence: PulseSequence):
def register_duration_sweeper_pulses(
self, args: ExecutionArguments, configs: dict[str, Config], sweeper: Sweeper
):
"""Register pulse with many different durations.
"""Register pulses needed to implement a duration sweep.
Needed when sweeping duration. When interpolation is used, only
a single pulse with the minimum duration is used.
For standard (non-interpolated) duration sweeps, we need to
upload distinct waveforms for every different duration.
When interpolation is used, we need to upload a single pulse
with the minimum duration of the sweeper, because the QM real-
time interpolation can only stretch and not compress arbitrary
waveforms, as documented in
https://docs.quantum-machines.co/latest/docs/Guides/features/?h=interpo#dynamic-pulse-duration
"""
for pulse in sweeper.pulses:
if isinstance(pulse, (Align, Delay)):
Expand All @@ -369,6 +375,7 @@ def register_duration_sweeper_pulses(
ids[0], configs[ids[0]], sweep_pulse
)
else:
assert sweeper.parameter is Parameter.duration
for value in values:
sweep_pulse = original_pulse.model_copy(update={"duration": value})
sweep_op = self.register_pulse(ids[0], configs[ids[0]], sweep_pulse)
Expand Down

0 comments on commit ca35c73

Please sign in to comment.