From d6841098ad17e1ad608a70623038a9010f6d5520 Mon Sep 17 00:00:00 2001
From: Sander de Snoo <59472150+sldesnoo-Delft@users.noreply.github.com>
Date: Fri, 23 Jun 2023 15:48:42 +0200
Subject: [PATCH] Fixed merging of phase shift and MW pulse in conditional
 segment

---
 pulse_lib/keysight/qs_conditional.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulse_lib/keysight/qs_conditional.py b/pulse_lib/keysight/qs_conditional.py
index 55a6ba39..d6faf3ab 100644
--- a/pulse_lib/keysight/qs_conditional.py
+++ b/pulse_lib/keysight/qs_conditional.py
@@ -246,7 +246,7 @@ class QsConditionalMW():
                 # try to add phase shift to existing pulse
                 if not pulse:
                     instr.pulses[ibranch] = QsConditionalMW.BranchPulse(prephase=phase_shift.phase_shift)
-                elif not pulse.mw_pulse or pulse.mw_pulse.start > phase_shift.time:
+                elif not pulse.mw_pulse or pulse.mw_pulse.start >= phase_shift.time:
                     pulse.prephase += phase_shift.phase_shift
                 elif pulse.mw_pulse.stop <= phase_shift.time:
                     pulse.postphase += phase_shift.phase_shift
-- 
GitLab