From 5fc369c6149e3e591e538effaa5c3517e70cdc27 Mon Sep 17 00:00:00 2001 From: Serwan Asaad Date: Fri, 28 Jun 2024 14:20:53 +0200 Subject: [PATCH] Add support for MW FEM --- quam/components/channels.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/quam/components/channels.py b/quam/components/channels.py index af29ad08..31086ee5 100644 --- a/quam/components/channels.py +++ b/quam/components/channels.py @@ -11,6 +11,8 @@ LFAnalogInputPort, LFFEMAnalogInputPort, LFFEMAnalogOutputPort, + MWFEMAnalogInputPort, + MWFEMAnalogOutputPort, OPXPlusAnalogInputPort, OPXPlusAnalogOutputPort, OPXPlusDigitalOutputPort, @@ -1477,3 +1479,32 @@ class InIQOutSingleChannel(SingleChannel, InIQChannel): """ pass + + +@quam_dataclass +class MWChannel(QuamComponent): + opx_output: MWFEMAnalogOutputPort + upconverter: int = 1 + + 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["upconverter"] = self.upconverter + + +@quam_dataclass +class InMWChannel(QuamComponent): + opx_input: MWFEMAnalogInputPort + + 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) + + +@quam_dataclass +class InOutMWChannel(MWChannel, InMWChannel): + pass