Skip to content

Commit

Permalink
Merge pull request #6796 from FKMalina/test_ZNLE
Browse files Browse the repository at this point in the history
Enable Rohde&Schwarz ZNLE VNA
  • Loading branch information
jenshnielsen authored Jan 27, 2025
2 parents b00095c + c1696fb commit 35aaf75
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/changes/newsfragments/6796.improved_driver
Original file line number Diff line number Diff line change
@@ -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
33 changes: 28 additions & 5 deletions src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}")
Expand Down
12 changes: 12 additions & 0 deletions src/qcodes/instrument_drivers/rohde_schwarz/__init__.py
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -17,4 +24,9 @@
"RohdeSchwarzZNB20",
"RohdeSchwarzZNBBase",
"RohdeSchwarzZNBChannel",
"RohdeSchwarzZNLE3",
"RohdeSchwarzZNLE4",
"RohdeSchwarzZNLE6",
"RohdeSchwarzZNLE14",
"RohdeSchwarzZNLE18",
]
46 changes: 46 additions & 0 deletions src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 35aaf75

Please sign in to comment.