Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Rohde&Schwarz ZNLE VNA #6796

Merged
merged 10 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
"ZNB8": -80,
"ZNB20": -60,
"ZNB40": -60,
"ZNLE3": -10,
"ZNLE4": -10,
"ZNLE6": -10,
"ZNLE14": -10,
"ZNLE18": -10,
}
self._model_max_source_power = {

Check warning on line 451 in src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py

View check run for this annotation

Codecov / codecov/patch

src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py#L451

Added line #L451 was not covered by tests
"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]

Check warning on line 467 in src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py

View check run for this annotation

Codecov / codecov/patch

src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py#L466-L467

Added lines #L466 - L467 were not covered by tests

self.vna_parameter: Parameter = self.add_parameter(
name="vna_parameter",
Expand All @@ -462,7 +480,7 @@
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 @@

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 @@
"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",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Ensuring backwards compatibility
jenshnielsen marked this conversation as resolved.
Show resolved Hide resolved

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
Loading