diff --git a/pulse_lib/tests/configurations/test_configuration.py b/pulse_lib/tests/configurations/test_configuration.py index 532d28833c74eb73b8ffddcce866360cfd8e2d17..590edf101212a8f7882860a607f46bf804b90597 100644 --- a/pulse_lib/tests/configurations/test_configuration.py +++ b/pulse_lib/tests/configurations/test_configuration.py @@ -204,9 +204,10 @@ class Context: qubit = i+1 if backend == 'Keysight_QS': # Use a new awg channel on the same output to drive the qubit. - drive_channel_name = f"P{qubit}_drive" awg_channel = pulse.awg_channels[f"P{qubit}"] - pulse.define_channel(drive_channel_name, awg_channel.awg_name, awg_channel.channel_number) + drive_channel_name = f"P{qubit}_drive" + if drive_channel_name not in pulse.awg_channels: + pulse.define_channel(drive_channel_name, awg_channel.awg_name, awg_channel.channel_number) else: drive_channel_name = f"P{qubit}" iq_channel_name = f"drive_q{qubit}" @@ -334,6 +335,13 @@ class Context: return pulse + def copy_attenuation_to_drive(self): + pulse = self.pulse + for channel_name, awg_channel in pulse.awg_channels.items(): + if channel_name.endswith("_drive"): + base_channel = pulse.awg_channels[channel_name[:-6]] + awg_channel.attenuation = base_channel.attenuation + def _add_marker(self, name, setup_ns=0, hold_ns=0): cfg = self._configuration pulse = self.pulse