Skip to content

Commit d598c32

Browse files
authored
Merge pull request #7292 from jenshnielsen/deprecate_instrument_aliases
Deprecate legacy alias modules in qcodes.instrument_drivers
2 parents 8fe40e9 + e25c794 commit d598c32

71 files changed

Lines changed: 1066 additions & 184 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
Legacy backwards-compatibility aliases across the ``instrument_drivers`` module have been
2+
deprecated. Users should migrate to the canonical class names listed below. All deprecated
3+
names will be removed in a future release.
4+
5+
**AlazarTech**
6+
7+
- Class ``AlazarTech_ATS9360`` is deprecated. Use ``AlazarTechATS9360`` instead.
8+
- Class ``AlazarTech_ATS9373`` is deprecated. Use ``AlazarTechATS9373`` instead.
9+
- Class ``AlazarTech_ATS9440`` is deprecated. Use ``AlazarTechATS9440`` instead.
10+
- Class ``AlazarTech_ATS9870`` is deprecated. Use ``AlazarTechATS9870`` instead.
11+
- Class ``Demodulation_AcquisitionController`` is deprecated. Use ``DemodulationAcquisitionController`` instead.
12+
13+
**Basel**
14+
15+
- Module ``qcodes.instrument_drivers.basel.sp983c`` is deprecated. Import from ``qcodes.instrument_drivers.basel`` instead.
16+
- Module ``qcodes.instrument_drivers.basel.sp983c_remote`` is deprecated. Import from ``qcodes.instrument_drivers.basel`` instead.
17+
18+
**Galil**
19+
20+
- Class ``VectorMode`` is deprecated. Use ``GalilDMC4133VectorMode`` instead.
21+
- Class ``Motor`` is deprecated. Use ``GalilDMC4133Motor`` instead.
22+
- Class ``DMC4133Controller`` is deprecated. Use ``GalilDMC4133Controller`` instead.
23+
- Class ``Arm`` is deprecated. Use ``GalilDMC4133Arm`` instead.
24+
25+
**HP**
26+
27+
- Module ``qcodes.instrument_drivers.HP.HP8133A`` is deprecated. Import from ``qcodes.instrument_drivers.HP`` instead.
28+
- Module ``qcodes.instrument_drivers.HP.HP8753D`` is deprecated. Import from ``qcodes.instrument_drivers.HP`` instead.
29+
- Class ``HP_83650A`` is deprecated. Use ``HP83650A`` instead.
30+
31+
**Ithaco**
32+
33+
- Class ``Ithaco_1211`` is deprecated. Use ``Ithaco1211`` instead.
34+
35+
**Keithley / Tektronix**
36+
37+
- Module ``qcodes.instrument_drivers.tektronix.Keithley_2450`` is deprecated. Import from ``qcodes.instrument_drivers.Keithley`` instead.
38+
- Module ``qcodes.instrument_drivers.tektronix.keithley_7510`` is deprecated. Import from ``qcodes.instrument_drivers.Keithley`` instead.
39+
- Module ``qcodes.instrument_drivers.tektronix.Keithley_s46`` is deprecated. Import from ``qcodes.instrument_drivers.Keithley`` instead.
40+
- Class ``Keithley_2000`` is deprecated. Use ``Keithley2000`` instead.
41+
- Class ``Keithley_2400`` is deprecated. Use ``Keithley2400`` instead.
42+
- Class ``Keithley_2600`` is deprecated. Use ``Keithley2600`` instead.
43+
- Class ``Keithley_3706A`` is deprecated. Use ``Keithley3706A`` instead.
44+
- Class ``Keithley_6500`` is deprecated. Use ``Keithley6500`` instead.
45+
- Class ``S46`` is deprecated. Use ``KeithleyS46`` instead.
46+
47+
**Keysight**
48+
49+
- Class ``B2962A`` is deprecated. Use ``KeysightB2962A`` instead.
50+
- Class ``MeasurementPair`` is deprecated. Use ``KeysightE4980AMeasurementPair`` instead.
51+
- Class ``E4980AMeasurements`` is deprecated. Use ``KeysightE4980AMeasurements`` instead.
52+
- Class ``Correction4980A`` is deprecated. Use ``KeysightE4980ACorrection`` instead.
53+
- Class ``BoundMeasurement`` is deprecated. Use ``KeysightInfiniiumBoundMeasurement`` instead.
54+
- Class ``UnboundMeasurement`` is deprecated. Use ``KeysightInfiniiumUnboundMeasurement`` instead.
55+
- Class ``InfiniiumFunction`` is deprecated. Use ``KeysightInfiniiumFunction`` instead.
56+
- Class ``InfiniiumChannel`` is deprecated. Use ``KeysightInfiniiumChannel`` instead.
57+
- Class ``Infiniium`` is deprecated. Use ``KeysightInfiniium`` instead.
58+
- Class ``N5173B`` is deprecated. Use ``KeysightN5173B`` instead.
59+
- Class ``N5183B`` is deprecated. Use ``KeysightN5183B`` instead.
60+
- Class ``N5222B`` is deprecated. Use ``KeysightN5222B`` instead.
61+
- Class ``N5230C`` is deprecated. Use ``KeysightN5230C`` instead.
62+
- Class ``N5245A`` is deprecated. Use ``KeysightN5245A`` instead.
63+
- Class ``N6705BChannel`` is deprecated. Use ``KeysightN6705BChannel`` instead.
64+
- Class ``N6705B`` is deprecated. Use ``KeysightN6705B`` instead.
65+
- Class ``N9030B`` is deprecated. Use ``KeysightN9030B`` instead.
66+
- Class ``P9374A`` is deprecated. Use ``KeysightP9374A`` instead.
67+
- Class ``KtM960x`` is deprecated. Use ``KeysightM960x`` instead.
68+
- Class ``KtMAWGChannel`` is deprecated. Use ``KeysightM9336AAWGChannel`` instead.
69+
- Class ``KtMAwg`` is deprecated. Use ``KeysightM9336A`` instead.
70+
71+
**Keysight B1500**
72+
73+
- Class ``B1511B`` is deprecated. Use ``KeysightB1511B`` instead.
74+
- Class ``IVSweeper`` is deprecated. Use ``KeysightB1500IVSweeper`` instead.
75+
- Class ``B1517A`` is deprecated. Use ``KeysightB1517A`` instead.
76+
- Class ``CVSweeper`` is deprecated. Use ``KeysightB1500CVSweeper`` instead.
77+
- Class ``B1520A`` is deprecated. Use ``KeysightB1520A`` instead.
78+
- Class ``CVSweepMeasurement`` is deprecated. Use ``KeysightB1500CVSweepMeasurement`` instead.
79+
- Class ``Correction`` is deprecated. Use ``KeysightB1500Correction`` instead.
80+
- Class ``FrequencyList`` is deprecated. Use ``KeysightB1500FrequencyList`` instead.
81+
- Class ``B1530A`` is deprecated. Use ``KeysightB1530A`` instead.
82+
83+
**Mini-Circuits**
84+
85+
- Class ``MC_channel`` (RC_SP4T) is deprecated. Use ``MiniCircuitsRCSP4TChannel`` instead.
86+
- Class ``RC_SP4T`` is deprecated. Use ``MiniCircuitsRCSP4T`` instead.
87+
- Class ``MC_channel`` (RC_SPDT) is deprecated. Use ``MiniCircuitsRCSPDTChannel`` instead.
88+
- Class ``RC_SPDT`` is deprecated. Use ``MiniCircuitsRCSPDT`` instead.
89+
- Class ``SwitchChannelUSB`` is deprecated. Use ``MiniCircuitsUsbSPDTSwitchChannel`` instead.
90+
- Class ``USB_SPDT`` is deprecated. Use ``MiniCircuitsUsbSPDT`` instead.
91+
- Class ``RUDAT_13G_90`` is deprecated. Use ``MiniCircuitsRudat13G90Base`` instead.
92+
- Class ``RUDAT_13G_90_USB`` is deprecated. Use ``MiniCircuitsRudat13G90Usb`` instead.
93+
94+
**Oxford Instruments**
95+
96+
- Class ``Triton`` is deprecated. Use ``OxfordTriton`` instead.
97+
- Class ``MercuryWorkerPS`` is deprecated. Use ``OxfordMercuryWorkerPS`` instead.
98+
- Class ``MercuryiPS`` is deprecated. Use ``OxfordMercuryiPS`` instead.
99+
100+
**Rigol**
101+
102+
- Module ``qcodes.instrument_drivers.rigol.DG1062`` is deprecated. Import from ``qcodes.instrument_drivers.rigol`` instead.
103+
- Module ``qcodes.instrument_drivers.rigol.DG4000`` is deprecated. Import from ``qcodes.instrument_drivers.rigol`` instead.
104+
- Module ``qcodes.instrument_drivers.rigol.DP821`` is deprecated. Import from ``qcodes.instrument_drivers.rigol`` instead.
105+
- Module ``qcodes.instrument_drivers.rigol.DP831`` is deprecated. Import from ``qcodes.instrument_drivers.rigol`` instead.
106+
- Module ``qcodes.instrument_drivers.rigol.DP832`` is deprecated. Import from ``qcodes.instrument_drivers.rigol`` instead.
107+
- Module ``qcodes.instrument_drivers.rigol.DS1074Z`` is deprecated. Import from ``qcodes.instrument_drivers.rigol`` instead.
108+
- Module ``qcodes.instrument_drivers.rigol.DS4000`` is deprecated. Import from ``qcodes.instrument_drivers.rigol`` instead.
109+
110+
**Rohde & Schwarz**
111+
112+
- Class ``RohdeSchwarz_SGS100A`` is deprecated. Use ``RohdeSchwarzSGS100A`` instead.
113+
114+
**Signal Hound**
115+
116+
- Class ``SignalHound_USB_SA124B`` is deprecated. Use ``SignalHoundUSBSA124B`` instead.
117+
118+
**Stanford Research Systems**
119+
120+
- Class ``SRS_SG384`` is deprecated. Use ``SG384`` instead.
121+
122+
**Tektronix**
123+
124+
- Class ``AWG5208`` is deprecated. Use ``TektronixAWG5208`` instead.
125+
- Class ``AWG70002A`` is deprecated. Use ``TektronixAWG70002A`` instead.
126+
- Class ``AWGChannel`` is deprecated. Use ``Tektronix70000AWGChannel`` instead.
127+
- Class ``Tektronix_AWG5014`` is deprecated. Use ``TektronixAWG5014`` instead.
128+
- Class ``ModeError`` is deprecated. Use ``TektronixDPOModeError`` instead.
129+
130+
**Weinschel**
131+
132+
- Class ``Weinschel_8320`` is deprecated. Use ``Weinschel8320`` instead.
133+
134+
**Yokogawa**
135+
136+
- Class ``GS200Exception`` is deprecated. Use ``YokogawaGS200Exception`` instead.
137+
- Class ``GS200_Monitor`` is deprecated. Use ``YokogawaGS200Monitor`` instead.
138+
- Class ``GS200Program`` is deprecated. Use ``YokogawaGS200Program`` instead.
139+
- Class ``GS200`` is deprecated. Use ``YokogawaGS200`` instead.

