Skip to content

Commit

Permalink
fix: Use duration in waveforms generation
Browse files Browse the repository at this point in the history
For real...
  • Loading branch information
alecandido committed Feb 19, 2025
1 parent 1614166 commit 7b7312e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qibolab/_core/instruments/qblox/sequence/waveforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ def waveforms(
def _waveform(
pulse: Pulse, component: str, duration: Optional[float] = None
) -> WaveformSpec:
update = {"amplitude": 1.0} if pulse.id in amplitude_swept else {}
duration_ = pulse.duration if duration is None else duration
update = {"duration": duration_} | (
{"amplitude": 1.0} if pulse.id in amplitude_swept else {}
)
return WaveformSpec(
waveform=Waveform(
data=getattr(pulse.model_copy(update=update), component)(sampling_rate),
index=0,
),
duration=int(pulse.duration if duration is None else duration),
duration=int(duration_),
)

indexless = {
Expand Down

0 comments on commit 7b7312e

Please sign in to comment.