diff --git a/docs/changes/newsfragments/6796.improved_driver b/docs/changes/newsfragments/6796.improved_driver new file mode 100644 index 00000000000..a65fa7993c4 --- /dev/null +++ b/docs/changes/newsfragments/6796.improved_driver @@ -0,0 +1 @@ +Enabled use of ZNLE R&S VNA by recognizing the model name in RohdeSchwarzZNBBase, and creating an ZNLE## class as an alias diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py b/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py index fa4c57d3762..519a166b3d3 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py @@ -442,11 +442,29 @@ def __init__( "ZNB8": -80, "ZNB20": -60, "ZNB40": -60, + "ZNLE3": -10, + "ZNLE4": -10, + "ZNLE6": -10, + "ZNLE14": -10, + "ZNLE18": -10, + } + self._model_max_source_power = { + "ZNB4": 25, + "ZNB8": 25, + "ZNB20": 25, + "ZNB40": 25, + "ZNLE3": 0, + "ZNLE4": 0, + "ZNLE6": 0, + "ZNLE14": 0, + "ZNLE18": 0, } if model not in self._model_min_source_power.keys(): raise RuntimeError(f"Unsupported ZNB model: {model}") self._min_source_power: float self._min_source_power = self._model_min_source_power[model] + self._max_source_power: float + self._max_source_power = self._model_max_source_power[model] self.vna_parameter: Parameter = self.add_parameter( name="vna_parameter", @@ -462,7 +480,7 @@ def __init__( get_cmd=f"SOUR{n}:POW?", set_cmd=f"SOUR{n}:POW {{:.4f}}", get_parser=float, - vals=vals.Numbers(self._min_source_power, 25), + vals=vals.Numbers(self._min_source_power, self._max_source_power), ) """Parameter power""" self.bandwidth: Parameter = self.add_parameter( @@ -1007,10 +1025,10 @@ def _get_timeout(self) -> float: class RohdeSchwarzZNBBase(VisaInstrument): """ - Base class for QCoDeS driver for the Rohde & Schwarz ZNB8 and ZNB20 - virtual network analyser. It can probably be extended to ZNB4 and 40 - without too much work. This class should not be instantiated directly - the RohdeSchwarzZNB8 and RohdeSchwarzZNB20 should be used instead. + Base class for QCoDeS driver for the Rohde & Schwarz + ZNB4, ZNB8, ZNB20, ZNB40, ZNLE3, ZNLE4, ZNLE6, ZNLE14 and ZNLE18. + This class should not be instantiated directly + the ZNB and ZNLE should be used instead. Requires FrequencySweep parameter for taking a trace @@ -1057,6 +1075,11 @@ def __init__( "ZNB8": (9e3, 8.5e9), "ZNB20": (100e3, 20e9), "ZNB40": (10e6, 40e9), + "ZNLE3": (1e6, 3e9), + "ZNLE4": (1e6, 4e9), + "ZNLE6": (1e6, 6e9), + "ZNLE14": (1e6, 14e9), + "ZNLE18": (1e6, 18e9), } if model not in m_frequency.keys(): raise RuntimeError(f"Unsupported ZNB model {model}") diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py b/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py index b7e26083897..759b9e16dda 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py @@ -1,3 +1,10 @@ +from ._rohde_schwarz_znle import ( + RohdeSchwarzZNLE3, + RohdeSchwarzZNLE4, + RohdeSchwarzZNLE6, + RohdeSchwarzZNLE14, + RohdeSchwarzZNLE18, +) from .Rohde_Schwarz_ZNB8 import RohdeSchwarzZNB8 from .Rohde_Schwarz_ZNB20 import RohdeSchwarzZNB20 from .RTO1000 import ( @@ -17,4 +24,9 @@ "RohdeSchwarzZNB20", "RohdeSchwarzZNBBase", "RohdeSchwarzZNBChannel", + "RohdeSchwarzZNLE3", + "RohdeSchwarzZNLE4", + "RohdeSchwarzZNLE6", + "RohdeSchwarzZNLE14", + "RohdeSchwarzZNLE18", ] diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py new file mode 100644 index 00000000000..6846d86a6bc --- /dev/null +++ b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py @@ -0,0 +1,46 @@ +from .ZNB import RohdeSchwarzZNBBase + + +class RohdeSchwarzZNLE3(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE3 + + """ + + pass + + +class RohdeSchwarzZNLE4(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE4 + + """ + + pass + + +class RohdeSchwarzZNLE6(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE6 + + """ + + pass + + +class RohdeSchwarzZNLE14(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE14 + + """ + + pass + + +class RohdeSchwarzZNLE18(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE18 + + """ + + pass