src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/qcodes/instrument_drivers/AlazarTech/ATS9360.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
import numpy as np
44
from packaging import version
5+
from typing_extensions import deprecated
56

67
from qcodes import validators
8+
from qcodes.utils.deprecate import QCoDeSDeprecationWarning
79

810
from .ATS import AlazarTechATS
911
from .utils import TraceParameter
@@ -482,6 +484,11 @@ def _set_trigger_holdoff(self, value: bool) -> None:
482484
self._write_register(58, int(new_value))
483485

484486

487+
@deprecated(
488+
"AlazarTech_ATS9360 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9360 instead.",
489+
category=QCoDeSDeprecationWarning,
490+
stacklevel=1,
491+
)
485492
class AlazarTech_ATS9360(AlazarTechATS9360):
486493
"""
487494
Alias for backwards compatibility. Will eventually be deprecated and removed

src/qcodes/instrument_drivers/AlazarTech/ATS9373.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
import numpy as np
44
from packaging import version
5+
from typing_extensions import deprecated
56

67
from qcodes import validators
78
from qcodes.instrument_drivers.AlazarTech.ATS import AlazarTechATS
89
from qcodes.instrument_drivers.AlazarTech.utils import TraceParameter
10+
from qcodes.utils.deprecate import QCoDeSDeprecationWarning
911

1012
if TYPE_CHECKING:
1113
from qcodes.parameters import Parameter
@@ -497,6 +499,11 @@ def _set_trigger_holdoff(self, value: bool) -> None:
497499
self._write_register(58, int(new_value))
498500

499501

502+
@deprecated(
503+
"AlazarTech_ATS9373 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9373 instead.",
504+
category=QCoDeSDeprecationWarning,
505+
stacklevel=1,
506+
)
500507
class AlazarTech_ATS9373(AlazarTechATS9373):
501508
"""
502509
Alias for backwards compatibility. Will eventually be deprecated and removed

