Skip to content

Commit 94cd9cf

Browse files
Ignore channels defined in hardware class, but not in pulselib
1 parent ff55a49 commit 94cd9cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pulse_lib/base_pulse.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ def load_hardware(self, hardware):
364364
hardware.awg2dac_ratios.add(list(self.awg_channels.keys()))
365365

366366
for channel, attenuation in hardware.awg2dac_ratios.items():
367-
self.awg_channels[channel].attenuation = attenuation
367+
if channel not in self.awg_channels:
368+
logging.info(f'Channel {channel} defined in hardware, but not in pulselib; skipping channel')
369+
continue
370+
self.awg_channels[channel].attenuation = attenuation
368371

369372
else:
370373
for virtual_gate_set in hardware.virtual_gates:

0 commit comments

Comments
 (0)