diff --git a/quam/components/channels.py b/quam/components/channels.py index 452968de..0d2c88ae 100644 --- a/quam/components/channels.py +++ b/quam/components/channels.py @@ -106,11 +106,11 @@ def generate_element_config(self) -> Dict[str, int]: Contains "port", and optionally "delay", "buffer" if specified """ if isinstance(self.opx_output, DigitalOutputPort): - opx_output = self.opx_output.port + opx_output = self.opx_output.port_tuple else: - opx_output = self.opx_output + opx_output = tuple(self.opx_output) - digital_cfg: Dict[str, Any] = {"port": tuple(opx_output)} + digital_cfg: Dict[str, Any] = {"port": opx_output} if self.delay is not None: digital_cfg["delay"] = self.delay if self.buffer is not None: @@ -520,22 +520,22 @@ def apply_to_config(self, config: dict): opx_port = self.opx_output elif len(self.opx_output) == 2: opx_port = OPXPlusAnalogOutputPort( - port=self.opx_output, + *self.opx_output, offset=self.opx_output_offset, - feedforward_filter=list(self.filter_fir_taps), - feedback_filter=list(self.filter_iir_taps), + feedforward_filter=self.filter_fir_taps, + feedback_filter=self.filter_iir_taps, ) opx_port.apply_to_config(config) else: opx_port = LFFEMAnalogOutputPort( - port=self.opx_output, + *self.opx_output, offset=self.opx_output_offset, - feedforward_filter=list(self.filter_fir_taps), - feedback_filter=list(self.filter_iir_taps), + feedforward_filter=self.filter_fir_taps, + feedback_filter=self.filter_iir_taps, ) opx_port.apply_to_config(config) - element_config["singleInput"] = {"port": tuple(opx_port.port)} + element_config["singleInput"] = {"port": opx_port.port_tuple} @quam_dataclass @@ -582,16 +582,16 @@ def apply_to_config(self, config: dict): opx_port = self.opx_input elif len(self.opx_input) == 2: opx_port = OPXPlusAnalogInputPort( - port=self.opx_input, offset=self.opx_input_offset + *self.opx_input, offset=self.opx_input_offset ) opx_port.apply_to_config(config) else: opx_port = LFFEMAnalogInputPort( - port=self.opx_input, offset=self.opx_input_offset + *self.opx_input, offset=self.opx_input_offset ) opx_port.apply_to_config(config) - element_config["outputs"] = {"out1": tuple(opx_port.port)} + element_config["outputs"] = {"out1": opx_port.port_tuple} def measure( self, @@ -1100,16 +1100,16 @@ def apply_to_config(self, config: dict): opx_port = opx_input elif len(opx_input) == 2: opx_port = OPXPlusAnalogInputPort( - port=opx_input, offset=offset, gain_db=self.input_gain + *opx_input, offset=offset, gain_db=self.input_gain ) opx_port.apply_to_config(config) else: opx_port = LFFEMAnalogInputPort( - port=opx_input, offset=offset, gain_db=self.input_gain + *opx_input, offset=offset, gain_db=self.input_gain ) opx_port.apply_to_config(config) if not isinstance(self.frequency_converter_down, OctaveDownConverter): - element_cfg["outputs"][f"out{k}"] = tuple(opx_port.port) + element_cfg["outputs"][f"out{k}"] = opx_port.port_tuple def measure( self, @@ -1496,7 +1496,7 @@ def apply_to_config(self, config: Dict) -> None: super().apply_to_config(config) element_cfg = config["elements"][self.name] - element_cfg["MWInput"] = tuple(self.opx_output.port) + element_cfg["MWInput"] = self.opx_output.port_tuple element_cfg["upconverter"] = self.upconverter @@ -1508,7 +1508,7 @@ def apply_to_config(self, config: Dict) -> None: super().apply_to_config(config) element_cfg = config["elements"][self.name] - element_cfg["MWOutput"] = tuple(self.opx_input.port) + element_cfg["MWOutput"] = self.opx_input.port_tuple @quam_dataclass diff --git a/quam/components/ports/analog_outputs.py b/quam/components/ports/analog_outputs.py index 1e4a9c3b..f0c4c584 100644 --- a/quam/components/ports/analog_outputs.py +++ b/quam/components/ports/analog_outputs.py @@ -32,9 +32,9 @@ def get_port_properties(self): if self.crosstalk is not None: port_properties["crosstalk"] = self.crosstalk if self.feedforward_filter is not None: - port_properties["feedforward_filter"] = self.feedforward_filter + port_properties["feedforward_filter"] = list(self.feedforward_filter) if self.feedback_filter is not None: - port_properties["feedback_filter"] = self.feedback_filter + port_properties["feedback_filter"] = list(self.feedback_filter) if self.offset is not None: port_properties["offset"] = self.offset return port_properties