diff --git a/CHANGELOG.md b/CHANGELOG.md index 003b1734..faa0f3e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Allow int keys to be serialised / loaded in QuAM using JSONSerialiser - Fix type `OctaveUpconverter.triggered_reersed` -> `OctaveUpconverter.triggered_reversed` - Fix tuples not being instantiated properly in specific circumstances +- Fix filter_fir/iir_taps being passed as QuamList when generating config, resulting in an error due to parent reassignment ## [0.3.3] diff --git a/quam/components/channels.py b/quam/components/channels.py index aff44088..ee491af6 100644 --- a/quam/components/channels.py +++ b/quam/components/channels.py @@ -518,22 +518,29 @@ def apply_to_config(self, config: dict): if self.intermediate_frequency is not None: element_config["intermediate_frequency"] = self.intermediate_frequency + filter_fir_taps = self.filter_fir_taps + if filter_fir_taps is not None: + filter_fir_taps = list(filter_fir_taps) + filter_iir_taps = self.filter_iir_taps + if filter_iir_taps is not None: + filter_iir_taps = list(filter_iir_taps) + if isinstance(self.opx_output, LFAnalogOutputPort): opx_port = self.opx_output elif len(self.opx_output) == 2: opx_port = OPXPlusAnalogOutputPort( *self.opx_output, offset=self.opx_output_offset, - feedforward_filter=self.filter_fir_taps, - feedback_filter=self.filter_iir_taps, + feedforward_filter=filter_fir_taps, + feedback_filter=filter_iir_taps, ) opx_port.apply_to_config(config) else: opx_port = LFFEMAnalogOutputPort( *self.opx_output, offset=self.opx_output_offset, - feedforward_filter=self.filter_fir_taps, - feedback_filter=self.filter_iir_taps, + feedforward_filter=filter_fir_taps, + feedback_filter=filter_iir_taps, ) opx_port.apply_to_config(config)