diff --git a/src/qibolab/instruments/qm/config.py b/src/qibolab/instruments/qm/config.py index f87a6346b9..2f3bfc5a74 100644 --- a/src/qibolab/instruments/qm/config.py +++ b/src/qibolab/instruments/qm/config.py @@ -332,7 +332,7 @@ def register_waveform(self, pulse, mode="i"): self.waveforms[serial] = {"type": "constant", "sample": pulse.amplitude} else: waveform = getattr(pulse, f"envelope_waveform_{mode}")(SAMPLING_RATE) - serial = hash(waveform) + serial = hash(waveform.tobytes()) if serial not in self.waveforms: self.waveforms[serial] = { "type": "arbitrary", diff --git a/tests/test_instruments_qm.py b/tests/test_instruments_qm.py index b344e08bf4..6caf5c239f 100644 --- a/tests/test_instruments_qm.py +++ b/tests/test_instruments_qm.py @@ -285,8 +285,8 @@ def test_qmopx_register_pulse(dummy_qrc, pulse_type, qubit): "operation": "control", "length": pulse.duration, "waveforms": { - "I": hash(pulse.envelope_waveform_i()), - "Q": hash(pulse.envelope_waveform_q()), + "I": hash(pulse.envelope_waveform_i().tobytes()), + "Q": hash(pulse.envelope_waveform_q().tobytes()), }, }