From bbdf1eadcd8f37f10bf2ca4383afdb00275ad6ab Mon Sep 17 00:00:00 2001 From: sldesnoo-Delft <s.l.desnoo@tudelft.nl> Date: Wed, 21 Feb 2024 16:18:47 +0100 Subject: [PATCH] Fixed I-only qubit drive --- pulse_lib/qblox/pulsar_uploader.py | 40 +++++++++++++++++++----------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/pulse_lib/qblox/pulsar_uploader.py b/pulse_lib/qblox/pulsar_uploader.py index ad312705..80136668 100644 --- a/pulse_lib/qblox/pulsar_uploader.py +++ b/pulse_lib/qblox/pulsar_uploader.py @@ -73,21 +73,32 @@ class PulsarUploader: for name, qubit_ch in self.qubit_channels.items(): iq_out_channels = qubit_ch.iq_channel.IQ_out_channels - i_ch = None - q_ch = None - for iq_out_ch in iq_out_channels: - if iq_out_ch.image == '-': + if len(iq_out_channels) == 1: + # if there is only 1 channel it must be I + i_out_ch = iq_out_channels[0] + if i_out_ch.IQ_comp != 'I': + raise ValueError("Single channel drive must be I channel") + if i_out_ch.image == '-': raise ValueError("Negative IQ image not supported on Qblox") - awg_ch = self.awg_channels[iq_out_ch.awg_channel_name] - if iq_out_ch.IQ_comp == 'I': - i_ch = awg_ch - elif iq_out_ch.IQ_comp == 'Q': - q_ch = awg_ch - out_channels = [i_ch, q_ch] - module_name = out_channels[0].awg_name - if out_channels[1].awg_name != module_name: - raise ValueError("I and Q channel must be on same Qblox module") - q1.add_control(name, module_name, [out_ch.channel_number for out_ch in out_channels]) + awg_ch = self.awg_channels[i_out_ch.awg_channel_name] + module_name = awg_ch.awg_name + q1.add_control(name, module_name, [awg_ch.channel_number]) + else: + i_ch = None + q_ch = None + for iq_out_ch in iq_out_channels: + if iq_out_ch.image == '-': + raise ValueError("Negative IQ image not supported on Qblox") + awg_ch = self.awg_channels[iq_out_ch.awg_channel_name] + if iq_out_ch.IQ_comp == 'I': + i_ch = awg_ch + elif iq_out_ch.IQ_comp == 'Q': + q_ch = awg_ch + out_channels = [i_ch, q_ch] + module_name = out_channels[0].awg_name + if out_channels[1].awg_name != module_name: + raise ValueError("I and Q channel must be on same Qblox module") + q1.add_control(name, module_name, [out_ch.channel_number for out_ch in out_channels]) for name, dig_ch in self.digitizer_channels.items(): out_ch = [] @@ -457,6 +468,7 @@ class Job(object): pending_resets = set() latching_enabled = False last_t = 0 + # TODO @@@ change timestamp to interval for all events. for t, channel_name, action in sorted(events): feedback_channels.add(channel_name) if t != last_t and (len(latching_counters) > 0) != latching_enabled: -- GitLab