Skip to content

Commit

Permalink
fix: 🐛 Use 2pi instead of 360.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertMitjans committed May 29, 2023
1 parent a23b8d4 commit d53645b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qililab/instruments/qblox/qblox_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ def _generate_program(self, pulse_bus_schedule: PulseBusSchedule, waveforms: Wav
program.append_block(block=stop)
timeline = pulse_bus_schedule.timeline
if len(timeline) > 0 and timeline[0].start_time != 0:
avg_loop.append_component(Wait(wait_time=int(timeline[0].start_time)))
avg_loop.append_component(long_wait(wait_time=int(timeline[0].start_time)))

for i, pulse_event in enumerate(timeline):
waveform_pair = waveforms.find_pair_by_name(pulse_event.pulse.label())
wait_time = timeline[i + 1].start_time - pulse_event.start_time if (i < (len(timeline) - 1)) else 4
avg_loop.append_component(ResetPh())
gain = int(np.abs(pulse_event.pulse.amplitude) * AWG_MAX_GAIN) # np.abs() needed for negative pulses
avg_loop.append_component(SetAwgGain(gain_0=gain, gain_1=gain))
phase = int((pulse_event.pulse.phase % 360) * 1e9 / 360)
phase = int((pulse_event.pulse.phase % (2 * np.pi)) * 1e9 / (2 * np.pi))
avg_loop.append_component(SetPh(phase=phase))
avg_loop.append_component(
Play(
Expand Down

0 comments on commit d53645b

Please sign in to comment.