src/qcodes/instrument_drivers/AlazarTech/ATS9440.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from typing import TYPE_CHECKING, Any
22

3+
from typing_extensions import deprecated
4+
35
from qcodes import validators
6+
from qcodes.utils.deprecate import QCoDeSDeprecationWarning
47

58
from .ATS import AlazarTechATS
69
from .utils import TraceParameter
@@ -397,6 +400,11 @@ def __init__(
397400
"""Parameter buffer_timeout"""
398401

399402

403+
@deprecated(
404+
"AlazarTech_ATS9440 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9440 instead.",
405+
category=QCoDeSDeprecationWarning,
406+
stacklevel=1,
407+
)
400408
class AlazarTech_ATS9440(AlazarTechATS9440):
401409
"""
402410
Alias for backwards compatibility. Will eventually be deprecated and removed

src/qcodes/instrument_drivers/AlazarTech/ATS9870.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from typing import TYPE_CHECKING, Any
22

3+
from typing_extensions import deprecated
4+
35
from qcodes import validators
6+
from qcodes.utils.deprecate import QCoDeSDeprecationWarning
47

58
from .ATS import AlazarTechATS
69
from .utils import TraceParameter
@@ -405,6 +408,11 @@ def __init__(
405408
)
406409

407410

411+
@deprecated(
412+
"AlazarTech_ATS9870 is deprecated. Please use qcodes.instrument_drivers.AlazarTech.AlazarTechATS9870 instead.",
413+
category=QCoDeSDeprecationWarning,
414+
stacklevel=1,
415+
)
408416
class AlazarTech_ATS9870(AlazarTechATS9870):
409417
"""
410418
Alias for backwards compatibility. Will eventually be deprecated and removed

src/qcodes/instrument_drivers/AlazarTech/ATS_acquisition_controllers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
import numpy as np
55
import numpy.typing as npt
6+
from typing_extensions import deprecated
7+
8+
from qcodes.utils.deprecate import QCoDeSDeprecationWarning
69

710
from .ATS import AcquisitionController
811

@@ -166,6 +169,11 @@ def fit(self, buf: npt.NDArray) -> tuple[float, float]:
166169
return ampl, math.atan2(ImPart, RePart) * 360 / (2 * math.pi)
167170

168171

172+
@deprecated(
173+
"Demodulation_AcquisitionController is deprecated. Please use qcodes.instrument_drivers.AlazarTech.DemodulationAcquisitionController instead.",
174+
category=QCoDeSDeprecationWarning,
175+
stacklevel=1,
176+
)
169177
class Demodulation_AcquisitionController(DemodulationAcquisitionController):
170178
"""
171179
Alias for backwards compatibility. Will eventually be deprecated and removed

src/qcodes/instrument_drivers/Galil/dmc_41x3.py

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
import numpy as np
1010
import numpy.typing as npt
11+
from typing_extensions import deprecated
1112

1213
from qcodes.instrument import Instrument, InstrumentBaseKWArgs, InstrumentChannel
14+
from qcodes.utils.deprecate import QCoDeSDeprecationWarning
1315
from qcodes.validators import Enum, Ints, Multiples
1416

1517
if TYPE_CHECKING:
@@ -248,10 +250,17 @@ def clear_sequence(self, coord_sys: str) -> None:
248250
self.write(f"CS {coord_sys}")
249251

250252

251-
VectorMode = GalilDMC4133VectorMode
252-
"""
253-
Alias for backwards compatibility
254-
"""
253+
@deprecated(
254+
"VectorMode is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133VectorMode instead.",
255+
category=QCoDeSDeprecationWarning,
256+
stacklevel=1,
257+
)
258+
class VectorMode(GalilDMC4133VectorMode):
259+
"""
260+
Alias for backwards compatibility
261+
"""
262+
263+
pass
255264

256265

257266
class GalilDMC4133Motor(InstrumentChannel["GalilDMC4133Controller"]):
@@ -470,10 +479,17 @@ def error_magnitude(self) -> float:
470479
return float(self.ask(f"QS{self._axis}=?"))
471480

472481

473-
Motor = GalilDMC4133Motor
474-
"""
475-
Alias for backwards compatibility
476-
"""
482+
@deprecated(
483+
"Motor is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133Motor instead.",
484+
category=QCoDeSDeprecationWarning,
485+
stacklevel=1,
486+
)
487+
class Motor(GalilDMC4133Motor):
488+
"""
489+
Alias for backwards compatibility
490+
"""
491+
492+
pass
477493

478494

479495
class GalilDMC4133Controller(GalilMotionController):
@@ -629,10 +645,17 @@ def wait_till_motion_complete(self) -> None:
629645
self.motors_off()
630646

631647

632-
DMC4133Controller = GalilDMC4133Controller
633-
"""
634-
Alias for backwards compatibility
635-
"""
648+
@deprecated(
649+
"DMC4133Controller is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133Controller instead.",
650+
category=QCoDeSDeprecationWarning,
651+
stacklevel=1,
652+
)
653+
class DMC4133Controller(GalilDMC4133Controller):
654+
"""
655+
Alias for backwards compatibility
656+
"""
657+
658+
pass
636659

637660

638661
class GalilDMC4133Arm:
@@ -1145,7 +1168,14 @@ def _calculate_vector_component(vec: float, val: int) -> int:
11451168
return return_val
11461169

11471170

1148-
Arm = GalilDMC4133Arm
1149-
"""
1150-
Alias for backwards compatibility
1151-
"""
1171+
@deprecated(
1172+
"Arm is deprecated. Please use qcodes.instrument_drivers.Galil.GalilDMC4133Arm instead.",
1173+
category=QCoDeSDeprecationWarning,
1174+
stacklevel=1,
1175+
)
1176+
class Arm(GalilDMC4133Arm):
1177+
"""
1178+
Alias for backwards compatibility
1179+
"""
1180+
1181+
pass

src/qcodes/instrument_drivers/HP/HP8133A.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
22
Module left for backwards compatibility. Will be deprecated and removed eventually.
33
"""
44

5+
import warnings
6+
7+
from qcodes.utils import QCoDeSDeprecationWarning
8+
59
from .HP_8133A import HP8133A
10+
11+
warnings.warn(
12+
"The `qcodes._drivers.HP.HP8133A` module is deprecated. "
13+
"Please import drivers from from `qcodes.instrument_drivers.HP` instead.",
14+
category=QCoDeSDeprecationWarning,
15+
stacklevel=2,
16+
)

src/qcodes/instrument_drivers/HP/HP8753D.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
22
Module left for backwards compatibility. Will be deprecated and removed eventually.
33
"""
44

5+
import warnings
6+
7+
from qcodes.utils import QCoDeSDeprecationWarning
8+
59
from .HP_8753D import HP8753D
10+
11+
warnings.warn(
12+
"The `qcodes._drivers.HP.HP8753D` module is deprecated. "
13+
"Please import drivers from from `qcodes.instrument_drivers.HP` instead.",
14+
category=QCoDeSDeprecationWarning,
15+
stacklevel=2,
16+
)

0 commit comments

Comments
 (0)