From 266847909c1f7050db5a89c15e45b20498b70fe1 Mon Sep 17 00:00:00 2001 From: Serwan Asaad Date: Fri, 9 Aug 2024 15:05:15 +0200 Subject: [PATCH 1/3] Fix: Add "connectivity" to OctaveOld --- quam/components/octave.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/quam/components/octave.py b/quam/components/octave.py index 5a1e1201..17593554 100644 --- a/quam/components/octave.py +++ b/quam/components/octave.py @@ -3,7 +3,11 @@ from typing import Any, Optional, Union, ClassVar, Dict, List, Tuple, Literal from dataclasses import field -from quam.components.ports.analog_outputs import LFAnalogOutputPort +from quam.components.ports.analog_outputs import ( + LFAnalogOutputPort, + LFFEMAnalogOutputPort, + OPXPlusAnalogOutputPort, +) from quam.components.ports.base_ports import BasePort from quam.core import QuamComponent, quam_dataclass from quam.components.hardware import BaseFrequencyConverter, FrequencyConverter @@ -99,18 +103,6 @@ def initialize_frequency_converters(self): for idx in range(1, 3): self.RF_inputs[idx] = OctaveDownConverter(id=idx, LO_frequency=None) - def get_octave_config(self) -> QmOctaveConfig: - """Return a QmOctaveConfig object with the current Octave configuration.""" - octave_config = QmOctaveConfig() - - if self.calibration_db_path is not None: - octave_config.set_calibration_db(self.calibration_db_path) - else: - octave_config.set_calibration_db(os.getcwd()) - - octave_config.add_device_info(self.name, self.ip, self.port) - return octave_config - def apply_to_config(self, config: Dict) -> None: """Add the Octave configuration to a config dictionary. @@ -232,6 +224,7 @@ class OctaveUpConverter(OctaveFrequencyConverter): "always_on", "always_off", "triggered", "triggered_reversed" ] = "always_off" input_attenuators: Literal["off", "on"] = "off" + connectivity: str = None def apply_to_config(self, config: Dict) -> None: """Add information about the frequency up-converter to the QUA config From a9a4403815cf1e28afab306187df1ea4e1c4925a Mon Sep 17 00:00:00 2001 From: Serwan Asaad Date: Fri, 9 Aug 2024 15:10:43 +0200 Subject: [PATCH 2/3] update chagnelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index faa0f3e1..4cdac359 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Added - Added `Channel.frame_rotation_2pi` to allow for frame rotation in multiples of 2pi - Added `Channel.update_frequency` to allow for updating the frequency of a channel +- Added `OctaveOld.connectivity` as it was needed for (deprecated) compatibility with multiple OPX instruments ### Changed - Allow `QuamBase.get_reference(attr)` to return a reference of one of its attributes From 4ffd41d2de673cb47c6e3752a29c36903a5ae0b0 Mon Sep 17 00:00:00 2001 From: Serwan Asaad Date: Fri, 9 Aug 2024 19:53:41 +0200 Subject: [PATCH 3/3] adjusted changes --- quam/components/octave.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/quam/components/octave.py b/quam/components/octave.py index 17593554..76dfc6c4 100644 --- a/quam/components/octave.py +++ b/quam/components/octave.py @@ -3,11 +3,7 @@ from typing import Any, Optional, Union, ClassVar, Dict, List, Tuple, Literal from dataclasses import field -from quam.components.ports.analog_outputs import ( - LFAnalogOutputPort, - LFFEMAnalogOutputPort, - OPXPlusAnalogOutputPort, -) +from quam.components.ports.analog_outputs import LFAnalogOutputPort from quam.components.ports.base_ports import BasePort from quam.core import QuamComponent, quam_dataclass from quam.components.hardware import BaseFrequencyConverter, FrequencyConverter @@ -103,6 +99,18 @@ def initialize_frequency_converters(self): for idx in range(1, 3): self.RF_inputs[idx] = OctaveDownConverter(id=idx, LO_frequency=None) + def get_octave_config(self) -> QmOctaveConfig: + """Return a QmOctaveConfig object with the current Octave configuration.""" + octave_config = QmOctaveConfig() + + if self.calibration_db_path is not None: + octave_config.set_calibration_db(self.calibration_db_path) + else: + octave_config.set_calibration_db(os.getcwd()) + + octave_config.add_device_info(self.name, self.ip, self.port) + return octave_config + def apply_to_config(self, config: Dict) -> None: """Add the Octave configuration to a config dictionary. @@ -224,7 +232,6 @@ class OctaveUpConverter(OctaveFrequencyConverter): "always_on", "always_off", "triggered", "triggered_reversed" ] = "always_off" input_attenuators: Literal["off", "on"] = "off" - connectivity: str = None def apply_to_config(self, config: Dict) -> None: """Add information about the frequency up-converter to the QUA config @@ -409,6 +416,7 @@ class OctaveOld(QuamComponent): qmm_host: str qmm_port: int connection_headers: Dict[str, str] = None + connectivity: str = None calibration_db: str = None