From 0c68e2f0ac83e442e615db2f86f323ef367e4162 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:16:46 +0200 Subject: [PATCH 01/24] Remove deprecated AlazarTech driver aliases Remove the following deprecated class aliases that were deprecated in 0.57.0: - AlazarTech_ATS9360 (use AlazarTechATS9360) - AlazarTech_ATS9373 (use AlazarTechATS9373) - AlazarTech_ATS9440 (use AlazarTechATS9440) - AlazarTech_ATS9870 (use AlazarTechATS9870) - Demodulation_AcquisitionController (use DemodulationAcquisitionController) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../instrument_drivers/AlazarTech/ATS9360.py | 16 ---------------- .../instrument_drivers/AlazarTech/ATS9373.py | 16 ---------------- .../instrument_drivers/AlazarTech/ATS9440.py | 16 ---------------- .../instrument_drivers/AlazarTech/ATS9870.py | 16 ---------------- .../AlazarTech/ATS_acquisition_controllers.py | 16 ---------------- 5 files changed, 80 deletions(-) diff --git a/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py b/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py index 69cc66edba14..aec0623c9edc 100644 --- a/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py +++ b/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py @@ -2,10 +2,7 @@ import numpy as np from packaging import version -from typing_extensions import deprecated - from qcodes import validators -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from .ATS import AlazarTechATS from .utils import TraceParameter @@ -482,16 +479,3 @@ def _set_trigger_holdoff(self, value: bool) -> None: disable_mask = ~np.uint32(1 << 26) new_value = current_value & disable_mask self._write_register(58, int(new_value)) - - -@deprecated( - "AlazarTech_ATS9360 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9360 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class AlazarTech_ATS9360(AlazarTechATS9360): - """ - Alias for backwards compatibility. Will eventually be deprecated and removed - """ - - pass diff --git a/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py b/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py index 48697527c678..fc45e328f921 100644 --- a/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py +++ b/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py @@ -2,12 +2,9 @@ import numpy as np from packaging import version -from typing_extensions import deprecated - from qcodes import validators from qcodes.instrument_drivers.AlazarTech.ATS import AlazarTechATS from qcodes.instrument_drivers.AlazarTech.utils import TraceParameter -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from qcodes.parameters import Parameter @@ -497,16 +494,3 @@ def _set_trigger_holdoff(self, value: bool) -> None: disable_mask = ~np.uint32(1 << 26) new_value = current_value & disable_mask self._write_register(58, int(new_value)) - - -@deprecated( - "AlazarTech_ATS9373 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9373 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class AlazarTech_ATS9373(AlazarTechATS9373): - """ - Alias for backwards compatibility. Will eventually be deprecated and removed - """ - - pass diff --git a/src/qcodes/instrument_drivers/AlazarTech/ATS9440.py b/src/qcodes/instrument_drivers/AlazarTech/ATS9440.py index 9c3e429d748e..04a3337917e3 100644 --- a/src/qcodes/instrument_drivers/AlazarTech/ATS9440.py +++ b/src/qcodes/instrument_drivers/AlazarTech/ATS9440.py @@ -1,9 +1,6 @@ from typing import TYPE_CHECKING, Any -from typing_extensions import deprecated - from qcodes import validators -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from .ATS import AlazarTechATS from .utils import TraceParameter @@ -398,16 +395,3 @@ def __init__( vals=validators.Ints(min_value=0), ) """Parameter buffer_timeout""" - - -@deprecated( - "AlazarTech_ATS9440 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9440 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class AlazarTech_ATS9440(AlazarTechATS9440): - """ - Alias for backwards compatibility. Will eventually be deprecated and removed - """ - - pass diff --git a/src/qcodes/instrument_drivers/AlazarTech/ATS9870.py b/src/qcodes/instrument_drivers/AlazarTech/ATS9870.py index 7100901000d7..8b859042aba2 100644 --- a/src/qcodes/instrument_drivers/AlazarTech/ATS9870.py +++ b/src/qcodes/instrument_drivers/AlazarTech/ATS9870.py @@ -1,9 +1,6 @@ from typing import TYPE_CHECKING, Any -from typing_extensions import deprecated - from qcodes import validators -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from .ATS import AlazarTechATS from .utils import TraceParameter @@ -406,16 +403,3 @@ def __init__( raise Exception( f"The Alazar board kind is not 'ATS9870', found '{model!s}' instead." ) - - -@deprecated( - "AlazarTech_ATS9870 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9870 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class AlazarTech_ATS9870(AlazarTechATS9870): - """ - Alias for backwards compatibility. Will eventually be deprecated and removed - """ - - pass diff --git a/src/qcodes/instrument_drivers/AlazarTech/ATS_acquisition_controllers.py b/src/qcodes/instrument_drivers/AlazarTech/ATS_acquisition_controllers.py index 606722b8df75..5b64c61829be 100644 --- a/src/qcodes/instrument_drivers/AlazarTech/ATS_acquisition_controllers.py +++ b/src/qcodes/instrument_drivers/AlazarTech/ATS_acquisition_controllers.py @@ -3,9 +3,6 @@ import numpy as np import numpy.typing as npt -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from .ATS import AcquisitionController @@ -167,16 +164,3 @@ def fit(self, buf: npt.NDArray) -> tuple[float, float]: # see manual page 52!!! (using unsigned data) return ampl, math.atan2(ImPart, RePart) * 360 / (2 * math.pi) - - -@deprecated( - "Demodulation_AcquisitionController is deprecated. Please use qcodes.instrument_drivers.AlazarTech.DemodulationAcquisitionController instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Demodulation_AcquisitionController(DemodulationAcquisitionController): - """ - Alias for backwards compatibility. Will eventually be deprecated and removed - """ - - pass From 270dcbb00367dc1f01bfbe02366281351934d5b3 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:22:50 +0200 Subject: [PATCH 02/24] Remove deprecated Basel driver module shims Remove the following deprecated module shims that were deprecated in 0.57.0: - qcodes.instrument_drivers.basel.sp983c - qcodes.instrument_drivers.basel.sp983c_remote Users should import from qcodes.instrument_drivers.basel instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/99999.breaking | 1 + pyproject.toml | 3 -- src/qcodes/instrument_drivers/basel/sp983c.py | 32 ------------------- .../instrument_drivers/basel/sp983c_remote.py | 18 ----------- 4 files changed, 1 insertion(+), 53 deletions(-) create mode 100644 docs/changes/newsfragments/99999.breaking delete mode 100644 src/qcodes/instrument_drivers/basel/sp983c.py delete mode 100644 src/qcodes/instrument_drivers/basel/sp983c_remote.py diff --git a/docs/changes/newsfragments/99999.breaking b/docs/changes/newsfragments/99999.breaking new file mode 100644 index 000000000000..ab2289eeba11 --- /dev/null +++ b/docs/changes/newsfragments/99999.breaking @@ -0,0 +1 @@ +Removed the deprecated ``qcodes.instrument_drivers.basel.sp983c`` and ``qcodes.instrument_drivers.basel.sp983c_remote`` module shims. Import Basel drivers from ``qcodes.instrument_drivers.basel`` instead. diff --git a/pyproject.toml b/pyproject.toml index 4bb89440662c..5c623cd60a3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -288,10 +288,7 @@ known-first-party = ["qcodes"] "src/qcodes/instrument_drivers/rigol/DS1074Z.py" = ["F401"] "src/qcodes/instrument_drivers/rigol/DG1062.py" = ["F401"] "src/qcodes/instrument_drivers/devices.py" = ["F401"] -"src/qcodes/instrument_drivers/basel/sp983c_remote.py" = ["F401"] "src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py" = ["F401"] -"src/qcodes/instrument_drivers/HP/HP8133A.py" = ["F401"] -"src/qcodes/instrument_drivers/HP/HP8753D.py" = ["F401"] "src/qcodes/instrument_drivers/Keysight/N9030B.py" = ["F401"] # TID253 these imports are fine at module level diff --git a/src/qcodes/instrument_drivers/basel/sp983c.py b/src/qcodes/instrument_drivers/basel/sp983c.py deleted file mode 100644 index b03a7cb3c8c2..000000000000 --- a/src/qcodes/instrument_drivers/basel/sp983c.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Legacy module kept around for backwards compatibility reasons. -Will eventually be deprecated and removed - -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .BaselSP983c import BaselSP983c - -warnings.warn( - "The `qcodes._drivers.basel.sp983c` module is deprecated. " - "Please import drivers from from `qcodes.instrument_drivers.basel` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - - -class SP983C(BaselSP983c): - def get_idn(self) -> dict[str, str | None]: - vendor = "Physics Basel" - model = "SP 983(c)" - serial = None - firmware = None - return { - "vendor": vendor, - "model": model, - "serial": serial, - "firmware": firmware, - } diff --git a/src/qcodes/instrument_drivers/basel/sp983c_remote.py b/src/qcodes/instrument_drivers/basel/sp983c_remote.py deleted file mode 100644 index a6149c1817a2..000000000000 --- a/src/qcodes/instrument_drivers/basel/sp983c_remote.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Legacy module kept around for backwards compatibility reasons. -Will eventually be deprecated and removed - -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .BaselSP983a import BaselSP983a as SP983A - -warnings.warn( - "The `qcodes._drivers.basel.sp983c_remote` module is deprecated. " - "Please import drivers from from `qcodes.instrument_drivers.basel` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) From 95ed6edf4d10297964f61e55bfb576ffd442a8e3 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:25:15 +0200 Subject: [PATCH 03/24] Remove deprecated Ithaco driver alias Remove the following deprecated class alias that was deprecated in 0.57.0: - Ithaco_1211 (use Ithaco1211) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../instrument_drivers/ithaco/Ithaco_1211.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/qcodes/instrument_drivers/ithaco/Ithaco_1211.py b/src/qcodes/instrument_drivers/ithaco/Ithaco_1211.py index da12b7b28925..3d81a798da35 100644 --- a/src/qcodes/instrument_drivers/ithaco/Ithaco_1211.py +++ b/src/qcodes/instrument_drivers/ithaco/Ithaco_1211.py @@ -1,10 +1,7 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - from qcodes.instrument import Instrument, InstrumentBaseKWArgs from qcodes.parameters import MultiParameter, Parameter, ParamRawDataType -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from qcodes.validators import Bool, Enum if TYPE_CHECKING: @@ -150,14 +147,3 @@ def get_idn(self) -> dict[str, str | None]: "serial": serial, "firmware": firmware, } - - -@deprecated( - "Ithaco_1211 is deprecated. Please use qcodes.instrument_drivers.ithaco.Ithaco1211 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Ithaco_1211(Ithaco1211): - """ - Old alias for Itaco1211. Will eventually be deprecated and removed. - """ From 4ada4f64403670fcfdfebb2042b714d9f1362f58 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:26:10 +0200 Subject: [PATCH 04/24] Remove deprecated Keithley driver aliases and module shims Remove the following deprecated items that were deprecated in 0.57.0: - Module qcodes.instrument_drivers.tektronix.Keithley_2450 - Module qcodes.instrument_drivers.tektronix.keithley_7510 - Module qcodes.instrument_drivers.tektronix.Keithley_s46 - Class Keithley_2000 (use Keithley2000) - Class Keithley_2400 (use Keithley2400) - Class Keithley_2600 (use Keithley2600) - Class Keithley_3706A (use Keithley3706A) - Class Keithley_6500 (use Keithley6500) - Class S46 (use KeithleyS46) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100001.breaking | 1 + .../tektronix/Keithley_2000.py | 15 -------- .../tektronix/Keithley_2400.py | 16 --------- .../tektronix/Keithley_2450.py | 27 -------------- .../tektronix/Keithley_2600_channels.py | 15 -------- .../tektronix/Keithley_3706A.py | 15 -------- .../tektronix/Keithley_6500.py | 15 -------- .../tektronix/Keithley_s46.py | 36 ------------------- .../tektronix/keithley_7510.py | 27 -------------- 9 files changed, 1 insertion(+), 166 deletions(-) create mode 100644 docs/changes/newsfragments/100001.breaking delete mode 100644 src/qcodes/instrument_drivers/tektronix/Keithley_2450.py delete mode 100644 src/qcodes/instrument_drivers/tektronix/Keithley_s46.py delete mode 100644 src/qcodes/instrument_drivers/tektronix/keithley_7510.py diff --git a/docs/changes/newsfragments/100001.breaking b/docs/changes/newsfragments/100001.breaking new file mode 100644 index 000000000000..2d4469ce385c --- /dev/null +++ b/docs/changes/newsfragments/100001.breaking @@ -0,0 +1 @@ +Removed deprecated Keithley/Tektronix compatibility shims and aliases that were deprecated in ``0.57.0``. Use ``qcodes.instrument_drivers.Keithley`` imports and the non-underscored Keithley class names instead. diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py index 90c7a35ad1d3..bd5eebc94c23 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py @@ -3,27 +3,12 @@ Keithly drivers have moved to the Keithley module """ -from typing_extensions import deprecated - from qcodes.instrument_drivers.Keithley.Keithley_2000 import ( Keithley2000, _parse_output_bool, _parse_output_string, ) -from qcodes.utils.deprecate import QCoDeSDeprecationWarning parse_output_string = _parse_output_string parse_output_bool = _parse_output_bool - -@deprecated( - "Keithley_2000 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley2000 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Keithley_2000(Keithley2000): - """ - Backwards compatibility alias for Keithley 2000 driver - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py index dbb1e971bf40..f8c93a110ffe 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py @@ -3,20 +3,4 @@ Keithly drivers have moved to the Keithley module """ -from typing_extensions import deprecated - from qcodes.instrument_drivers.Keithley.Keithley_2400 import Keithley2400 -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - - -@deprecated( - "Keithley_2400 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley2400 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Keithley_2400(Keithley2400): - """ - Backwards compatibility alias for Keithley 2400 driver - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2450.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2450.py deleted file mode 100644 index 3ae59453657d..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2450.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" - -import warnings - -from qcodes.instrument_drivers.Keithley.Keithley_2450 import ( - Keithley2450, - Keithley2450Buffer, - Keithley2450Sense, - Keithley2450Source, - ParameterWithSetpointsCustomized, - _SweepDict, -) -from qcodes.utils import QCoDeSDeprecationWarning - -warnings.warn( - "The `qcodes.instrument_drivers.tektronix.Keithley_2450` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.Keithley` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - -Buffer2450 = Keithley2450Buffer -Sense2450 = Keithley2450Sense -Source2450 = Keithley2450Source diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py index eed4a33d8570..51251afb02b5 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py @@ -7,8 +7,6 @@ import sys from enum import Enum, StrEnum -from typing_extensions import deprecated - from qcodes.instrument_drivers.Keithley._Keithley_2600 import ( Keithley2600, Keithley2600Channel, @@ -20,22 +18,9 @@ _MeasurementVoltageParameter, _ParameterWithStatus, ) -from qcodes.utils.deprecate import QCoDeSDeprecationWarning log = logging.getLogger(__name__) KeithleyChannel = Keithley2600Channel - -@deprecated( - "Keithley_2600 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley2600 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Keithley_2600(Keithley2600): - """ - Alias left for backwards compatibility. Will eventually be deprecated and removed. - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py b/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py index c27c19bfbfdc..699a118d10bb 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py @@ -3,29 +3,14 @@ Keithly drivers have moved to the Keithley module """ -from typing_extensions import deprecated - from qcodes.instrument_drivers.Keithley.Keithley_3706A import ( Keithley3706A, Keithley3706AInvalidValue, Keithley3706AUnknownOrEmptySlot, ) -from qcodes.utils.deprecate import QCoDeSDeprecationWarning UnknownOrEmptySlot = Keithley3706AUnknownOrEmptySlot InvalidValue = Keithley3706AInvalidValue - -@deprecated( - "Keithley_3706A is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley3706A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Keithley_3706A(Keithley3706A): - """ - Alias left for backwards compatibility. Will eventually be deprecated and removed. - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py b/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py index 51a3a7cadba8..e767b0c43d57 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py @@ -3,27 +3,12 @@ Keithly drivers have moved to the Keithley module """ -from typing_extensions import deprecated - from qcodes.instrument_drivers.Keithley.Keithley_6500 import ( Keithley6500, Keithley6500CommandSetError, _parse_output_bool, _parse_output_string, ) -from qcodes.utils.deprecate import QCoDeSDeprecationWarning CommandSetError = Keithley6500CommandSetError - -@deprecated( - "Keithley_6500 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley6500 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Keithley_6500(Keithley6500): - """ - Alias left for backwards compatibility. Will eventually be deprecated and removed. - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_s46.py b/src/qcodes/instrument_drivers/tektronix/Keithley_s46.py deleted file mode 100644 index 92eba915fe65..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_s46.py +++ /dev/null @@ -1,36 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" - -import warnings - -from typing_extensions import deprecated - -from qcodes.instrument_drivers.Keithley.Keithley_s46 import ( - KeithleyS46, - KeithleyS46LockAcquisitionError, - KeithleyS46RelayLock, -) -from qcodes.utils import QCoDeSDeprecationWarning - -warnings.warn( - "The `qcodes.instrument_drivers.tektronix.Keithley_s46` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.Keithley` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - -LockAcquisitionError = KeithleyS46LockAcquisitionError -RelayLock = KeithleyS46RelayLock - - -@deprecated( - "S46 is deprecated. Please use qcodes.instrument_drivers.Keithley.KeithleyS46 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class S46(KeithleyS46): - """ - Alias left for backwards compatibility. Will eventually be deprecated and removed. - """ diff --git a/src/qcodes/instrument_drivers/tektronix/keithley_7510.py b/src/qcodes/instrument_drivers/tektronix/keithley_7510.py deleted file mode 100644 index 74eacbe0f0c7..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/keithley_7510.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" - -import warnings - -from qcodes.instrument_drivers.Keithley.Keithley_7510 import ( - DataArray7510, - GeneratedSetPoints, - Keithley7510, - Keithley7510Buffer, - Keithley7510DigitizeSense, - Keithley7510Sense, -) -from qcodes.utils import QCoDeSDeprecationWarning - -warnings.warn( - "The `qcodes.instrument_drivers.tektronix.keithley_7510` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.Keithley` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - -Buffer7510 = Keithley7510Buffer -Sense7510 = Keithley7510Sense -DigitizeSense7510 = Keithley7510DigitizeSense From fd51291685f615e72acb23b6bc438dc0effec5b2 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:26:39 +0200 Subject: [PATCH 05/24] Remove deprecated HP driver aliases and module shims Remove the following deprecated items that were deprecated in 0.57.0: - Module qcodes.instrument_drivers.HP.HP8133A (import from qcodes.instrument_drivers.HP instead) - Module qcodes.instrument_drivers.HP.HP8753D (import from qcodes.instrument_drivers.HP instead) - Class HP_83650A (use HP83650A instead) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/qcodes/instrument_drivers/HP/HP8133A.py | 16 ---------------- src/qcodes/instrument_drivers/HP/HP8753D.py | 16 ---------------- src/qcodes/instrument_drivers/HP/HP_83650A.py | 15 --------------- 3 files changed, 47 deletions(-) delete mode 100644 src/qcodes/instrument_drivers/HP/HP8133A.py delete mode 100644 src/qcodes/instrument_drivers/HP/HP8753D.py diff --git a/src/qcodes/instrument_drivers/HP/HP8133A.py b/src/qcodes/instrument_drivers/HP/HP8133A.py deleted file mode 100644 index b5d195319e28..000000000000 --- a/src/qcodes/instrument_drivers/HP/HP8133A.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Module left for backwards compatibility. Will be deprecated and removed eventually. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .HP_8133A import HP8133A - -warnings.warn( - "The `qcodes._drivers.HP.HP8133A` module is deprecated. " - "Please import drivers from from `qcodes.instrument_drivers.HP` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) diff --git a/src/qcodes/instrument_drivers/HP/HP8753D.py b/src/qcodes/instrument_drivers/HP/HP8753D.py deleted file mode 100644 index ccee25f5074d..000000000000 --- a/src/qcodes/instrument_drivers/HP/HP8753D.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Module left for backwards compatibility. Will be deprecated and removed eventually. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .HP_8753D import HP8753D - -warnings.warn( - "The `qcodes._drivers.HP.HP8753D` module is deprecated. " - "Please import drivers from from `qcodes.instrument_drivers.HP` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) diff --git a/src/qcodes/instrument_drivers/HP/HP_83650A.py b/src/qcodes/instrument_drivers/HP/HP_83650A.py index cf655fcf7603..7282f1107dc7 100644 --- a/src/qcodes/instrument_drivers/HP/HP_83650A.py +++ b/src/qcodes/instrument_drivers/HP/HP_83650A.py @@ -4,11 +4,8 @@ import logging from typing import TYPE_CHECKING -from typing_extensions import deprecated - from qcodes import validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing import Unpack @@ -166,15 +163,3 @@ def print_modstatus(self) -> None: print(f"{self.amstatus.label}: {self.amstatus.get()}") print(f"{self.pulsestatus.label}: {self.pulsestatus.get()}") print(f"{self.pulsesource.label}: {self.pulsesource.get()}") - - -@deprecated( - "HP_83650A is deprecated. Please use qcodes.instrument_drivers.HP.HP83650A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class HP_83650A(HP83650A): - """ - Alias of HP83650A for backwards compatibility. - Will eventually be deprecated and removed. - """ From 1af99fa9a1f2beb117d2ec5b7f5ebc74210c8802 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:27:00 +0200 Subject: [PATCH 06/24] Remove deprecated Galil driver aliases Remove the following deprecated class aliases that were deprecated in 0.57.0: - VectorMode (use GalilDMC4133VectorMode) - Motor (use GalilDMC4133Motor) - DMC4133Controller (use GalilDMC4133Controller) - Arm (use GalilDMC4133Arm) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100000.breaking | 1 + .../instrument_drivers/Galil/dmc_41x3.py | 54 ------------------- 2 files changed, 1 insertion(+), 54 deletions(-) create mode 100644 docs/changes/newsfragments/100000.breaking diff --git a/docs/changes/newsfragments/100000.breaking b/docs/changes/newsfragments/100000.breaking new file mode 100644 index 000000000000..60632131517b --- /dev/null +++ b/docs/changes/newsfragments/100000.breaking @@ -0,0 +1 @@ +Removed the deprecated ``VectorMode``, ``Motor``, ``DMC4133Controller``, and ``Arm`` Galil driver aliases. Use ``GalilDMC4133VectorMode``, ``GalilDMC4133Motor``, ``GalilDMC4133Controller``, and ``GalilDMC4133Arm`` instead. diff --git a/src/qcodes/instrument_drivers/Galil/dmc_41x3.py b/src/qcodes/instrument_drivers/Galil/dmc_41x3.py index 2caf442a3f3f..1ac93effe35d 100644 --- a/src/qcodes/instrument_drivers/Galil/dmc_41x3.py +++ b/src/qcodes/instrument_drivers/Galil/dmc_41x3.py @@ -8,10 +8,8 @@ import numpy as np import numpy.typing as npt -from typing_extensions import deprecated from qcodes.instrument import Instrument, InstrumentBaseKWArgs, InstrumentChannel -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from qcodes.validators import Enum, Ints, Multiples if TYPE_CHECKING: @@ -250,19 +248,6 @@ def clear_sequence(self, coord_sys: str) -> None: self.write(f"CS {coord_sys}") -@deprecated( - "VectorMode is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133VectorMode instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class VectorMode(GalilDMC4133VectorMode): - """ - Alias for backwards compatibility - """ - - pass - - class GalilDMC4133Motor(InstrumentChannel["GalilDMC4133Controller"]): """ Class to control a single motor (independent of possible other motors) @@ -479,19 +464,6 @@ def error_magnitude(self) -> float: return float(self.ask(f"QS{self._axis}=?")) -@deprecated( - "Motor is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133Motor instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Motor(GalilDMC4133Motor): - """ - Alias for backwards compatibility - """ - - pass - - class GalilDMC4133Controller(GalilMotionController): """ Driver for Galil DMC-4133 Controller @@ -645,19 +617,6 @@ def wait_till_motion_complete(self) -> None: self.motors_off() -@deprecated( - "DMC4133Controller is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133Controller instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class DMC4133Controller(GalilDMC4133Controller): - """ - Alias for backwards compatibility - """ - - pass - - class GalilDMC4133Arm: """ Module to control probe arm. It is assumed that the chip to be probed has @@ -1166,16 +1125,3 @@ def _calculate_vector_component(vec: float, val: int) -> int: assert return_val % 1024 == 0 return return_val - - -@deprecated( - "Arm is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133Arm instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Arm(GalilDMC4133Arm): - """ - Alias for backwards compatibility - """ - - pass From 2b03a2eb6966e4ee88ae2d40f6c166e3a67afaf6 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:30:42 +0200 Subject: [PATCH 07/24] Remove deprecated Rigol driver module shims Remove the following deprecated module shims that were deprecated in 0.57.0: - qcodes.instrument_drivers.rigol.DG1062 - qcodes.instrument_drivers.rigol.DG4000 - qcodes.instrument_drivers.rigol.DP821 - qcodes.instrument_drivers.rigol.DP831 - qcodes.instrument_drivers.rigol.DP832 - qcodes.instrument_drivers.rigol.DS1074Z - qcodes.instrument_drivers.rigol.DS4000 Users should import from qcodes.instrument_drivers.rigol instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100002.breaking | 1 + pyproject.toml | 7 ----- src/qcodes/instrument_drivers/rigol/DG1062.py | 21 -------------- src/qcodes/instrument_drivers/rigol/DG4000.py | 28 ------------------- src/qcodes/instrument_drivers/rigol/DP821.py | 17 ----------- src/qcodes/instrument_drivers/rigol/DP831.py | 17 ----------- src/qcodes/instrument_drivers/rigol/DP832.py | 17 ----------- .../instrument_drivers/rigol/DS1074Z.py | 21 -------------- src/qcodes/instrument_drivers/rigol/DS4000.py | 28 ------------------- 9 files changed, 1 insertion(+), 156 deletions(-) create mode 100644 docs/changes/newsfragments/100002.breaking delete mode 100644 src/qcodes/instrument_drivers/rigol/DG1062.py delete mode 100644 src/qcodes/instrument_drivers/rigol/DG4000.py delete mode 100644 src/qcodes/instrument_drivers/rigol/DP821.py delete mode 100644 src/qcodes/instrument_drivers/rigol/DP831.py delete mode 100644 src/qcodes/instrument_drivers/rigol/DP832.py delete mode 100644 src/qcodes/instrument_drivers/rigol/DS1074Z.py delete mode 100644 src/qcodes/instrument_drivers/rigol/DS4000.py diff --git a/docs/changes/newsfragments/100002.breaking b/docs/changes/newsfragments/100002.breaking new file mode 100644 index 000000000000..c5396bf9538b --- /dev/null +++ b/docs/changes/newsfragments/100002.breaking @@ -0,0 +1 @@ +Removed the deprecated ``qcodes.instrument_drivers.rigol`` module shims for ``DG1062``, ``DG4000``, ``DP821``, ``DP831``, ``DP832``, ``DS1074Z``, and ``DS4000``. Import these drivers from ``qcodes.instrument_drivers.rigol`` instead. diff --git a/pyproject.toml b/pyproject.toml index 5c623cd60a3d..b5b238fbb74f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -280,13 +280,6 @@ known-first-party = ["qcodes"] "src/qcodes/instrument_drivers/tektronix/keithley_7510.py" = ["F401"] "src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py" = ["F401"] "src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py" = ["F401"] -"src/qcodes/instrument_drivers/rigol/DS4000.py" = ["F401"] -"src/qcodes/instrument_drivers/rigol/DG4000.py" = ["F401"] -"src/qcodes/instrument_drivers/rigol/DP832.py" = ["F401"] -"src/qcodes/instrument_drivers/rigol/DP831.py" = ["F401"] -"src/qcodes/instrument_drivers/rigol/DP821.py" = ["F401"] -"src/qcodes/instrument_drivers/rigol/DS1074Z.py" = ["F401"] -"src/qcodes/instrument_drivers/rigol/DG1062.py" = ["F401"] "src/qcodes/instrument_drivers/devices.py" = ["F401"] "src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py" = ["F401"] "src/qcodes/instrument_drivers/Keysight/N9030B.py" = ["F401"] diff --git a/src/qcodes/instrument_drivers/rigol/DG1062.py b/src/qcodes/instrument_drivers/rigol/DG1062.py deleted file mode 100644 index 0ae7c00c84f8..000000000000 --- a/src/qcodes/instrument_drivers/rigol/DG1062.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Old alias for RigolDG1062 for backwards compatibility. -Will eventually be deprecated and removed. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .Rigol_DG1062 import RigolDG1062, RigolDG1062Burst, RigolDG1062Channel - -warnings.warn( - "The `qcodes.instrument_drivers.rigol.DG1062` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.rigol` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - - -class DG1062(RigolDG1062): - pass diff --git a/src/qcodes/instrument_drivers/rigol/DG4000.py b/src/qcodes/instrument_drivers/rigol/DG4000.py deleted file mode 100644 index a6ce4e844796..000000000000 --- a/src/qcodes/instrument_drivers/rigol/DG4000.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -Old alias for RigolDG4000 for backwards compatibility. -Will eventually be deprecated and removed. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .Rigol_DG4000 import ( - RigolDG4000, - clean_string, - is_number, - parse_multiple_outputs, - parse_single_output, - parse_string_output, -) - -warnings.warn( - "The `qcodes.instrument_drivers.rigol.DG4000` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.rigol` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - - -class Rigol_DG4000(RigolDG4000): - pass diff --git a/src/qcodes/instrument_drivers/rigol/DP821.py b/src/qcodes/instrument_drivers/rigol/DP821.py deleted file mode 100644 index 0a4361366708..000000000000 --- a/src/qcodes/instrument_drivers/rigol/DP821.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Old alias for RigolDP821 for backwards compatibility. -Will eventually be deprecated and removed. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .Rigol_DP821 import RigolDP821 - -warnings.warn( - "The `qcodes.instrument_drivers.rigol.DP821` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.rigol` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) diff --git a/src/qcodes/instrument_drivers/rigol/DP831.py b/src/qcodes/instrument_drivers/rigol/DP831.py deleted file mode 100644 index 29ef4fe387ef..000000000000 --- a/src/qcodes/instrument_drivers/rigol/DP831.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Old alias for RigolDP831 for backwards compatibility. -Will eventually be deprecated and removed. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .Rigol_DP831 import RigolDP831 - -warnings.warn( - "The `qcodes.instrument_drivers.rigol.DP831` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.rigol` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) diff --git a/src/qcodes/instrument_drivers/rigol/DP832.py b/src/qcodes/instrument_drivers/rigol/DP832.py deleted file mode 100644 index bb5dda7cbabe..000000000000 --- a/src/qcodes/instrument_drivers/rigol/DP832.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Old alias for RigolDP832 for backwards compatibility. -Will eventually be deprecated and removed. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .Rigol_DP832 import RigolDP832 - -warnings.warn( - "The `qcodes.instrument_drivers.rigol.DP832` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.rigol` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) diff --git a/src/qcodes/instrument_drivers/rigol/DS1074Z.py b/src/qcodes/instrument_drivers/rigol/DS1074Z.py deleted file mode 100644 index d34c5bf2f4b7..000000000000 --- a/src/qcodes/instrument_drivers/rigol/DS1074Z.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Old alias for RigolDS1074Z for backwards compatibility. -Will eventually be deprecated and removed. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .Rigol_DS1074Z import RigolDS1074Z, RigolDS1074ZChannel - -warnings.warn( - "The `qcodes.instrument_drivers.rigol.DS1074Z` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.rigol` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - - -class DS1074Z(RigolDS1074Z): - pass diff --git a/src/qcodes/instrument_drivers/rigol/DS4000.py b/src/qcodes/instrument_drivers/rigol/DS4000.py deleted file mode 100644 index 2f629ef12752..000000000000 --- a/src/qcodes/instrument_drivers/rigol/DS4000.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -Old alias for RigolDS4000 for backwards compatibility. -Will eventually be deprecated and removed. -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from .Rigol_DS4000 import ( - RigolDS4000, - RigolDS4000Channel, - RigolDS4000TraceNotReady, - ScopeArray, -) - -warnings.warn( - "The `qcodes.instrument_drivers.rigol.DS4000` module is deprecated. " - "Please import drivers from `qcodes.instrument_drivers.rigol` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) - -TraceNotReady = RigolDS4000TraceNotReady - - -class DS4000(RigolDS4000): - pass From 02eac7cba0cb3d905ea879678f3130067044e44c Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:32:50 +0200 Subject: [PATCH 08/24] Remove deprecated Rohde & Schwarz driver alias Remove RohdeSchwarz_SGS100A (use RohdeSchwarzSGS100A), deprecated in 0.57.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100011.breaking | 1 + .../instrument_drivers/rohde_schwarz/SGS100A.py | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) create mode 100644 docs/changes/newsfragments/100011.breaking diff --git a/docs/changes/newsfragments/100011.breaking b/docs/changes/newsfragments/100011.breaking new file mode 100644 index 000000000000..3c83788fbe10 --- /dev/null +++ b/docs/changes/newsfragments/100011.breaking @@ -0,0 +1 @@ +Removed the deprecated ``RohdeSchwarz_SGS100A`` alias for the Rohde & Schwarz SGS100A driver. Use ``RohdeSchwarzSGS100A`` instead. diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py b/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py index 627e19a2e2b3..6e5288ee7be6 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py @@ -1,11 +1,8 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - import qcodes.validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs from qcodes.parameters import create_on_off_val_mapping -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing import Unpack @@ -346,12 +343,3 @@ def on(self) -> None: def off(self) -> None: self.status("off") - - -@deprecated( - "RohdeSchwarz_SGS100A is deprecated. Please use qcodes.instrument_drivers.rohde_schwarz.RohdeSchwarzSGS100A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class RohdeSchwarz_SGS100A(RohdeSchwarzSGS100A): - pass From f19dddaa7e27f31458c83fd9fde6c42872082643 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:33:12 +0200 Subject: [PATCH 09/24] Remove deprecated Mini-Circuits driver aliases Remove the following deprecated class aliases that were deprecated in 0.57.0: - MC_channel (RC_SP4T) (use MiniCircuitsRCSP4TChannel) - RC_SP4T (use MiniCircuitsRCSP4T) - MC_channel (RC_SPDT) (use MiniCircuitsRCSPDTChannel) - RC_SPDT (use MiniCircuitsRCSPDT) - SwitchChannelUSB (use MiniCircuitsUsbSPDTSwitchChannel) - USB_SPDT (use MiniCircuitsUsbSPDT) - RUDAT_13G_90 (use MiniCircuitsRudat13G90Base) - RUDAT_13G_90_USB (use MiniCircuitsRudat13G90Usb) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100010.breaking | 1 + pyproject.toml | 1 - .../Minicircuits/RC_SP4T.py | 30 +------------------ .../Minicircuits/RC_SPDT.py | 30 +------------------ .../Minicircuits/RUDAT_13G_90.py | 30 ++++--------------- .../Minicircuits/USB_SPDT.py | 30 +------------------ 6 files changed, 9 insertions(+), 113 deletions(-) create mode 100644 docs/changes/newsfragments/100010.breaking diff --git a/docs/changes/newsfragments/100010.breaking b/docs/changes/newsfragments/100010.breaking new file mode 100644 index 000000000000..f9f8d8023063 --- /dev/null +++ b/docs/changes/newsfragments/100010.breaking @@ -0,0 +1 @@ +Removed deprecated Mini-Circuits driver aliases that were deprecated in ``0.57.0``. Use ``MiniCircuitsRCSP4TChannel``, ``MiniCircuitsRCSP4T``, ``MiniCircuitsRCSPDTChannel``, ``MiniCircuitsRCSPDT``, ``MiniCircuitsUsbSPDTSwitchChannel``, ``MiniCircuitsUsbSPDT``, ``MiniCircuitsRudat13G90Base``, and ``MiniCircuitsRudat13G90Usb`` instead. diff --git a/pyproject.toml b/pyproject.toml index b5b238fbb74f..0a57e13af835 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -281,7 +281,6 @@ known-first-party = ["qcodes"] "src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py" = ["F401"] "src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py" = ["F401"] "src/qcodes/instrument_drivers/devices.py" = ["F401"] -"src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py" = ["F401"] "src/qcodes/instrument_drivers/Keysight/N9030B.py" = ["F401"] # TID253 these imports are fine at module level diff --git a/src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py b/src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py index 69f75942a82a..f3783ae16bf2 100644 --- a/src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py +++ b/src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py @@ -1,31 +1,3 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from ._minicircuits_rc_sp4t import MiniCircuitsRCSP4T, MiniCircuitsRCSP4TChannel - -@deprecated( - "MC_channel is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSP4TChannel instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class MC_channel(MiniCircuitsRCSP4TChannel): - """ - Alias for backwards compatibility - """ - - pass - - -@deprecated( - "RC_SP4T is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSP4T instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class RC_SP4T(MiniCircuitsRCSP4T): - """ - Alias for backwards compatibility - """ - - pass +__all__ = ["MiniCircuitsRCSP4T", "MiniCircuitsRCSP4TChannel"] diff --git a/src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py b/src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py index 49d7a29575da..6de3cfd60598 100644 --- a/src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py +++ b/src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py @@ -1,31 +1,3 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from ._minicircuits_rc_spdt import MiniCircuitsRCSPDT, MiniCircuitsRCSPDTChannel - -@deprecated( - "MC_channel is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSPDTChannel instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class MC_channel(MiniCircuitsRCSPDTChannel): - """ - Alias for backwards compatibility - """ - - pass - - -@deprecated( - "RC_SPDT is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsRCSPDT instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class RC_SPDT(MiniCircuitsRCSPDT): - """ - Alias for backwards compatibility - """ - - pass +__all__ = ["MiniCircuitsRCSPDT", "MiniCircuitsRCSPDTChannel"] diff --git a/src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py b/src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py index 8a55b5e61a05..eee96eead390 100644 --- a/src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py +++ b/src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py @@ -1,31 +1,11 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from ._minicircuits_rudat_13g_90 import ( MiniCircuitsRudat13G90Base, MiniCircuitsRudat13G90Usb, ) from .USBHIDMixin import MiniCircuitsHIDMixin - -@deprecated( - "RUDAT_13G_90 is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsRudat13G90Base instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class RUDAT_13G_90(MiniCircuitsRudat13G90Base): - """Alias for backwards compatibility.""" - - pass - - -@deprecated( - "RUDAT_13G_90_USB is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsRudat13G90Usb instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class RUDAT_13G_90_USB(MiniCircuitsRudat13G90Usb): - """Alias for backwards compatibility.""" - - pass +__all__ = [ + "MiniCircuitsHIDMixin", + "MiniCircuitsRudat13G90Base", + "MiniCircuitsRudat13G90Usb", +] diff --git a/src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py b/src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py index ed76cc644804..4c8e378762f9 100644 --- a/src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py +++ b/src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py @@ -1,34 +1,6 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from ._minicircuits_usb_spdt import ( MiniCircuitsUsbSPDT, MiniCircuitsUsbSPDTSwitchChannel, ) - -@deprecated( - "SwitchChannelUSB is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsUsbSPDTSwitchChannel instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class SwitchChannelUSB(MiniCircuitsUsbSPDTSwitchChannel): - """ - Alias for backwards compatibility - """ - - pass - - -@deprecated( - "USB_SPDT is deprecated. Please use qcodes.instrument_drivers.Minicircuits.MiniCircuitsUsbSPDT instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class USB_SPDT(MiniCircuitsUsbSPDT): - """ - Alias for backwards compatibility - """ - - pass +__all__ = ["MiniCircuitsUsbSPDT", "MiniCircuitsUsbSPDTSwitchChannel"] From 80124fa577d49ef030695c62876641ee54011fe6 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:34:04 +0200 Subject: [PATCH 10/24] Remove deprecated Signal Hound driver alias Remove SignalHound_USB_SA124B (use SignalHoundUSBSA124B), deprecated in 0.57.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100012.breaking | 1 + .../instrument_drivers/signal_hound/USB_SA124B.py | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) create mode 100644 docs/changes/newsfragments/100012.breaking diff --git a/docs/changes/newsfragments/100012.breaking b/docs/changes/newsfragments/100012.breaking new file mode 100644 index 000000000000..d7fe50d91ec7 --- /dev/null +++ b/docs/changes/newsfragments/100012.breaking @@ -0,0 +1 @@ +Removed the deprecated ``SignalHound_USB_SA124B`` alias for the Signal Hound USB-SA124B driver. Use ``SignalHoundUSBSA124B`` instead. diff --git a/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py b/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py index f7ef4c9d3b6c..90a716044bbb 100644 --- a/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py +++ b/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py @@ -3,10 +3,6 @@ """ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .SignalHound_USB_SA124B import ( Constants, ExternalRefParameter, @@ -17,12 +13,3 @@ TraceParameter, saStatus, ) - - -@deprecated( - "SignalHound_USB_SA124B is deprecated. Please use qcodes.instrument_drivers.signal_hound.SignalHoundUSBSA124B instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class SignalHound_USB_SA124B(SignalHoundUSBSA124B): - pass From 895776894c1b9d055be1dcdbf340a601597989be Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:35:30 +0200 Subject: [PATCH 11/24] Remove deprecated Stanford Research Systems driver alias Remove SRS_SG384 (use SG384), deprecated in 0.57.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100014.breaking | 1 + .../stanford_research/SG384.py | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) create mode 100644 docs/changes/newsfragments/100014.breaking diff --git a/docs/changes/newsfragments/100014.breaking b/docs/changes/newsfragments/100014.breaking new file mode 100644 index 000000000000..6c5dfc95e20d --- /dev/null +++ b/docs/changes/newsfragments/100014.breaking @@ -0,0 +1 @@ +Removed the deprecated ``SRS_SG384`` alias for the Stanford Research Systems SG384 driver. Use ``SG384`` instead. diff --git a/src/qcodes/instrument_drivers/stanford_research/SG384.py b/src/qcodes/instrument_drivers/stanford_research/SG384.py index 690c5a80280e..cad410d55f6a 100644 --- a/src/qcodes/instrument_drivers/stanford_research/SG384.py +++ b/src/qcodes/instrument_drivers/stanford_research/SG384.py @@ -1,10 +1,7 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - from qcodes import validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing import Unpack @@ -227,16 +224,3 @@ def __init__( ) """Parameter modulation_type""" self.connect_message() - - -@deprecated( - "SRS_SG384 is deprecated. Please use qcodes.instrument_drivers.stanford_research.SG384 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class SRS_SG384(SG384): - """ - Deprecated alternative name for backwards compatibility - """ - - pass From 1372d75e0bd261527a67e1279de06fadb2940fd5 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:35:41 +0200 Subject: [PATCH 12/24] Remove deprecated Oxford Instruments driver aliases Remove the following deprecated class aliases that were deprecated in 0.57.0: - Triton (use OxfordTriton) - MercuryWorkerPS (use OxfordMercuryWorkerPS) - MercuryiPS (use OxfordMercuryiPS) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100003.breaking | 1 + .../oxford/MercuryiPS_VISA.py | 44 ++++++------------- .../instrument_drivers/oxford/triton.py | 14 ------ 3 files changed, 14 insertions(+), 45 deletions(-) create mode 100644 docs/changes/newsfragments/100003.breaking diff --git a/docs/changes/newsfragments/100003.breaking b/docs/changes/newsfragments/100003.breaking new file mode 100644 index 000000000000..752294c8d5fe --- /dev/null +++ b/docs/changes/newsfragments/100003.breaking @@ -0,0 +1 @@ +Removed the deprecated Oxford Instruments driver aliases ``Triton``, ``MercuryWorkerPS``, and ``MercuryiPS``. Use ``OxfordTriton``, ``OxfordMercuryWorkerPS``, and ``OxfordMercuryiPS`` instead. diff --git a/src/qcodes/instrument_drivers/oxford/MercuryiPS_VISA.py b/src/qcodes/instrument_drivers/oxford/MercuryiPS_VISA.py index 95c5d72a99e2..cba85ab87e78 100644 --- a/src/qcodes/instrument_drivers/oxford/MercuryiPS_VISA.py +++ b/src/qcodes/instrument_drivers/oxford/MercuryiPS_VISA.py @@ -8,7 +8,6 @@ import numpy as np import numpy.typing as npt from packaging import version -from typing_extensions import deprecated from qcodes.instrument import ( InstrumentBaseKWArgs, @@ -17,7 +16,6 @@ VisaInstrumentKWArgs, ) from qcodes.math_utils import FieldVector -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from collections.abc import Callable @@ -266,7 +264,7 @@ def _param_getter(self, get_cmd: str) -> str: get_cmd: raw string for the command, e.g. 'SIG:VOLT' Returns: - The response. Cf. MercuryiPS.ask for how much is returned + The response. Cf. OxfordMercuryiPS.ask for how much is returned """ dressed_cmd = f"READ:DEV:{self.uid}:{self.psu_string}:{get_cmd}" @@ -294,19 +292,6 @@ def _param_setter(self, set_cmd: str, value: float | str) -> None: # the intended value -@deprecated( - "MercuryWorkerPS is deprecated. Please use qcodes.instrument_drivers.oxford.OxfordMercuryWorkerPS instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class MercuryWorkerPS(OxfordMercuryWorkerPS): - """ - Alias for backwards compatibility - """ - - pass - - class OxfordMercuryiPS(VisaInstrument): """ Driver class for the QCoDeS Oxford Instruments MercuryiPS magnet power @@ -536,7 +521,9 @@ def _set_target(self, coordinate: str, target: float) -> None: cartesian_targ = self._target_vector.get_components("x", "y", "z") for targ, worker in zip(cartesian_targ, self.submodules.values()): if not isinstance(worker, OxfordMercuryWorkerPS): - raise RuntimeError(f"Expected a MercuryWorkerPS but got {type(worker)}") + raise RuntimeError( + f"Expected an OxfordMercuryWorkerPS but got {type(worker)}" + ) worker.field_target(targ) def _set_target_field(self, field: FieldVector) -> None: @@ -571,7 +558,9 @@ def _ramp_simultaneously(self) -> None: """ for worker in self.submodules.values(): if not isinstance(worker, OxfordMercuryWorkerPS): - raise RuntimeError(f"Expected a MercuryWorkerPS but got {type(worker)}") + raise RuntimeError( + f"Expected an OxfordMercuryWorkerPS but got {type(worker)}" + ) worker.ramp_to_target() def _ramp_simultaneously_blocking(self) -> None: @@ -584,7 +573,9 @@ def _ramp_simultaneously_blocking(self) -> None: for worker in self.submodules.values(): if not isinstance(worker, OxfordMercuryWorkerPS): - raise RuntimeError(f"Expected a MercuryWorkerPS but got {type(worker)}") + raise RuntimeError( + f"Expected an OxfordMercuryWorkerPS but got {type(worker)}" + ) # wait for the ramp to finish, we don't care about the order while worker.ramp_status() == "TO SET": time.sleep(0.1) @@ -684,7 +675,9 @@ def ramp(self, mode: str = "safe") -> None: for cur, worker in zip(meas_vals, self.submodules.values()): if not isinstance(worker, OxfordMercuryWorkerPS): - raise RuntimeError(f"Expected a MercuryWorkerPS but got {type(worker)}") + raise RuntimeError( + f"Expected an OxfordMercuryWorkerPS but got {type(worker)}" + ) if worker.field_target() != cur: if worker.field_ramp_rate() == 0: raise ValueError(f"Can not ramp {worker}; ramp rate set to zero!") @@ -732,14 +725,3 @@ def ask(self, cmd: str) -> str: base_resp = resp.replace(f"STAT:{base_cmd}", "") return base_resp - - -@deprecated( - "MercuryiPS is deprecated. Please use qcodes.instrument_drivers.oxford.OxfordMercuryiPS instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class MercuryiPS(OxfordMercuryiPS): - """Alias for backwards compatibility""" - - pass diff --git a/src/qcodes/instrument_drivers/oxford/triton.py b/src/qcodes/instrument_drivers/oxford/triton.py index aadccc3f95ea..643045e3d0d2 100644 --- a/src/qcodes/instrument_drivers/oxford/triton.py +++ b/src/qcodes/instrument_drivers/oxford/triton.py @@ -5,10 +5,7 @@ from time import sleep from typing import TYPE_CHECKING -from typing_extensions import deprecated - from qcodes.instrument import InstrumentBaseKWArgs, IPInstrument -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from qcodes.validators import Enum, Ints, Numbers if TYPE_CHECKING: @@ -606,14 +603,3 @@ def _get_parser_state(self, key: str, msg: str) -> str | None: if "NOT_FOUND" in msg: return None return msg.rsplit(f"{key}:", maxsplit=1)[-1] - - -@deprecated( - "Triton is deprecated. Please use qcodes.instrument_drivers.oxford.OxfordTriton instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Triton(OxfordTriton): - """Alias for backwards compatibility""" - - pass From d2886428955f8190ea21ae7bd6bc50d124a53c00 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:37:40 +0200 Subject: [PATCH 13/24] Remove deprecated Tektronix driver aliases Remove the following deprecated class aliases that were deprecated in 0.57.0: - AWG5208 (use TektronixAWG5208) - AWG70002A (use TektronixAWG70002A) - AWGChannel (use Tektronix70000AWGChannel) - Tektronix_AWG5014 (use TektronixAWG5014) - ModeError (use TektronixDPOModeError) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100015.breaking | 1 + .../instrument_drivers/tektronix/AWG5014.py | 13 ------------- .../instrument_drivers/tektronix/AWG5208.py | 17 ----------------- .../instrument_drivers/tektronix/AWG70000A.py | 15 --------------- .../instrument_drivers/tektronix/AWG70002A.py | 17 ----------------- .../instrument_drivers/tektronix/DPO7200xx.py | 15 --------------- 6 files changed, 1 insertion(+), 77 deletions(-) create mode 100644 docs/changes/newsfragments/100015.breaking diff --git a/docs/changes/newsfragments/100015.breaking b/docs/changes/newsfragments/100015.breaking new file mode 100644 index 000000000000..5c4b189e7b5b --- /dev/null +++ b/docs/changes/newsfragments/100015.breaking @@ -0,0 +1 @@ +Removed deprecated Tektronix driver aliases ``AWG5208``, ``AWG70002A``, ``AWGChannel``, ``Tektronix_AWG5014``, and ``ModeError``. Use the corresponding ``Tektronix*`` class names instead. diff --git a/src/qcodes/instrument_drivers/tektronix/AWG5014.py b/src/qcodes/instrument_drivers/tektronix/AWG5014.py index 117ddcda7197..ef6f8b0c36af 100644 --- a/src/qcodes/instrument_drivers/tektronix/AWG5014.py +++ b/src/qcodes/instrument_drivers/tektronix/AWG5014.py @@ -20,7 +20,6 @@ import numpy as np import numpy.typing as npt from pyvisa.errors import VisaIOError -from typing_extensions import deprecated from qcodes import validators as vals from qcodes.instrument import ( @@ -1969,15 +1968,3 @@ def clear_message_queue(self, verbose: bool = False) -> None: gotexception = True self.visa_handle.timeout = original_timeout - -@deprecated( - "Tektronix_AWG5014 is deprecated. Please use qcodes.instrument_drivers.tektronix.TektronixAWG5014 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Tektronix_AWG5014(TektronixAWG5014): - """ - Alias with non-conformant name left for backwards compatibility - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/AWG5208.py b/src/qcodes/instrument_drivers/tektronix/AWG5208.py index 159106c9aad9..e8213d1dd87a 100644 --- a/src/qcodes/instrument_drivers/tektronix/AWG5208.py +++ b/src/qcodes/instrument_drivers/tektronix/AWG5208.py @@ -1,9 +1,5 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .AWG70000A import TektronixAWG70000Base if TYPE_CHECKING: @@ -34,16 +30,3 @@ def __init__( """ super().__init__(name, address, num_channels=8, **kwargs) - - -@deprecated( - "AWG5208 is deprecated. Please use qcodes.instrument_drivers.tektronix.TektronixAWG5208 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class AWG5208(TektronixAWG5208): - """ - Alias with non-conformant name left for backwards compatibility - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/AWG70000A.py b/src/qcodes/instrument_drivers/tektronix/AWG70000A.py index 9075090191a3..7384b163fa36 100644 --- a/src/qcodes/instrument_drivers/tektronix/AWG70000A.py +++ b/src/qcodes/instrument_drivers/tektronix/AWG70000A.py @@ -13,7 +13,6 @@ import numpy as np import numpy.typing as npt from broadbean.sequence import InvalidForgedSequenceError, fs_schema -from typing_extensions import deprecated from qcodes import validators as vals from qcodes.instrument import ( @@ -24,7 +23,6 @@ VisaInstrumentKWArgs, ) from qcodes.parameters import create_on_off_val_mapping -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from collections.abc import Mapping, Sequence @@ -477,19 +475,6 @@ def clear_asset(self) -> None: self.parent.write(f"SOURce{self.channel}:CASSet:CLEAR") -@deprecated( - "AWGChannel is deprecated. Please use qcodes.instrument_drivers.tektronix.Tektronix70000AWGChannel instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class AWGChannel(Tektronix70000AWGChannel): - """ - Alias for Tektronix70000AWGChannel for backwards compatibility. - """ - - pass - - class TektronixAWG70000Base(VisaInstrument): """ Base class for QCoDeS drivers for Tektronix AWG70000 series AWG's. diff --git a/src/qcodes/instrument_drivers/tektronix/AWG70002A.py b/src/qcodes/instrument_drivers/tektronix/AWG70002A.py index d443a675423a..1d0082b69158 100644 --- a/src/qcodes/instrument_drivers/tektronix/AWG70002A.py +++ b/src/qcodes/instrument_drivers/tektronix/AWG70002A.py @@ -1,9 +1,5 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .AWG70000A import TektronixAWG70000Base if TYPE_CHECKING: @@ -37,16 +33,3 @@ def __init__( """ super().__init__(name, address, num_channels=2, **kwargs) - - -@deprecated( - "AWG70002A is deprecated. Please use qcodes.instrument_drivers.tektronix.TektronixAWG70002A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class AWG70002A(TektronixAWG70002A): - """ - Alias with non-conformant name left for backwards compatibility - """ - - pass diff --git a/src/qcodes/instrument_drivers/tektronix/DPO7200xx.py b/src/qcodes/instrument_drivers/tektronix/DPO7200xx.py index 4dfd9ae614cd..41e5a5bbdc45 100644 --- a/src/qcodes/instrument_drivers/tektronix/DPO7200xx.py +++ b/src/qcodes/instrument_drivers/tektronix/DPO7200xx.py @@ -11,7 +11,6 @@ import numpy as np import numpy.typing as npt -from typing_extensions import deprecated from qcodes.instrument import ( ChannelList, @@ -28,7 +27,6 @@ create_on_off_val_mapping, ) from qcodes.parameters.parameter_base import ParameterDataTypeVar -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from qcodes.validators import Arrays, Enum, Numbers if TYPE_CHECKING: @@ -53,19 +51,6 @@ class TektronixDPOModeError(Exception): pass -@deprecated( - "ModeError is deprecated. Please use qcodes.instrument_drivers.tektronix.TektronixDPOModeError instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class ModeError(TektronixDPOModeError): - """ - Alias for backwards compatibility - """ - - pass - - class TektronixDPO7000xx(VisaInstrument): """ QCoDeS driver for the MSO/DPO5000/B, DPO7000/C, From c24be2b090edb05409a7a48c4e364a9f8ed08a38 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:38:45 +0200 Subject: [PATCH 14/24] Remove deprecated Weinschel driver alias Remove Weinschel_8320 (use Weinschel8320), deprecated in 0.57.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100016.breaking | 1 + .../instrument_drivers/weinschel/Weinschel_8320.py | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) create mode 100644 docs/changes/newsfragments/100016.breaking diff --git a/docs/changes/newsfragments/100016.breaking b/docs/changes/newsfragments/100016.breaking new file mode 100644 index 000000000000..c54e70e6ae85 --- /dev/null +++ b/docs/changes/newsfragments/100016.breaking @@ -0,0 +1 @@ +Removed the deprecated ``Weinschel_8320`` alias for the Weinschel 8320 driver. Use ``Weinschel8320`` instead. diff --git a/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py b/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py index f06b8e1c2c57..b46f52c8bda4 100644 --- a/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py +++ b/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py @@ -1,12 +1,10 @@ from typing import TYPE_CHECKING import numpy as np -from typing_extensions import deprecated from qcodes import validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs from qcodes.parameters import Parameter -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing import Unpack @@ -37,14 +35,3 @@ def __init__( """Control the attenuation""" self.connect_message() - - -@deprecated( - "Weinschel_8320 is deprecated. Please use qcodes.instrument_drivers.Weinschel.Weinschel8320 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Weinschel_8320(Weinschel8320): - """ - Alias for Weinschel8320 will eventually be deprecated and removed. - """ From 8a716f9c0504c87cbaa47cb75f14d5c44ac5f236 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:39:40 +0200 Subject: [PATCH 15/24] Remove deprecated Yokogawa driver aliases Remove the following deprecated class aliases that were deprecated in 0.57.0: - GS200Exception (use YokogawaGS200Exception) - GS200_Monitor (use YokogawaGS200Monitor) - GS200Program (use YokogawaGS200Program) - GS200 (use YokogawaGS200) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100017.breaking | 1 + .../instrument_drivers/yokogawa/GS200.py | 807 ------------------ 2 files changed, 1 insertion(+), 807 deletions(-) create mode 100644 docs/changes/newsfragments/100017.breaking delete mode 100644 src/qcodes/instrument_drivers/yokogawa/GS200.py diff --git a/docs/changes/newsfragments/100017.breaking b/docs/changes/newsfragments/100017.breaking new file mode 100644 index 000000000000..c5d7e025b488 --- /dev/null +++ b/docs/changes/newsfragments/100017.breaking @@ -0,0 +1 @@ +Removed deprecated Yokogawa GS200 aliases ``GS200Exception``, ``GS200_Monitor``, ``GS200Program``, and ``GS200``. Use the corresponding ``YokogawaGS200*`` names instead. diff --git a/src/qcodes/instrument_drivers/yokogawa/GS200.py b/src/qcodes/instrument_drivers/yokogawa/GS200.py deleted file mode 100644 index 1fcc3731d5ca..000000000000 --- a/src/qcodes/instrument_drivers/yokogawa/GS200.py +++ /dev/null @@ -1,807 +0,0 @@ -""" -Old version of Yokogawa driver for backwards compatibility. -Will be deprecated and eventually removed. -""" - -from functools import partial -from typing import TYPE_CHECKING, Literal, cast - -from typing_extensions import deprecated - -from qcodes.instrument import ( - InstrumentBaseKWArgs, - InstrumentChannel, - VisaInstrument, - VisaInstrumentKWArgs, -) -from qcodes.parameters import DelegateParameter -from qcodes.utils.deprecate import QCoDeSDeprecationWarning -from qcodes.validators import Bool, Enum, Ints, Numbers - -if TYPE_CHECKING: - from typing import Unpack - - from qcodes.parameters import Parameter - -ModeType = Literal["CURR", "VOLT"] - - -def float_round(val: float) -> int: - """ - Rounds a floating number - - Args: - val: number to be rounded - - Returns: - Rounded integer - - """ - return round(float(val)) - - -@deprecated( - "GS200Exception is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200Exception instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class GS200Exception(Exception): - pass - - -@deprecated( - "GS200_Monitor is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200Monitor instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class GS200_Monitor(InstrumentChannel): - """ - Monitor part of the GS200. This is only enabled if it is - installed in the GS200 (it is an optional extra). - - The units will be automatically updated as required. - - To measure: - `GS200.measure.measure()` - - Args: - parent (GS200) - name: instrument name - present - - """ - - def __init__( - self, - parent: "GS200", # pyright: ignore[reportDeprecated] - name: str, - present: bool, - **kwargs: "Unpack[InstrumentBaseKWArgs]", - ) -> None: - super().__init__(parent, name, **kwargs) - - self.present = present - - # Start off with all disabled - self._enabled = False - self._output = False - - # Set up mode cache. These will be filled in once the parent - # is fully initialized. - self._range: None | float = None - self._unit: None | str = None - - # Set up monitoring parameters - if present: - self.enabled: Parameter = self.add_parameter( - "enabled", - label="Measurement Enabled", - get_cmd=self.state, - set_cmd=lambda x: self.on() if x else self.off(), - val_mapping={ - "off": 0, - "on": 1, - }, - ) - """Parameter enabled""" - - # Note: Measurement will only run if source and - # measurement is enabled. - self.measure: Parameter = self.add_parameter( - "measure", - label="", - unit="V/I", - get_cmd=self._get_measurement, - snapshot_get=False, - ) - """Parameter measure""" - - self.NPLC: Parameter = self.add_parameter( - "NPLC", - label="NPLC", - unit="1/LineFreq", - vals=Ints(1, 25), - set_cmd=":SENS:NPLC {}", - set_parser=int, - get_cmd=":SENS:NPLC?", - get_parser=float_round, - ) - """Parameter NPLC""" - self.delay: Parameter = self.add_parameter( - "delay", - label="Measurement Delay", - unit="ms", - vals=Ints(0, 999999), - set_cmd=":SENS:DEL {}", - set_parser=int, - get_cmd=":SENS:DEL?", - get_parser=float_round, - ) - """Parameter delay""" - self.trigger: Parameter = self.add_parameter( - "trigger", - label="Trigger Source", - set_cmd=":SENS:TRIG {}", - get_cmd=":SENS:TRIG?", - val_mapping={ - "READY": "READ", - "READ": "READ", - "TIMER": "TIM", - "TIM": "TIM", - "COMMUNICATE": "COMM", - "IMMEDIATE": "IMM", - "IMM": "IMM", - }, - ) - """Parameter trigger""" - self.interval: Parameter = self.add_parameter( - "interval", - label="Measurement Interval", - unit="s", - vals=Numbers(0.1, 3600), - set_cmd=":SENS:INT {}", - set_parser=float, - get_cmd=":SENS:INT?", - get_parser=float, - ) - """Parameter interval""" - - def off(self) -> None: - """Turn measurement off""" - self.write(":SENS 0") - self._enabled = False - - def on(self) -> None: - """Turn measurement on""" - self.write(":SENS 1") - self._enabled = True - - def state(self) -> int: - """Check measurement state""" - state = int(self.ask(":SENS?")) - self._enabled = bool(state) - return state - - def _get_measurement(self) -> float: - if self._unit is None or self._range is None: - raise GS200Exception("Measurement module not initialized.") # pyright: ignore[reportDeprecated] - if self._parent.auto_range.get() or (self._unit == "VOLT" and self._range < 1): - # Measurements will not work with autorange, or when - # range is <1V. - self._enabled = False - raise GS200Exception( # pyright: ignore[reportDeprecated] - "Measurements will not work when range is <1V" - "or when in auto range mode." - ) - if not self._output: - raise GS200Exception("Output is off.") # pyright: ignore[reportDeprecated] - if not self._enabled: - raise GS200Exception("Measurements are disabled.") # pyright: ignore[reportDeprecated] - # If enabled and output is on, then we can perform a measurement. - return float(self.ask(":MEAS?")) - - def update_measurement_enabled( - self, unit: ModeType, output_range: float | None - ) -> None: - """ - Args: - unit: Unit to update either VOLT or CURR. - output_range: new range. - - """ - # Recheck measurement state next time we do a measurement - self._enabled = False - - # Update units - self._range = output_range - self._unit = unit - if self._unit == "VOLT": - self.measure.label = "Source Current" - self.measure.unit = "I" - else: - self.measure.label = "Source Voltage" - self.measure.unit = "V" - - -@deprecated( - "GS200Program is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200Program instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class GS200Program(InstrumentChannel): - """ - InstrumentModule that holds a Program for the YokoGawa GS200 - - """ - - def __init__( - self, - parent: "GS200", # pyright: ignore[reportDeprecated] - name: str, - **kwargs: "Unpack[InstrumentBaseKWArgs]", - ) -> None: - super().__init__(parent, name, **kwargs) - self._repeat = 1 - self._file_name = None - - self.interval: Parameter = self.add_parameter( - "interval", - label="the program interval time", - unit="s", - vals=Numbers(0.1, 3600.0), - get_cmd=":PROG:INT?", - set_cmd=":PROG:INT {}", - ) - """Parameter interval""" - - self.slope: Parameter = self.add_parameter( - "slope", - label="the program slope time", - unit="s", - vals=Numbers(0.1, 3600.0), - get_cmd=":PROG:SLOP?", - set_cmd=":PROG:SLOP {}", - ) - """Parameter slope""" - - self.trigger: Parameter = self.add_parameter( - "trigger", - label="the program trigger", - get_cmd=":PROG:TRIG?", - set_cmd=":PROG:TRIG {}", - vals=Enum("normal", "mend"), - ) - """Parameter trigger""" - - self.save: Parameter = self.add_parameter( - "save", - set_cmd=":PROG:SAVE '{}'", - docstring="save the program to the system memory (.csv file)", - ) - """save the program to the system memory (.csv file)""" - - self.load: Parameter = self.add_parameter( - "load", - get_cmd=":PROG:LOAD?", - set_cmd=":PROG:LOAD '{}'", - docstring="load the program (.csv file) from the system memory", - ) - """load the program (.csv file) from the system memory""" - - self.repeat: Parameter = self.add_parameter( - "repeat", - label="program execution repetition", - get_cmd=":PROG:REP?", - set_cmd=":PROG:REP {}", - val_mapping={"OFF": 0, "ON": 1}, - ) - """Parameter repeat""" - self.count: Parameter = self.add_parameter( - "count", - label="step of the current program", - get_cmd=":PROG:COUN?", - set_cmd=":PROG:COUN {}", - vals=Ints(1, 10000), - ) - """Parameter count""" - - self.add_function( - "start", call_cmd=":PROG:EDIT:STAR", docstring="start program editing" - ) - self.add_function( - "end", call_cmd=":PROG:EDIT:END", docstring="end program editing" - ) - self.add_function( - "run", - call_cmd=":PROG:RUN", - docstring="run the program", - ) - - -@deprecated( - "GS200 is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class GS200(VisaInstrument): - """ - This is the QCoDeS driver for the Yokogawa GS200 voltage and current source. - - Args: - name: What this instrument is called locally. - address: The GPIB or USB address of this instrument - kwargs: kwargs to be passed to VisaInstrument class - - """ - - default_terminator = "\n" - - def __init__( - self, - name: str, - address: str, - **kwargs: "Unpack[VisaInstrumentKWArgs]", - ) -> None: - super().__init__(name, address, **kwargs) - - self.output: Parameter = self.add_parameter( - "output", - label="Output State", - get_cmd=self.state, - set_cmd=lambda x: self.on() if x else self.off(), - val_mapping={ - "off": 0, - "on": 1, - }, - ) - """Parameter output""" - - self.source_mode: Parameter = self.add_parameter( - "source_mode", - label="Source Mode", - get_cmd=":SOUR:FUNC?", - set_cmd=self._set_source_mode, - vals=Enum("VOLT", "CURR"), - ) - """Parameter source_mode""" - - # We need to get the source_mode value here as we cannot rely on the - # default value that may have been changed before we connect to the - # instrument (in a previous session or via the frontpanel). - self.source_mode() - - self.voltage_range: Parameter = self.add_parameter( - "voltage_range", - label="Voltage Source Range", - unit="V", - get_cmd=partial(self._get_range, "VOLT"), - set_cmd=partial(self._set_range, "VOLT"), - vals=Enum(10e-3, 100e-3, 1e0, 10e0, 30e0), - snapshot_exclude=self.source_mode() == "CURR", - ) - """Parameter voltage_range""" - - self.current_range: Parameter = self.add_parameter( - "current_range", - label="Current Source Range", - unit="I", - get_cmd=partial(self._get_range, "CURR"), - set_cmd=partial(self._set_range, "CURR"), - vals=Enum(1e-3, 10e-3, 100e-3, 200e-3), - snapshot_exclude=self.source_mode() == "VOLT", - ) - """Parameter current_range""" - - self.range: DelegateParameter = self.add_parameter( - "range", parameter_class=DelegateParameter, source=None - ) - """Parameter range""" - - # The instrument does not support auto range. The parameter - # auto_range is introduced to add this capability with - # setting the initial state at False mode. - self.auto_range: Parameter = self.add_parameter( - "auto_range", - label="Auto Range", - set_cmd=self._set_auto_range, - get_cmd=None, - initial_cache_value=False, - vals=Bool(), - ) - """Parameter auto_range""" - - self.voltage: Parameter = self.add_parameter( - "voltage", - label="Voltage", - unit="V", - set_cmd=partial(self._get_set_output, "VOLT"), - get_cmd=partial(self._get_set_output, "VOLT"), - snapshot_exclude=self.source_mode() == "CURR", - ) - """Parameter voltage""" - - self.current: Parameter = self.add_parameter( - "current", - label="Current", - unit="I", - set_cmd=partial(self._get_set_output, "CURR"), - get_cmd=partial(self._get_set_output, "CURR"), - snapshot_exclude=self.source_mode() == "VOLT", - ) - """Parameter current""" - - self.output_level: DelegateParameter = self.add_parameter( - "output_level", parameter_class=DelegateParameter, source=None - ) - """Parameter output_level""" - - # We need to pass the source parameter for delegate parameters - # (range and output_level) here according to the present - # source_mode. - if self.source_mode() == "VOLT": - self.range.source = self.voltage_range - self.output_level.source = self.voltage - else: - self.range.source = self.current_range - self.output_level.source = self.current - - self.voltage_limit: Parameter = self.add_parameter( - "voltage_limit", - label="Voltage Protection Limit", - unit="V", - vals=Ints(1, 30), - get_cmd=":SOUR:PROT:VOLT?", - set_cmd=":SOUR:PROT:VOLT {}", - get_parser=float_round, - set_parser=int, - ) - """Parameter voltage_limit""" - - self.current_limit: Parameter = self.add_parameter( - "current_limit", - label="Current Protection Limit", - unit="I", - vals=Numbers(1e-3, 200e-3), - get_cmd=":SOUR:PROT:CURR?", - set_cmd=":SOUR:PROT:CURR {:.3f}", - get_parser=float, - set_parser=float, - ) - """Parameter current_limit""" - - self.four_wire: Parameter = self.add_parameter( - "four_wire", - label="Four Wire Sensing", - get_cmd=":SENS:REM?", - set_cmd=":SENS:REM {}", - val_mapping={ - "off": 0, - "on": 1, - }, - ) - """Parameter four_wire""" - - # Note: The guard feature can be used to remove common mode noise. - # Read the manual to see if you would like to use it - self.guard: Parameter = self.add_parameter( - "guard", - label="Guard Terminal", - get_cmd=":SENS:GUAR?", - set_cmd=":SENS:GUAR {}", - val_mapping={"off": 0, "on": 1}, - ) - """Parameter guard""" - - # Return measured line frequency - self.line_freq: Parameter = self.add_parameter( - "line_freq", - label="Line Frequency", - unit="Hz", - get_cmd="SYST:LFR?", - get_parser=int, - ) - """Parameter line_freq""" - - # Check if monitor is present, and if so enable measurement - monitor_present = "/MON" in self.ask("*OPT?") - self.measure: GS200_Monitor = self.add_submodule( # pyright: ignore[reportDeprecated] - "measure", - GS200_Monitor(self, "measure", monitor_present), # pyright: ignore[reportDeprecated] - ) - """Instrument module measure""" - - # Reset function - self.add_function("reset", call_cmd="*RST") - - self.program: GS200Program = self.add_submodule( # pyright: ignore[reportDeprecated] - "program", - GS200Program(self, "program"), # pyright: ignore[reportDeprecated] - ) - """Instrument module program""" - - self.BNC_out: Parameter = self.add_parameter( - "BNC_out", - label="BNC trigger out", - get_cmd=":ROUT:BNCO?", - set_cmd=":ROUT:BNCO {}", - vals=Enum("trigger", "output", "ready"), - docstring="Sets or queries the output BNC signal", - ) - """Sets or queries the output BNC signal""" - - self.BNC_in: Parameter = self.add_parameter( - "BNC_in", - label="BNC trigger in", - get_cmd=":ROUT:BNCI?", - set_cmd=":ROUT:BNCI {}", - vals=Enum("trigger", "output"), - docstring="Sets or queries the input BNC signal", - ) - """Sets or queries the input BNC signal""" - - self.system_errors: Parameter = self.add_parameter( - "system_errors", - get_cmd=":SYSTem:ERRor?", - docstring="returns the oldest unread error message from the event " - "log and removes it from the log.", - ) - """returns the oldest unread error message from the event log and removes it from the log.""" - - self.connect_message() - - def on(self) -> None: - """Turn output on""" - self.write("OUTPUT 1") - self.measure._output = True - - def off(self) -> None: - """Turn output off""" - self.write("OUTPUT 0") - self.measure._output = False - - def state(self) -> int: - """Check state""" - state = int(self.ask("OUTPUT?")) - self.measure._output = bool(state) - return state - - def ramp_voltage(self, ramp_to: float, step: float, delay: float) -> None: - """ - Ramp the voltage from the current level to the specified output. - - Args: - ramp_to: The ramp target in Volt - step: The ramp steps in Volt - delay: The time between finishing one step and - starting another in seconds. - - """ - self._assert_mode("VOLT") - self._ramp_source(ramp_to, step, delay) - - def ramp_current(self, ramp_to: float, step: float, delay: float) -> None: - """ - Ramp the current from the current level to the specified output. - - Args: - ramp_to: The ramp target in Ampere - step: The ramp steps in Ampere - delay: The time between finishing one step and starting - another in seconds. - - """ - self._assert_mode("CURR") - self._ramp_source(ramp_to, step, delay) - - def _ramp_source(self, ramp_to: float, step: float, delay: float) -> None: - """ - Ramp the output from the current level to the specified output - - Args: - ramp_to: The ramp target in volts/amps - step: The ramp steps in volts/ampere - delay: The time between finishing one step and - starting another in seconds. - - """ - saved_step = self.output_level.step - saved_inter_delay = self.output_level.inter_delay - - self.output_level.step = step - self.output_level.inter_delay = delay - self.output_level(ramp_to) - - self.output_level.step = saved_step - self.output_level.inter_delay = saved_inter_delay - - def _get_set_output( - self, mode: ModeType, output_level: float | None = None - ) -> float | None: - """ - Get or set the output level. - - Args: - mode: "CURR" or "VOLT" - output_level: If missing, we assume that we are getting the - current level. Else we are setting it - - """ - self._assert_mode(mode) - if output_level is not None: - self._set_output(output_level) - return None - return float(self.ask(":SOUR:LEV?")) - - def _set_output(self, output_level: float) -> None: - """ - Set the output of the instrument. - - Args: - output_level: output level in Volt or Ampere, depending - on the current mode. - - """ - auto_enabled = self.auto_range() - - if not auto_enabled: - self_range = self.range() - if self_range is None: - raise RuntimeError( - "Trying to set output but not in auto mode and range is unknown." - ) - else: - mode = self.source_mode.get_latest() - if mode == "CURR": - self_range = 200e-3 - else: - self_range = 30.0 - - # Check we are not trying to set an out of range value - if self.range() is None or abs(output_level) > abs(self_range): - # Check that the range hasn't changed - if not auto_enabled: - self_range = self.range.get_latest() - if self_range is None: - raise RuntimeError( - "Trying to set output but not in" - " auto mode and range is unknown." - ) - # If we are still out of range, raise a value error - if abs(output_level) > abs(self_range): - raise ValueError( - "Desired output level not in range" - f" [-{self_range:.3}, {self_range:.3}]" - ) - - if auto_enabled: - auto_str = ":AUTO" - else: - auto_str = "" - cmd_str = f":SOUR:LEV{auto_str} {output_level:.5e}" - self.write(cmd_str) - - def _update_measurement_module( - self, - source_mode: ModeType | None = None, - source_range: float | None = None, - ) -> None: - """ - Update validators/units as source mode/range changes. - - Args: - source_mode: "CURR" or "VOLT" - source_range: New range. - - """ - if not self.measure.present: - return - - if source_mode is None: - source_mode = cast("ModeType", self.source_mode.get_latest()) - # Get source range if auto-range is off - if source_range is None and not self.auto_range(): - source_range = self.range() - - self.measure.update_measurement_enabled(source_mode, source_range) - - def _set_auto_range(self, val: bool) -> None: - """ - Enable/disable auto range. - - Args: - val: auto range on or off - - """ - self._auto_range = val - # Disable measurement if auto range is on - if self.measure.present: - # Disable the measurement module if auto range is enabled, - # because the measurement does not work in the - # 10mV/100mV ranges. - self.measure._enabled &= not val - - def _assert_mode(self, mode: ModeType) -> None: - """ - Assert that we are in the correct mode to perform an operation. - - Args: - mode: "CURR" or "VOLT" - - """ - if self.source_mode.get_latest() != mode: - raise ValueError( - f"Cannot get/set {mode} settings while in {self.source_mode.get_latest()} mode" - ) - - def _set_source_mode(self, mode: ModeType) -> None: - """ - Set output mode and change delegate parameters' source accordingly. - Also, exclude/include the parameters from snapshot depending on the - mode. The instrument does not support 'current', 'current_range' - parameters in "VOLT" mode and 'voltage', 'voltage_range' parameters - in "CURR" mode. - - Args: - mode: "CURR" or "VOLT" - - """ - if self.output() == "on": - raise GS200Exception("Cannot switch mode while source is on") # pyright: ignore[reportDeprecated] - - if mode == "VOLT": - self.range.source = self.voltage_range - self.output_level.source = self.voltage - self.voltage_range.snapshot_exclude = False - self.voltage.snapshot_exclude = False - self.current_range.snapshot_exclude = True - self.current.snapshot_exclude = True - else: - self.range.source = self.current_range - self.output_level.source = self.current - self.voltage_range.snapshot_exclude = True - self.voltage.snapshot_exclude = True - self.current_range.snapshot_exclude = False - self.current.snapshot_exclude = False - - self.write(f"SOUR:FUNC {mode}") - # We set the cache here since `_update_measurement_module` - # needs the current value which would otherwise only be set - # after this method exits - self.source_mode.cache.set(mode) - # Update the measurement mode - self._update_measurement_module(source_mode=mode) - - def _set_range(self, mode: ModeType, output_range: float) -> None: - """ - Update range - - Args: - mode: "CURR" or "VOLT" - output_range: Range to set. For voltage, we have the ranges [10e-3, - 100e-3, 1e0, 10e0, 30e0]. For current, we have the ranges [1e-3, - 10e-3, 100e-3, 200e-3]. If auto_range = False, then setting the - output can only happen if the set value is smaller than the - present range. - - """ - self._assert_mode(mode) - output_range = float(output_range) - self._update_measurement_module(source_mode=mode, source_range=output_range) - self.write(f":SOUR:RANG {output_range}") - - def _get_range(self, mode: ModeType) -> float: - """ - Query the present range. - - Args: - mode: "CURR" or "VOLT" - - Returns: - range: For voltage, we have the ranges [10e-3, 100e-3, 1e0, 10e0, - 30e0]. For current, we have the ranges [1e-3, 10e-3, 100e-3, - 200e-3]. If auto_range = False, then setting the output can only - happen if the set value is smaller than the present range. - - """ - self._assert_mode(mode) - return float(self.ask(":SOUR:RANG?")) From e98bebb9c347039eff5f9a7012a96158f10d9799 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:42:25 +0200 Subject: [PATCH 16/24] Remove deprecated Keysight driver aliases Remove the following deprecated class aliases that were deprecated in 0.57.0: - B2962A, MeasurementPair, E4980AMeasurements, Correction4980A - BoundMeasurement, UnboundMeasurement, InfiniiumFunction, InfiniiumChannel, Infiniium - N5173B, N5183B, N5222B, N5230C, N5245A, N6705BChannel, N6705B - N9030B, P9374A, KtM960x, KtMAWGChannel, KtMAwg - B1511B, IVSweeper, B1517A, CVSweeper, B1520A - CVSweepMeasurement, Correction, FrequencyList, B1530A Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100013.breaking | 1 + pyproject.toml | 1 - .../instrument_drivers/Keysight/Infiniium.py | 67 ------------------- .../Keysight/Keysight_B2962A.py | 14 ---- .../Keysight/Keysight_N5173B.py | 14 ---- .../Keysight/Keysight_N5183B.py | 15 ----- .../Keysight/Keysight_N6705B.py | 25 ------- .../instrument_drivers/Keysight/KtM960x.py | 14 ---- .../instrument_drivers/Keysight/KtMAwg.py | 26 ------- .../instrument_drivers/Keysight/N5222B.py | 16 +---- .../instrument_drivers/Keysight/N5230C.py | 15 +---- .../instrument_drivers/Keysight/N5245A.py | 15 +---- .../instrument_drivers/Keysight/N9030B.py | 23 +++---- .../instrument_drivers/Keysight/P9374A.py | 15 +---- .../Keysight/keysight_e4980a.py | 35 ---------- .../Keysight/keysightb1500/KeysightB1511B.py | 17 ----- .../Keysight/keysightb1500/KeysightB1517A.py | 29 +------- .../Keysight/keysightb1500/KeysightB1520A.py | 67 ------------------- .../Keysight/keysightb1500/KeysightB1530A.py | 17 ----- 19 files changed, 15 insertions(+), 411 deletions(-) create mode 100644 docs/changes/newsfragments/100013.breaking diff --git a/docs/changes/newsfragments/100013.breaking b/docs/changes/newsfragments/100013.breaking new file mode 100644 index 000000000000..a8d4174327ac --- /dev/null +++ b/docs/changes/newsfragments/100013.breaking @@ -0,0 +1 @@ +Removed deprecated Keysight driver alias classes that were deprecated in QCoDeS 0.57.0. diff --git a/pyproject.toml b/pyproject.toml index 0a57e13af835..14b68fd58232 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -281,7 +281,6 @@ known-first-party = ["qcodes"] "src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py" = ["F401"] "src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py" = ["F401"] "src/qcodes/instrument_drivers/devices.py" = ["F401"] -"src/qcodes/instrument_drivers/Keysight/N9030B.py" = ["F401"] # TID253 these imports are fine at module level # in tests and examples diff --git a/src/qcodes/instrument_drivers/Keysight/Infiniium.py b/src/qcodes/instrument_drivers/Keysight/Infiniium.py index aa082e582f77..8788ee0da8b8 100644 --- a/src/qcodes/instrument_drivers/Keysight/Infiniium.py +++ b/src/qcodes/instrument_drivers/Keysight/Infiniium.py @@ -9,7 +9,6 @@ import numpy.typing as npt from pyvisa import VisaIOError from pyvisa.constants import StatusCode -from typing_extensions import deprecated import qcodes.validators as vals from qcodes.instrument import ( @@ -28,7 +27,6 @@ ParameterWithSetpoints, create_on_off_val_mapping, ) -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from collections.abc import Sequence @@ -489,19 +487,6 @@ def __init__( super().__init__(parent, name, channel=parent.channel_name, **kwargs) -@deprecated( - "BoundMeasurement is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightInfiniiumBoundMeasurement instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class BoundMeasurement(KeysightInfiniiumBoundMeasurement): - """ - Alias for backwards compatibility - """ - - pass - - class KeysightInfiniiumUnboundMeasurement(AbstractMeasurementSubsystem): def __init__( self, @@ -579,19 +564,6 @@ def _get_source(self) -> str: return self._channel -@deprecated( - "UnboundMeasurement is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightInfiniiumUnboundMeasurement instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class UnboundMeasurement(KeysightInfiniiumUnboundMeasurement): - """ - Alias for backwards compatibility - """ - - pass - - class KeysightInfiniiumFunction(InstrumentChannel): def __init__( self, @@ -708,19 +680,6 @@ def _get_func(self) -> str: self.write(":SYST:HEAD OFF") -@deprecated( - "InfiniiumFunction is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightInfiniiumFunction instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class InfiniiumFunction(KeysightInfiniiumFunction): - """ - Alias for backwards compatibility - """ - - pass - - class KeysightInfiniiumChannel(InstrumentChannel["KeysightInfiniium"]): def __init__( self, @@ -840,19 +799,6 @@ def update_setpoints(self) -> None: self.trace.update_setpoints() -@deprecated( - "InfiniiumChannel is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightInfiniiumChannel instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class InfiniiumChannel(KeysightInfiniiumChannel): - """ - Alias for backwards compatibility - """ - - pass - - class KeysightInfiniium(VisaInstrument): """ This is the QCoDeS driver for the Keysight Infiniium oscilloscopes @@ -1339,16 +1285,3 @@ def screenshot( except Exception as e: self.log.error(f"Failed to save screenshot, Error occurred: \n{e}") return None - - -@deprecated( - "Infiniium is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightInfiniium instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Infiniium(KeysightInfiniium): - """ - Alias for backwards compatibility - """ - - pass diff --git a/src/qcodes/instrument_drivers/Keysight/Keysight_B2962A.py b/src/qcodes/instrument_drivers/Keysight/Keysight_B2962A.py index d98016e164ac..6a776b2b3b91 100644 --- a/src/qcodes/instrument_drivers/Keysight/Keysight_B2962A.py +++ b/src/qcodes/instrument_drivers/Keysight/Keysight_B2962A.py @@ -1,7 +1,5 @@ from typing import TYPE_CHECKING, Self -from typing_extensions import deprecated - from qcodes.instrument import ( Instrument, InstrumentBaseKWArgs, @@ -10,7 +8,6 @@ VisaInstrumentKWArgs, ) from qcodes.parameters import create_on_off_val_mapping -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing import Unpack @@ -181,14 +178,3 @@ def get_idn(self) -> dict[str, str | None]: "firmware": firmware, } return IDN - - -@deprecated( - "B2962A is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightB2962A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class B2962A(KeysightB2962A): - """ - Alias for backwards compatibility - """ diff --git a/src/qcodes/instrument_drivers/Keysight/Keysight_N5173B.py b/src/qcodes/instrument_drivers/Keysight/Keysight_N5173B.py index 1fb0611dc922..a40da232e363 100644 --- a/src/qcodes/instrument_drivers/Keysight/Keysight_N5173B.py +++ b/src/qcodes/instrument_drivers/Keysight/Keysight_N5173B.py @@ -1,19 +1,5 @@ -from typing_extensions import deprecated - from qcodes.instrument_drivers.Keysight.Keysight_N5183B import KeysightN5183B -from qcodes.utils.deprecate import QCoDeSDeprecationWarning class KeysightN5173B(KeysightN5183B): pass # N5173B has the same interface as N5183B - - -@deprecated( - "N5173B is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN5173B instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N5173B(KeysightN5173B): - """ - Alias for backwards compatibility - """ diff --git a/src/qcodes/instrument_drivers/Keysight/Keysight_N5183B.py b/src/qcodes/instrument_drivers/Keysight/Keysight_N5183B.py index 71dc8ff95522..297434a2ac60 100644 --- a/src/qcodes/instrument_drivers/Keysight/Keysight_N5183B.py +++ b/src/qcodes/instrument_drivers/Keysight/Keysight_N5183B.py @@ -1,9 +1,6 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - from qcodes.instrument_drivers.Keysight.N51x1 import KeysightN51x1 -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing import Unpack @@ -16,15 +13,3 @@ def __init__( self, name: str, address: str, **kwargs: "Unpack[VisaInstrumentKWArgs]" ): super().__init__(name, address, min_power=-20, max_power=19, **kwargs) - - -@deprecated( - "N5183B is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN5183B instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N5183B(KeysightN5183B): - """ " - Alias for backwards compatiblitly - - """ diff --git a/src/qcodes/instrument_drivers/Keysight/Keysight_N6705B.py b/src/qcodes/instrument_drivers/Keysight/Keysight_N6705B.py index 8007122912ba..6e6cf298c6df 100644 --- a/src/qcodes/instrument_drivers/Keysight/Keysight_N6705B.py +++ b/src/qcodes/instrument_drivers/Keysight/Keysight_N6705B.py @@ -1,7 +1,5 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - from qcodes.instrument import ( Instrument, InstrumentBaseKWArgs, @@ -9,7 +7,6 @@ VisaInstrument, VisaInstrumentKWArgs, ) -from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing import Unpack @@ -98,17 +95,6 @@ def __init__( self.ch_name = name -@deprecated( - "N6705BChannel is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN6705BChannel instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N6705BChannel(KeysightN6705BChannel): - """Alias for backwards compatibility""" - - pass - - class KeysightN6705B(VisaInstrument): default_terminator = "\n" @@ -135,14 +121,3 @@ def get_idn(self) -> dict[str, str | None]: "firmware": firmware, } return IDN - - -@deprecated( - "N6705B is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN6705B instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N6705B(KeysightN6705B): - """ - Alias for backwards compatibility. - """ diff --git a/src/qcodes/instrument_drivers/Keysight/KtM960x.py b/src/qcodes/instrument_drivers/Keysight/KtM960x.py index bdc9f2579540..f3af627c2ec8 100644 --- a/src/qcodes/instrument_drivers/Keysight/KtM960x.py +++ b/src/qcodes/instrument_drivers/Keysight/KtM960x.py @@ -2,8 +2,6 @@ from functools import partial from typing import TYPE_CHECKING, Generic -from typing_extensions import deprecated - import qcodes.validators as vals from qcodes.instrument import Instrument, InstrumentBaseKWArgs from qcodes.parameters import ( @@ -13,7 +11,6 @@ create_on_off_val_mapping, ) from qcodes.parameters.parameter_base import ParameterDataTypeVar -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from . import KtM960xDefs @@ -297,14 +294,3 @@ def _get_vi_int(self, attr: int) -> int: def close(self) -> None: self._dll.KtM960x_close(self._session) super().close() - - -@deprecated( - "KtM960x is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightM960x instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class KtM960x(KeysightM960x): - """Alias for backwards compatibility""" - - pass diff --git a/src/qcodes/instrument_drivers/Keysight/KtMAwg.py b/src/qcodes/instrument_drivers/Keysight/KtMAwg.py index ac70fc99db81..4d6f17e86748 100644 --- a/src/qcodes/instrument_drivers/Keysight/KtMAwg.py +++ b/src/qcodes/instrument_drivers/Keysight/KtMAwg.py @@ -2,11 +2,8 @@ from functools import partial from typing import TYPE_CHECKING -from typing_extensions import deprecated - from qcodes.instrument import Instrument, InstrumentBaseKWArgs, InstrumentChannel from qcodes.parameters import Parameter, create_on_off_val_mapping -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from qcodes.validators import Numbers from . import KtMAwgDefs @@ -14,7 +11,6 @@ if TYPE_CHECKING: from typing import Unpack - _ch_type = bytes | ctypes.Array[ctypes.c_char] @@ -411,25 +407,3 @@ def _get_vi_int(self, attr: int, ch: _ch_type = b"") -> int: def close(self) -> None: self._dll.KtMAwg_close(self._session) super().close() - - -@deprecated( - "KtMAWGChannel is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightM9336AAWGChannel instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class KtMAWGChannel(KeysightM9336AAWGChannel): - """Alias for backwards compatibility""" - - pass - - -@deprecated( - "KtMAwg is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightM9336A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class KtMAwg(KeysightM9336A): - """Alias for backwards compatibility""" - - pass diff --git a/src/qcodes/instrument_drivers/Keysight/N5222B.py b/src/qcodes/instrument_drivers/Keysight/N5222B.py index 8f85a0f836a8..b94fb4760190 100644 --- a/src/qcodes/instrument_drivers/Keysight/N5222B.py +++ b/src/qcodes/instrument_drivers/Keysight/N5222B.py @@ -1,17 +1,3 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .Keysight_N5222B import KeysightN5222B - -@deprecated( - "N5222B is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN5222B instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N5222B(KeysightN5222B): - """ - Alias for backwards compatibility - - """ +__all__ = ["KeysightN5222B"] diff --git a/src/qcodes/instrument_drivers/Keysight/N5230C.py b/src/qcodes/instrument_drivers/Keysight/N5230C.py index e325cd397ec9..066050a78ebf 100644 --- a/src/qcodes/instrument_drivers/Keysight/N5230C.py +++ b/src/qcodes/instrument_drivers/Keysight/N5230C.py @@ -1,16 +1,3 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .Keysight_N5230C import KeysightN5230C - -@deprecated( - "N5230C is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN5230C instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N5230C(KeysightN5230C): - """ - Alias for backwards compatibility - """ +__all__ = ["KeysightN5230C"] diff --git a/src/qcodes/instrument_drivers/Keysight/N5245A.py b/src/qcodes/instrument_drivers/Keysight/N5245A.py index 9d23c0ce0ca3..578d5b89f76c 100644 --- a/src/qcodes/instrument_drivers/Keysight/N5245A.py +++ b/src/qcodes/instrument_drivers/Keysight/N5245A.py @@ -1,16 +1,3 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .Keysight_N5245A import KeysightN5245A - -@deprecated( - "N5245A is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN5245A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N5245A(KeysightN5245A): - """ - Alias for backwards compatibility - """ +__all__ = ["KeysightN5245A"] diff --git a/src/qcodes/instrument_drivers/Keysight/N9030B.py b/src/qcodes/instrument_drivers/Keysight/N9030B.py index 451b589db007..9295af0e2435 100644 --- a/src/qcodes/instrument_drivers/Keysight/N9030B.py +++ b/src/qcodes/instrument_drivers/Keysight/N9030B.py @@ -1,7 +1,3 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .Keysight_N9030B import ( FrequencyAxis, KeysightN9030B, @@ -16,13 +12,12 @@ PhaseNoiseMode = KeysightN9030BPhaseNoiseMode """Alias for backwards compatibility""" - -@deprecated( - "N9030B is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightN9030B instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class N9030B(KeysightN9030B): - """ - Alias for backwards compatibility - """ +__all__ = [ + "FrequencyAxis", + "KeysightN9030B", + "KeysightN9030BPhaseNoiseMode", + "KeysightN9030BSpectrumAnalyzerMode", + "PhaseNoiseMode", + "SpectrumAnalyzerMode", + "Trace", +] diff --git a/src/qcodes/instrument_drivers/Keysight/P9374A.py b/src/qcodes/instrument_drivers/Keysight/P9374A.py index 0420881798c9..0b2933e8a47c 100644 --- a/src/qcodes/instrument_drivers/Keysight/P9374A.py +++ b/src/qcodes/instrument_drivers/Keysight/P9374A.py @@ -1,16 +1,3 @@ -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .Keysight_P9374A import KeysightP9374A - -@deprecated( - "P9374A is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightP9374A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class P9374A(KeysightP9374A): - """ - Alias for backwards compatibility. - """ +__all__ = ["KeysightP9374A"] diff --git a/src/qcodes/instrument_drivers/Keysight/keysight_e4980a.py b/src/qcodes/instrument_drivers/Keysight/keysight_e4980a.py index a301c3cafdf5..5b339d2e90bf 100644 --- a/src/qcodes/instrument_drivers/Keysight/keysight_e4980a.py +++ b/src/qcodes/instrument_drivers/Keysight/keysight_e4980a.py @@ -2,7 +2,6 @@ from packaging import version from pyvisa.errors import VisaIOError -from typing_extensions import deprecated from qcodes.instrument import ( InstrumentBaseKWArgs, @@ -20,7 +19,6 @@ create_on_off_val_mapping, ) from qcodes.utils import convert_legacy_version_to_supported_version -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from qcodes.validators import Bool, Enum, Ints, Numbers if TYPE_CHECKING: @@ -74,17 +72,6 @@ def get_raw(self) -> tuple[ParamRawDataType, ...]: return self.value -@deprecated( - "MeasurementPair is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightE4980AMeasurementPair instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class MeasurementPair(KeysightE4980AMeasurementPair): - """Alias for backwards compatibility""" - - pass - - class KeysightE4980AMeasurements: """ All the measurement function for E4980A LCR meter. See user's guide P353 @@ -153,17 +140,6 @@ class KeysightE4980AMeasurements: VDID = KeysightE4980AMeasurementPair("VDID", ("voltage", "current"), ("V", "A")) -@deprecated( - "E4980AMeasurements is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightE4980AMeasurements instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class E4980AMeasurements(KeysightE4980AMeasurements): - """Alias for backwards compatibility""" - - pass - - class KeysightE4980ACorrection(InstrumentChannel): """ Module for correction settings. @@ -210,17 +186,6 @@ def __init__( """Enables or disable SHORT correction.""" -@deprecated( - "Correction4980A is deprecated. Please use qcodes.instrument_drivers.Keysight.KeysightE4980ACorrection instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Correction4980A(KeysightE4980ACorrection): - """Alias for backwards compatibility""" - - pass - - class KeysightE4980A(VisaInstrument): """ QCodes driver for E4980A Precision LCR Meter diff --git a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1511B.py b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1511B.py index 521299da7e2e..a2bbbd18e287 100644 --- a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1511B.py +++ b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1511B.py @@ -1,9 +1,5 @@ from typing import TYPE_CHECKING, Any -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .constants import IMeasRange, IOutputRange from .KeysightB1517A import KeysightB1517A @@ -109,16 +105,3 @@ def asu_present(self, val: bool) -> None: self._valid_i_output_ranges = list( set(self._valid_i_output_ranges) - set(self._asu_valid_i_output_ranges) ) - - -@deprecated( - "B1511B is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1511B instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class B1511B(KeysightB1511B): - """ - Alias for backwards compatibility - """ - - pass diff --git a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1517A.py b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1517A.py index 77d6c25eb7c7..3b08e2c361c4 100644 --- a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1517A.py +++ b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1517A.py @@ -4,13 +4,12 @@ import numpy as np import numpy.typing as npt -from typing_extensions import TypedDict, deprecated +from typing_extensions import TypedDict import qcodes.validators as vals from qcodes.instrument import InstrumentBaseKWArgs, InstrumentChannel from qcodes.parameters import Group, GroupParameter, Parameter, ParamRawDataType from qcodes.parameters.parameter_base import ParameterDataTypeVar -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from . import constants from .constants import ( @@ -697,19 +696,6 @@ def _get_sweep_steps_parser(response: str) -> SweepSteps: return out_dict -@deprecated( - "IVSweeper is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1500IVSweeper instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class IVSweeper(KeysightB1500IVSweeper): - """ - Alias for backwards compatibility - """ - - pass - - class _ParameterWithStatus( Parameter[ParameterDataTypeVar, "KeysightB1517A"], Generic[ParameterDataTypeVar] ): @@ -1418,16 +1404,3 @@ def setup_staircase_sweep( self.parent.clear_timer_count() self.setup_fnc_already_run = True - - -@deprecated( - "B1517A is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1517A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class B1517A(KeysightB1517A): - """ - Alias for backwards compatibility - """ - - pass diff --git a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1520A.py b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1520A.py index c8dee17bcf2a..138234c9e8f9 100644 --- a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1520A.py +++ b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1520A.py @@ -3,12 +3,10 @@ from typing import TYPE_CHECKING, Any, cast import numpy as np -from typing_extensions import deprecated import qcodes.validators as vals from qcodes.instrument import InstrumentBaseKWArgs, InstrumentChannel from qcodes.parameters import Group, GroupParameter, MultiParameter, Parameter -from qcodes.utils.deprecate import QCoDeSDeprecationWarning from . import constants from .constants import MM, ChNr, ModuleKind @@ -452,19 +450,6 @@ def _get_post_sweep_voltage_condition(self) -> int: return int(resp_dict["output_after_sweep"]) -@deprecated( - "CVSweeper is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1500CVSweeper instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class CVSweeper(KeysightB1500CVSweeper): - """ - Alias for backwards compatibility - """ - - pass - - class KeysightB1520A(KeysightB1500Module): """ Driver for Keysight B1520A Capacitance Measurement Unit module for B1500 @@ -1152,19 +1137,6 @@ def setup_staircase_cv( self.setup_fnc_already_run = True -@deprecated( - "B1520A is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1520A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class B1520A(KeysightB1520A): - """ - Alias for backwards compatiblitly - """ - - pass - - class KeysightB1500CVSweepMeasurement( MultiParameter[tuple[tuple[float, ...], tuple[float, ...]], KeysightB1520A], StatusMixin, @@ -1267,19 +1239,6 @@ def update_name_label_unit_from_impedance_model( ) -@deprecated( - "CVSweepMeasurement is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1500CVSweepMeasurement instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class CVSweepMeasurement(KeysightB1500CVSweepMeasurement): - """ - Alias for backwards compatibility - """ - - pass - - class KeysightB1500Correction(InstrumentChannel["KeysightB1520A"]): """ A Keysight B1520A CMU submodule for performing open/short/load corrections. @@ -1444,19 +1403,6 @@ def perform_and_enable(self, corr: constants.CalibrationType) -> str: return response_out -@deprecated( - "Correction is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1500Correction instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Correction(KeysightB1500Correction): - """ - Alias for backwards compatibility - """ - - pass - - class KeysightB1500FrequencyList(InstrumentChannel["KeysightB1500Correction"]): """ A frequency list for open/short/load correction for Keysight B1520A CMU. @@ -1509,16 +1455,3 @@ def query(self, index: int | None = None) -> float: msg = MessageBuilder().corrl_query(chnum=self._chnum, index=index) response = self.ask(msg.message) return float(response) - - -@deprecated( - "FrequencyList is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1500FrequencyList instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class FrequencyList(KeysightB1500FrequencyList): - """ - Alias for backwards compatibility - """ - - pass diff --git a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1530A.py b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1530A.py index b17765efae0d..4552d05813e5 100644 --- a/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1530A.py +++ b/src/qcodes/instrument_drivers/Keysight/keysightb1500/KeysightB1530A.py @@ -1,9 +1,5 @@ from typing import TYPE_CHECKING -from typing_extensions import deprecated - -from qcodes.utils.deprecate import QCoDeSDeprecationWarning - from .constants import ChNr, ModuleKind from .KeysightB1500_module import KeysightB1500Module @@ -45,16 +41,3 @@ def __init__( super().__init__(parent, name, slot_nr, **kwargs) self.channels = (ChNr(slot_nr), ChNr(int(f"{slot_nr:d}02"))) - - -@deprecated( - "B1530A is deprecated. Please use qcodes.instrument_drivers.Keysight.keysightb1500.KeysightB1530A instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class B1530A(KeysightB1530A): - """ - Alias for backwards compatibility - """ - - pass From d6c3037e8154b83604f65ae818494b00c9992ab4 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:43:45 +0200 Subject: [PATCH 17/24] Fix import formatting in AlazarTech files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/qcodes/instrument_drivers/AlazarTech/ATS9360.py | 1 + src/qcodes/instrument_drivers/AlazarTech/ATS9373.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py b/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py index aec0623c9edc..fee20c01d7ed 100644 --- a/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py +++ b/src/qcodes/instrument_drivers/AlazarTech/ATS9360.py @@ -2,6 +2,7 @@ import numpy as np from packaging import version + from qcodes import validators from .ATS import AlazarTechATS diff --git a/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py b/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py index fc45e328f921..a9f06f25b36f 100644 --- a/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py +++ b/src/qcodes/instrument_drivers/AlazarTech/ATS9373.py @@ -2,6 +2,7 @@ import numpy as np from packaging import version + from qcodes import validators from qcodes.instrument_drivers.AlazarTech.ATS import AlazarTechATS from qcodes.instrument_drivers.AlazarTech.utils import TraceParameter From 43e8a6f15d62ae3b4cf2da4ab2d4ed09f4cc7655 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:44:17 +0200 Subject: [PATCH 18/24] Fix ruff formatting after deprecation removal Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/qcodes/instrument_drivers/tektronix/AWG5014.py | 1 - src/qcodes/instrument_drivers/tektronix/Keithley_2000.py | 2 -- src/qcodes/instrument_drivers/tektronix/Keithley_2400.py | 2 -- .../instrument_drivers/tektronix/Keithley_2600_channels.py | 1 - src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py | 2 -- src/qcodes/instrument_drivers/tektronix/Keithley_6500.py | 1 - 6 files changed, 9 deletions(-) diff --git a/src/qcodes/instrument_drivers/tektronix/AWG5014.py b/src/qcodes/instrument_drivers/tektronix/AWG5014.py index ef6f8b0c36af..e3825a79c682 100644 --- a/src/qcodes/instrument_drivers/tektronix/AWG5014.py +++ b/src/qcodes/instrument_drivers/tektronix/AWG5014.py @@ -1967,4 +1967,3 @@ def clear_message_queue(self, verbose: bool = False) -> None: except VisaIOError: gotexception = True self.visa_handle.timeout = original_timeout - diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py index bd5eebc94c23..e40bc4ccb039 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py @@ -4,11 +4,9 @@ """ from qcodes.instrument_drivers.Keithley.Keithley_2000 import ( - Keithley2000, _parse_output_bool, _parse_output_string, ) parse_output_string = _parse_output_string parse_output_bool = _parse_output_bool - diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py index f8c93a110ffe..b32cfdfb66f9 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py @@ -2,5 +2,3 @@ Alias left for backwards compatibility. Keithly drivers have moved to the Keithley module """ - -from qcodes.instrument_drivers.Keithley.Keithley_2400 import Keithley2400 diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py index 51251afb02b5..9d9f5affcced 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py @@ -23,4 +23,3 @@ KeithleyChannel = Keithley2600Channel - diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py b/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py index 699a118d10bb..5b7bf3783f5f 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py @@ -4,7 +4,6 @@ """ from qcodes.instrument_drivers.Keithley.Keithley_3706A import ( - Keithley3706A, Keithley3706AInvalidValue, Keithley3706AUnknownOrEmptySlot, ) @@ -13,4 +12,3 @@ InvalidValue = Keithley3706AInvalidValue - diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py b/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py index e767b0c43d57..fa503e736cd7 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py @@ -11,4 +11,3 @@ ) CommandSetError = Keithley6500CommandSetError - From 7bed8957b9e5814d8ab5ef6446e8eaebc6ba090c Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:46:27 +0200 Subject: [PATCH 19/24] Consolidate newsfragments into single breaking change entry Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/changes/newsfragments/100000.breaking | 1 - docs/changes/newsfragments/100001.breaking | 1 - docs/changes/newsfragments/100002.breaking | 1 - docs/changes/newsfragments/100003.breaking | 1 - docs/changes/newsfragments/100010.breaking | 1 - docs/changes/newsfragments/100011.breaking | 1 - docs/changes/newsfragments/100012.breaking | 1 - docs/changes/newsfragments/100013.breaking | 1 - docs/changes/newsfragments/100014.breaking | 1 - docs/changes/newsfragments/100015.breaking | 1 - docs/changes/newsfragments/100016.breaking | 1 - docs/changes/newsfragments/100017.breaking | 1 - docs/changes/newsfragments/8060.breaking | 6 ++++++ docs/changes/newsfragments/99999.breaking | 1 - 14 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 docs/changes/newsfragments/100000.breaking delete mode 100644 docs/changes/newsfragments/100001.breaking delete mode 100644 docs/changes/newsfragments/100002.breaking delete mode 100644 docs/changes/newsfragments/100003.breaking delete mode 100644 docs/changes/newsfragments/100010.breaking delete mode 100644 docs/changes/newsfragments/100011.breaking delete mode 100644 docs/changes/newsfragments/100012.breaking delete mode 100644 docs/changes/newsfragments/100013.breaking delete mode 100644 docs/changes/newsfragments/100014.breaking delete mode 100644 docs/changes/newsfragments/100015.breaking delete mode 100644 docs/changes/newsfragments/100016.breaking delete mode 100644 docs/changes/newsfragments/100017.breaking create mode 100644 docs/changes/newsfragments/8060.breaking delete mode 100644 docs/changes/newsfragments/99999.breaking diff --git a/docs/changes/newsfragments/100000.breaking b/docs/changes/newsfragments/100000.breaking deleted file mode 100644 index 60632131517b..000000000000 --- a/docs/changes/newsfragments/100000.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated ``VectorMode``, ``Motor``, ``DMC4133Controller``, and ``Arm`` Galil driver aliases. Use ``GalilDMC4133VectorMode``, ``GalilDMC4133Motor``, ``GalilDMC4133Controller``, and ``GalilDMC4133Arm`` instead. diff --git a/docs/changes/newsfragments/100001.breaking b/docs/changes/newsfragments/100001.breaking deleted file mode 100644 index 2d4469ce385c..000000000000 --- a/docs/changes/newsfragments/100001.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed deprecated Keithley/Tektronix compatibility shims and aliases that were deprecated in ``0.57.0``. Use ``qcodes.instrument_drivers.Keithley`` imports and the non-underscored Keithley class names instead. diff --git a/docs/changes/newsfragments/100002.breaking b/docs/changes/newsfragments/100002.breaking deleted file mode 100644 index c5396bf9538b..000000000000 --- a/docs/changes/newsfragments/100002.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated ``qcodes.instrument_drivers.rigol`` module shims for ``DG1062``, ``DG4000``, ``DP821``, ``DP831``, ``DP832``, ``DS1074Z``, and ``DS4000``. Import these drivers from ``qcodes.instrument_drivers.rigol`` instead. diff --git a/docs/changes/newsfragments/100003.breaking b/docs/changes/newsfragments/100003.breaking deleted file mode 100644 index 752294c8d5fe..000000000000 --- a/docs/changes/newsfragments/100003.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated Oxford Instruments driver aliases ``Triton``, ``MercuryWorkerPS``, and ``MercuryiPS``. Use ``OxfordTriton``, ``OxfordMercuryWorkerPS``, and ``OxfordMercuryiPS`` instead. diff --git a/docs/changes/newsfragments/100010.breaking b/docs/changes/newsfragments/100010.breaking deleted file mode 100644 index f9f8d8023063..000000000000 --- a/docs/changes/newsfragments/100010.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed deprecated Mini-Circuits driver aliases that were deprecated in ``0.57.0``. Use ``MiniCircuitsRCSP4TChannel``, ``MiniCircuitsRCSP4T``, ``MiniCircuitsRCSPDTChannel``, ``MiniCircuitsRCSPDT``, ``MiniCircuitsUsbSPDTSwitchChannel``, ``MiniCircuitsUsbSPDT``, ``MiniCircuitsRudat13G90Base``, and ``MiniCircuitsRudat13G90Usb`` instead. diff --git a/docs/changes/newsfragments/100011.breaking b/docs/changes/newsfragments/100011.breaking deleted file mode 100644 index 3c83788fbe10..000000000000 --- a/docs/changes/newsfragments/100011.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated ``RohdeSchwarz_SGS100A`` alias for the Rohde & Schwarz SGS100A driver. Use ``RohdeSchwarzSGS100A`` instead. diff --git a/docs/changes/newsfragments/100012.breaking b/docs/changes/newsfragments/100012.breaking deleted file mode 100644 index d7fe50d91ec7..000000000000 --- a/docs/changes/newsfragments/100012.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated ``SignalHound_USB_SA124B`` alias for the Signal Hound USB-SA124B driver. Use ``SignalHoundUSBSA124B`` instead. diff --git a/docs/changes/newsfragments/100013.breaking b/docs/changes/newsfragments/100013.breaking deleted file mode 100644 index a8d4174327ac..000000000000 --- a/docs/changes/newsfragments/100013.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed deprecated Keysight driver alias classes that were deprecated in QCoDeS 0.57.0. diff --git a/docs/changes/newsfragments/100014.breaking b/docs/changes/newsfragments/100014.breaking deleted file mode 100644 index 6c5dfc95e20d..000000000000 --- a/docs/changes/newsfragments/100014.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated ``SRS_SG384`` alias for the Stanford Research Systems SG384 driver. Use ``SG384`` instead. diff --git a/docs/changes/newsfragments/100015.breaking b/docs/changes/newsfragments/100015.breaking deleted file mode 100644 index 5c4b189e7b5b..000000000000 --- a/docs/changes/newsfragments/100015.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed deprecated Tektronix driver aliases ``AWG5208``, ``AWG70002A``, ``AWGChannel``, ``Tektronix_AWG5014``, and ``ModeError``. Use the corresponding ``Tektronix*`` class names instead. diff --git a/docs/changes/newsfragments/100016.breaking b/docs/changes/newsfragments/100016.breaking deleted file mode 100644 index c54e70e6ae85..000000000000 --- a/docs/changes/newsfragments/100016.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated ``Weinschel_8320`` alias for the Weinschel 8320 driver. Use ``Weinschel8320`` instead. diff --git a/docs/changes/newsfragments/100017.breaking b/docs/changes/newsfragments/100017.breaking deleted file mode 100644 index c5d7e025b488..000000000000 --- a/docs/changes/newsfragments/100017.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed deprecated Yokogawa GS200 aliases ``GS200Exception``, ``GS200_Monitor``, ``GS200Program``, and ``GS200``. Use the corresponding ``YokogawaGS200*`` names instead. diff --git a/docs/changes/newsfragments/8060.breaking b/docs/changes/newsfragments/8060.breaking new file mode 100644 index 000000000000..f1df6032b189 --- /dev/null +++ b/docs/changes/newsfragments/8060.breaking @@ -0,0 +1,6 @@ +Legacy backwards-compatibility aliases across the ``instrument_drivers`` module that were +deprecated in QCoDeS 0.57.0 have been removed. This includes deprecated class aliases and +deprecated module shims for AlazarTech, Basel, Galil, HP, Ithaco, Keithley, Keysight, +Mini-Circuits, Oxford Instruments, Rigol, Rohde & Schwarz, Signal Hound, +Stanford Research Systems, Tektronix, Weinschel, and Yokogawa drivers. Users should +migrate to the canonical class names listed in the 0.57.0 changelog. diff --git a/docs/changes/newsfragments/99999.breaking b/docs/changes/newsfragments/99999.breaking deleted file mode 100644 index ab2289eeba11..000000000000 --- a/docs/changes/newsfragments/99999.breaking +++ /dev/null @@ -1 +0,0 @@ -Removed the deprecated ``qcodes.instrument_drivers.basel.sp983c`` and ``qcodes.instrument_drivers.basel.sp983c_remote`` module shims. Import Basel drivers from ``qcodes.instrument_drivers.basel`` instead. From 17aad04d3d34c8d63e67cbbac6587ecc0ea304ae Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 07:54:02 +0200 Subject: [PATCH 20/24] Remove leftover Keithley shim modules from tektronix These modules were deprecated compatibility shims that should have been deleted along with the Keithley class aliases. Remove them entirely. - tektronix/Keithley_2000.py - tektronix/Keithley_2400.py - tektronix/Keithley_2600_channels.py - tektronix/Keithley_3706A.py - tektronix/Keithley_6500.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pyproject.toml | 4 --- .../tektronix/Keithley_2000.py | 12 --------- .../tektronix/Keithley_2400.py | 4 --- .../tektronix/Keithley_2600_channels.py | 25 ------------------- .../tektronix/Keithley_3706A.py | 14 ----------- .../tektronix/Keithley_6500.py | 13 ---------- 6 files changed, 72 deletions(-) delete mode 100644 src/qcodes/instrument_drivers/tektronix/Keithley_2000.py delete mode 100644 src/qcodes/instrument_drivers/tektronix/Keithley_2400.py delete mode 100644 src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py delete mode 100644 src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py delete mode 100644 src/qcodes/instrument_drivers/tektronix/Keithley_6500.py diff --git a/pyproject.toml b/pyproject.toml index 14b68fd58232..5f631a307fb3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -274,10 +274,6 @@ known-first-party = ["qcodes"] # deprecated modules left # for backwards compatibility "src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py" = ["F401"] -"src/qcodes/instrument_drivers/tektronix/Keithley_6500.py" = ["F401"] -"src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py" = ["F401"] -"src/qcodes/instrument_drivers/tektronix/Keithley_2450.py" = ["F401"] -"src/qcodes/instrument_drivers/tektronix/keithley_7510.py" = ["F401"] "src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py" = ["F401"] "src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py" = ["F401"] "src/qcodes/instrument_drivers/devices.py" = ["F401"] diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py deleted file mode 100644 index e40bc4ccb039..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py +++ /dev/null @@ -1,12 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" - -from qcodes.instrument_drivers.Keithley.Keithley_2000 import ( - _parse_output_bool, - _parse_output_string, -) - -parse_output_string = _parse_output_string -parse_output_bool = _parse_output_bool diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py deleted file mode 100644 index b32cfdfb66f9..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py +++ /dev/null @@ -1,4 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py deleted file mode 100644 index 9d9f5affcced..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py +++ /dev/null @@ -1,25 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" - -import logging -import sys -from enum import Enum, StrEnum - -from qcodes.instrument_drivers.Keithley._Keithley_2600 import ( - Keithley2600, - Keithley2600Channel, - LuaSweepParameter, - MeasurementStatus, - TimeAxis, - TimeTrace, - _MeasurementCurrentParameter, - _MeasurementVoltageParameter, - _ParameterWithStatus, -) - -log = logging.getLogger(__name__) - - -KeithleyChannel = Keithley2600Channel diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py b/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py deleted file mode 100644 index 5b7bf3783f5f..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" - -from qcodes.instrument_drivers.Keithley.Keithley_3706A import ( - Keithley3706AInvalidValue, - Keithley3706AUnknownOrEmptySlot, -) - -UnknownOrEmptySlot = Keithley3706AUnknownOrEmptySlot - - -InvalidValue = Keithley3706AInvalidValue diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py b/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py deleted file mode 100644 index fa503e736cd7..000000000000 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Alias left for backwards compatibility. -Keithly drivers have moved to the Keithley module -""" - -from qcodes.instrument_drivers.Keithley.Keithley_6500 import ( - Keithley6500, - Keithley6500CommandSetError, - _parse_output_bool, - _parse_output_string, -) - -CommandSetError = Keithley6500CommandSetError From 7aeea27e78ba6daefe62b95cbf8dc36dbbf0f7ca Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 08:08:50 +0200 Subject: [PATCH 21/24] Remove leftover Keysight shim modules These modules were deprecated compatibility shims that should have been deleted along with the Keysight class aliases. - N5222B.py - N5230C.py - N5245A.py - N9030B.py - P9374A.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../instrument_drivers/Keysight/N5222B.py | 3 --- .../instrument_drivers/Keysight/N5230C.py | 3 --- .../instrument_drivers/Keysight/N5245A.py | 3 --- .../instrument_drivers/Keysight/N9030B.py | 23 ------------------- .../instrument_drivers/Keysight/P9374A.py | 3 --- 5 files changed, 35 deletions(-) delete mode 100644 src/qcodes/instrument_drivers/Keysight/N5222B.py delete mode 100644 src/qcodes/instrument_drivers/Keysight/N5230C.py delete mode 100644 src/qcodes/instrument_drivers/Keysight/N5245A.py delete mode 100644 src/qcodes/instrument_drivers/Keysight/N9030B.py delete mode 100644 src/qcodes/instrument_drivers/Keysight/P9374A.py diff --git a/src/qcodes/instrument_drivers/Keysight/N5222B.py b/src/qcodes/instrument_drivers/Keysight/N5222B.py deleted file mode 100644 index b94fb4760190..000000000000 --- a/src/qcodes/instrument_drivers/Keysight/N5222B.py +++ /dev/null @@ -1,3 +0,0 @@ -from .Keysight_N5222B import KeysightN5222B - -__all__ = ["KeysightN5222B"] diff --git a/src/qcodes/instrument_drivers/Keysight/N5230C.py b/src/qcodes/instrument_drivers/Keysight/N5230C.py deleted file mode 100644 index 066050a78ebf..000000000000 --- a/src/qcodes/instrument_drivers/Keysight/N5230C.py +++ /dev/null @@ -1,3 +0,0 @@ -from .Keysight_N5230C import KeysightN5230C - -__all__ = ["KeysightN5230C"] diff --git a/src/qcodes/instrument_drivers/Keysight/N5245A.py b/src/qcodes/instrument_drivers/Keysight/N5245A.py deleted file mode 100644 index 578d5b89f76c..000000000000 --- a/src/qcodes/instrument_drivers/Keysight/N5245A.py +++ /dev/null @@ -1,3 +0,0 @@ -from .Keysight_N5245A import KeysightN5245A - -__all__ = ["KeysightN5245A"] diff --git a/src/qcodes/instrument_drivers/Keysight/N9030B.py b/src/qcodes/instrument_drivers/Keysight/N9030B.py deleted file mode 100644 index 9295af0e2435..000000000000 --- a/src/qcodes/instrument_drivers/Keysight/N9030B.py +++ /dev/null @@ -1,23 +0,0 @@ -from .Keysight_N9030B import ( - FrequencyAxis, - KeysightN9030B, - KeysightN9030BPhaseNoiseMode, - KeysightN9030BSpectrumAnalyzerMode, - Trace, -) - -SpectrumAnalyzerMode = KeysightN9030BSpectrumAnalyzerMode -"""Alias for backwards compatibility""" - -PhaseNoiseMode = KeysightN9030BPhaseNoiseMode -"""Alias for backwards compatibility""" - -__all__ = [ - "FrequencyAxis", - "KeysightN9030B", - "KeysightN9030BPhaseNoiseMode", - "KeysightN9030BSpectrumAnalyzerMode", - "PhaseNoiseMode", - "SpectrumAnalyzerMode", - "Trace", -] diff --git a/src/qcodes/instrument_drivers/Keysight/P9374A.py b/src/qcodes/instrument_drivers/Keysight/P9374A.py deleted file mode 100644 index 0b2933e8a47c..000000000000 --- a/src/qcodes/instrument_drivers/Keysight/P9374A.py +++ /dev/null @@ -1,3 +0,0 @@ -from .Keysight_P9374A import KeysightP9374A - -__all__ = ["KeysightP9374A"] From 6e2bc57b4e9f25f45f4e4eeee478df8154d681cd Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 08:10:45 +0200 Subject: [PATCH 22/24] Remove leftover Mini-Circuits shim modules These modules were deprecated compatibility shims that should have been deleted along with the Mini-Circuits class aliases. - RC_SP4T.py - RC_SPDT.py - USB_SPDT.py - RUDAT_13G_90.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py | 3 --- src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py | 3 --- .../instrument_drivers/Minicircuits/RUDAT_13G_90.py | 11 ----------- .../instrument_drivers/Minicircuits/USB_SPDT.py | 6 ------ 4 files changed, 23 deletions(-) delete mode 100644 src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py delete mode 100644 src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py delete mode 100644 src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py delete mode 100644 src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py diff --git a/src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py b/src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py deleted file mode 100644 index f3783ae16bf2..000000000000 --- a/src/qcodes/instrument_drivers/Minicircuits/RC_SP4T.py +++ /dev/null @@ -1,3 +0,0 @@ -from ._minicircuits_rc_sp4t import MiniCircuitsRCSP4T, MiniCircuitsRCSP4TChannel - -__all__ = ["MiniCircuitsRCSP4T", "MiniCircuitsRCSP4TChannel"] diff --git a/src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py b/src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py deleted file mode 100644 index 6de3cfd60598..000000000000 --- a/src/qcodes/instrument_drivers/Minicircuits/RC_SPDT.py +++ /dev/null @@ -1,3 +0,0 @@ -from ._minicircuits_rc_spdt import MiniCircuitsRCSPDT, MiniCircuitsRCSPDTChannel - -__all__ = ["MiniCircuitsRCSPDT", "MiniCircuitsRCSPDTChannel"] diff --git a/src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py b/src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py deleted file mode 100644 index eee96eead390..000000000000 --- a/src/qcodes/instrument_drivers/Minicircuits/RUDAT_13G_90.py +++ /dev/null @@ -1,11 +0,0 @@ -from ._minicircuits_rudat_13g_90 import ( - MiniCircuitsRudat13G90Base, - MiniCircuitsRudat13G90Usb, -) -from .USBHIDMixin import MiniCircuitsHIDMixin - -__all__ = [ - "MiniCircuitsHIDMixin", - "MiniCircuitsRudat13G90Base", - "MiniCircuitsRudat13G90Usb", -] diff --git a/src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py b/src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py deleted file mode 100644 index 4c8e378762f9..000000000000 --- a/src/qcodes/instrument_drivers/Minicircuits/USB_SPDT.py +++ /dev/null @@ -1,6 +0,0 @@ -from ._minicircuits_usb_spdt import ( - MiniCircuitsUsbSPDT, - MiniCircuitsUsbSPDTSwitchChannel, -) - -__all__ = ["MiniCircuitsUsbSPDT", "MiniCircuitsUsbSPDTSwitchChannel"] From 93d2d87fc8e3972012884307fb26421f5132175e Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 08:12:41 +0200 Subject: [PATCH 23/24] Remove leftover Signal Hound and Rohde & Schwarz shim modules - signal_hound/USB_SA124B.py - rohde_schwarz/RTE1000.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pyproject.toml | 2 -- .../instrument_drivers/rohde_schwarz/RTE1000.py | 3 --- .../instrument_drivers/signal_hound/USB_SA124B.py | 15 --------------- 3 files changed, 20 deletions(-) delete mode 100644 src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py delete mode 100644 src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py diff --git a/pyproject.toml b/pyproject.toml index 5f631a307fb3..e2778da766f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -274,8 +274,6 @@ known-first-party = ["qcodes"] # deprecated modules left # for backwards compatibility "src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py" = ["F401"] -"src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py" = ["F401"] -"src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py" = ["F401"] "src/qcodes/instrument_drivers/devices.py" = ["F401"] # TID253 these imports are fine at module level diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py b/src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py deleted file mode 100644 index 0207e30dcebe..000000000000 --- a/src/qcodes/instrument_drivers/rohde_schwarz/RTE1000.py +++ /dev/null @@ -1,3 +0,0 @@ -# Ensuring backwards compatibility - -from .RTO1000 import RTO1000 as RTE1000 diff --git a/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py b/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py deleted file mode 100644 index 90a716044bbb..000000000000 --- a/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Module left for backwards compatibility. Will eventually be deprecated and removed. - -""" - -from .SignalHound_USB_SA124B import ( - Constants, - ExternalRefParameter, - FrequencySweep, - ScaleParameter, - SignalHoundUSBSA124B, - SweepTraceParameter, - TraceParameter, - saStatus, -) From 05e82879e6a80a49067823f0c489677473728e31 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 4 May 2026 08:28:46 +0200 Subject: [PATCH 24/24] Remove stale ruff F401 per-file ignores for deleted files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e2778da766f9..71df04579564 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -271,11 +271,6 @@ allowed-confusables = ["ยต"] known-first-party = ["qcodes"] [tool.ruff.lint.per-file-ignores] -# deprecated modules left -# for backwards compatibility -"src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py" = ["F401"] -"src/qcodes/instrument_drivers/devices.py" = ["F401"] - # TID253 these imports are fine at module level # in tests and examples "docs/*" = ["TID253"]