qblox-instruments 1.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qblox_instruments/__init__.py +42 -0
- qblox_instruments/_deprecation.py +153 -0
- qblox_instruments/assemblers/q1asm_linux +0 -0
- qblox_instruments/assemblers/q1asm_macos +0 -0
- qblox_instruments/assemblers/q1asm_windows.exe +0 -0
- qblox_instruments/build.py +1348 -0
- qblox_instruments/cfg_man/__init__.py +5 -0
- qblox_instruments/cfg_man/const.py +5 -0
- qblox_instruments/cfg_man/log.py +268 -0
- qblox_instruments/cfg_man/main.py +1943 -0
- qblox_instruments/cfg_man/pnp_connection.py +114 -0
- qblox_instruments/cfg_man/probe.py +709 -0
- qblox_instruments/cfg_man/scpi_connection.py +510 -0
- qblox_instruments/cfg_man/update_file.py +703 -0
- qblox_instruments/constants.py +121 -0
- qblox_instruments/docstring_helpers.py +296 -0
- qblox_instruments/exceptions.py +35 -0
- qblox_instruments/ieee488_2/__init__.py +18 -0
- qblox_instruments/ieee488_2/cluster_dummy_transport.py +586 -0
- qblox_instruments/ieee488_2/dummy_transport.py +646 -0
- qblox_instruments/ieee488_2/helpers.py +48 -0
- qblox_instruments/ieee488_2/ieee488_2.py +781 -0
- qblox_instruments/ieee488_2/ip_transport.py +273 -0
- qblox_instruments/ieee488_2/module_dummy_transport.py +3250 -0
- qblox_instruments/ieee488_2/transport.py +251 -0
- qblox_instruments/native/__init__.py +16 -0
- qblox_instruments/native/cluster.py +5777 -0
- qblox_instruments/native/cluster_legacy.py +4060 -0
- qblox_instruments/native/definitions.py +802 -0
- qblox_instruments/native/helpers.py +858 -0
- qblox_instruments/native/routing/__init__.py +2 -0
- qblox_instruments/native/routing/cmm_router.py +513 -0
- qblox_instruments/native/routing/module_router.py +161 -0
- qblox_instruments/native/spi_rack.py +250 -0
- qblox_instruments/native/spi_rack_modules/__init__.py +17 -0
- qblox_instruments/native/spi_rack_modules/d5a_module.py +435 -0
- qblox_instruments/native/spi_rack_modules/s4g_module.py +411 -0
- qblox_instruments/native/spi_rack_modules/spi_module_base.py +50 -0
- qblox_instruments/pnp/__init__.py +8 -0
- qblox_instruments/pnp/main.py +1175 -0
- qblox_instruments/pnp/resolve.py +459 -0
- qblox_instruments/qcodes_drivers/__init__.py +11 -0
- qblox_instruments/qcodes_drivers/async_parameter.py +143 -0
- qblox_instruments/qcodes_drivers/cached_set_parameter.py +112 -0
- qblox_instruments/qcodes_drivers/cluster.py +871 -0
- qblox_instruments/qcodes_drivers/compat.py +25 -0
- qblox_instruments/qcodes_drivers/component.py +26 -0
- qblox_instruments/qcodes_drivers/frequency_parameter.py +16 -0
- qblox_instruments/qcodes_drivers/io_channel_qsm.py +448 -0
- qblox_instruments/qcodes_drivers/io_channel_qtm.py +466 -0
- qblox_instruments/qcodes_drivers/io_pulse_channel.py +125 -0
- qblox_instruments/qcodes_drivers/misc_validators.py +43 -0
- qblox_instruments/qcodes_drivers/module.py +2236 -0
- qblox_instruments/qcodes_drivers/quad.py +163 -0
- qblox_instruments/qcodes_drivers/real_mode_validators.py +246 -0
- qblox_instruments/qcodes_drivers/registration_mixin.py +122 -0
- qblox_instruments/qcodes_drivers/sequencer.py +1206 -0
- qblox_instruments/qcodes_drivers/spi_rack.py +169 -0
- qblox_instruments/qcodes_drivers/spi_rack_modules/__init__.py +15 -0
- qblox_instruments/qcodes_drivers/spi_rack_modules/d5a_module.py +185 -0
- qblox_instruments/qcodes_drivers/spi_rack_modules/s4g_module.py +182 -0
- qblox_instruments/qcodes_drivers/spi_rack_modules/spi_module_base.py +57 -0
- qblox_instruments/qcodes_drivers/time.py +504 -0
- qblox_instruments/qcodes_drivers/truth_table.py +339 -0
- qblox_instruments/scpi/__init__.py +10 -0
- qblox_instruments/scpi/cluster.py +228 -0
- qblox_instruments/scpi/error_check.py +7 -0
- qblox_instruments/scpi/layers/__init__.py +53 -0
- qblox_instruments/scpi/layers/cfg_man.py +896 -0
- qblox_instruments/scpi/layers/cluster_mm_1_0.py +14498 -0
- qblox_instruments/scpi/layers/cluster_mm_1_1.py +10949 -0
- qblox_instruments/scpi/layers/cluster_mm_1_2.py +11503 -0
- qblox_instruments/scpi/layers/cluster_mm_legacy.py +13516 -0
- qblox_instruments/scpi/scpi.py +237 -0
- qblox_instruments/simulations/__init__.py +22 -0
- qblox_instruments/simulations/predistortions.py +185 -0
- qblox_instruments/types.py +589 -0
- qblox_instruments-1.4.2.dist-info/METADATA +84 -0
- qblox_instruments-1.4.2.dist-info/RECORD +82 -0
- qblox_instruments-1.4.2.dist-info/WHEEL +4 -0
- qblox_instruments-1.4.2.dist-info/entry_points.txt +3 -0
- qblox_instruments-1.4.2.dist-info/licenses/LICENSES/BSD-4-Clause.txt +28 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: © 2020 Qblox <https://qblox.com>
|
|
2
|
+
# SPDX-License-Identifier: BSD-4-Clause
|
|
3
|
+
|
|
4
|
+
from qblox_instruments.build import (
|
|
5
|
+
BuildInfo,
|
|
6
|
+
DeviceBuildInfo,
|
|
7
|
+
DeviceInfo,
|
|
8
|
+
get_build_info,
|
|
9
|
+
__version__,
|
|
10
|
+
)
|
|
11
|
+
from qblox_instruments.types import (
|
|
12
|
+
ClusterType,
|
|
13
|
+
InstrumentClass,
|
|
14
|
+
InstrumentType,
|
|
15
|
+
TypeHandle,
|
|
16
|
+
)
|
|
17
|
+
from qblox_instruments.cfg_man import ConfigurationManager, get_device_info
|
|
18
|
+
from qblox_instruments.pnp import PlugAndPlay, resolve, AddressInfo, PortsInfo
|
|
19
|
+
from qblox_instruments.native.definitions import (
|
|
20
|
+
SequencerStates,
|
|
21
|
+
SequencerStatus,
|
|
22
|
+
SequencerStatusFlags,
|
|
23
|
+
SequencerStatuses,
|
|
24
|
+
SystemStatus,
|
|
25
|
+
SystemStatusFlags,
|
|
26
|
+
SystemStatusSlotFlags,
|
|
27
|
+
SystemStatuses,
|
|
28
|
+
)
|
|
29
|
+
from qblox_instruments.qcodes_drivers import (
|
|
30
|
+
Cluster,
|
|
31
|
+
IOChannelQSM,
|
|
32
|
+
IOChannelQTM,
|
|
33
|
+
Module,
|
|
34
|
+
Quad,
|
|
35
|
+
Sequencer,
|
|
36
|
+
SpiRack,
|
|
37
|
+
TruthTable,
|
|
38
|
+
)
|
|
39
|
+
from qblox_instruments.ieee488_2 import (
|
|
40
|
+
DummyBinnedAcquisitionData,
|
|
41
|
+
DummyScopeAcquisitionData,
|
|
42
|
+
)
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: © 2026 Qblox <https://qblox.com>
|
|
2
|
+
# SPDX-License-Identifier: BSD-4-Clause
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import functools
|
|
6
|
+
import inspect
|
|
7
|
+
import warnings
|
|
8
|
+
from collections.abc import Callable
|
|
9
|
+
from functools import wraps
|
|
10
|
+
from typing import Any, TypeVar
|
|
11
|
+
|
|
12
|
+
F = TypeVar("F", bound=Callable[..., Any])
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def deprecate_positional_args_from(param_name: str) -> Callable[[F], F]:
|
|
16
|
+
"""
|
|
17
|
+
Decorator to warn when arguments from `param_name` onwards are passed positionally.
|
|
18
|
+
Prepares users for a future version where a `*` will be inserted before `param_name`.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def decorator(func: F) -> F:
|
|
22
|
+
# Inspect the function to get a copy of its parameter names
|
|
23
|
+
sig = inspect.signature(func)
|
|
24
|
+
all_params = list(sig.parameters.keys())
|
|
25
|
+
|
|
26
|
+
# Find the index of the first parameter that should be kw-only
|
|
27
|
+
try:
|
|
28
|
+
cutoff_index = all_params.index(param_name)
|
|
29
|
+
except ValueError:
|
|
30
|
+
raise ValueError(f"Parameter '{param_name}' not found in {func.__name__}") from None
|
|
31
|
+
|
|
32
|
+
@wraps(func)
|
|
33
|
+
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
34
|
+
if len(args) > cutoff_index:
|
|
35
|
+
# Find which should-be kw-only parameters were passed positionally
|
|
36
|
+
offending_params = all_params[cutoff_index : len(args)]
|
|
37
|
+
func_or_class_name = (
|
|
38
|
+
func.__name__ if func.__name__ != "__init__" else args[0].__class__.__name__
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
warnings.warn(
|
|
42
|
+
f"Passing {', '.join(offending_params)} positionally to {func_or_class_name}() "
|
|
43
|
+
f"is deprecated and will raise an error in a future version. "
|
|
44
|
+
f"Please use keyword arguments (e.g., {offending_params[0]}=...).",
|
|
45
|
+
category=FutureWarning,
|
|
46
|
+
stacklevel=2,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
# Call the original function
|
|
50
|
+
return func(*args, **kwargs)
|
|
51
|
+
|
|
52
|
+
return wrapper
|
|
53
|
+
|
|
54
|
+
return decorator
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _find_stack_level() -> int:
|
|
58
|
+
"""
|
|
59
|
+
Find the first place in the stack that is not inside qblox-scheduler.
|
|
60
|
+
|
|
61
|
+
Returns
|
|
62
|
+
-------
|
|
63
|
+
:
|
|
64
|
+
The stack level
|
|
65
|
+
|
|
66
|
+
"""
|
|
67
|
+
frame = inspect.currentframe()
|
|
68
|
+
if frame is None:
|
|
69
|
+
return 1
|
|
70
|
+
|
|
71
|
+
stack = inspect.getouterframes(frame)
|
|
72
|
+
for i, frame_info in enumerate(stack):
|
|
73
|
+
if "qblox_scheduler" not in frame_info.filename:
|
|
74
|
+
return max(1, i - 1)
|
|
75
|
+
return 1
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def deprecated(
|
|
79
|
+
drop_version: str,
|
|
80
|
+
message_or_alias: str | Callable,
|
|
81
|
+
) -> Callable:
|
|
82
|
+
"""
|
|
83
|
+
A decorator for deprecating classes and methods.
|
|
84
|
+
|
|
85
|
+
Parameters
|
|
86
|
+
----------
|
|
87
|
+
drop_version
|
|
88
|
+
A version of the package when the deprecated function or class will be dropped.
|
|
89
|
+
message_or_alias
|
|
90
|
+
Either an instruction about the usage of deprecated calls (string),
|
|
91
|
+
or the new drop-in replacement to the deprecated class or function (callable).
|
|
92
|
+
|
|
93
|
+
Returns
|
|
94
|
+
-------
|
|
95
|
+
:
|
|
96
|
+
The decorated function or class
|
|
97
|
+
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
def decorator(obj: Callable) -> Callable:
|
|
101
|
+
if callable(message_or_alias):
|
|
102
|
+
new_obj = message_or_alias
|
|
103
|
+
if isinstance(obj, type):
|
|
104
|
+
new_obj.__name__ = obj.__name__
|
|
105
|
+
new_obj.__qualname__ = obj.__qualname__
|
|
106
|
+
else:
|
|
107
|
+
new_obj.__name__ = obj.__name__
|
|
108
|
+
new_obj.__qualname__ = obj.__qualname__
|
|
109
|
+
|
|
110
|
+
@functools.wraps(obj)
|
|
111
|
+
def wrapper_func(*args, **kwargs): # noqa: ANN202
|
|
112
|
+
warnings.warn(
|
|
113
|
+
f"{obj.__name__} is deprecated and will be removed in "
|
|
114
|
+
f"qblox-instruments>={drop_version}. Use {new_obj.__name__} instead.",
|
|
115
|
+
category=FutureWarning,
|
|
116
|
+
stacklevel=_find_stack_level(),
|
|
117
|
+
)
|
|
118
|
+
return new_obj(*args, **kwargs)
|
|
119
|
+
|
|
120
|
+
return wrapper_func
|
|
121
|
+
else:
|
|
122
|
+
msg = message_or_alias
|
|
123
|
+
|
|
124
|
+
if isinstance(obj, type):
|
|
125
|
+
original_init = obj.__init__
|
|
126
|
+
|
|
127
|
+
@functools.wraps(original_init)
|
|
128
|
+
def new_init(self, *args, **kwargs) -> None:
|
|
129
|
+
warnings.warn(
|
|
130
|
+
f"{obj.__name__} is deprecated and will be removed in "
|
|
131
|
+
f"qblox-instruments>={drop_version}. {msg}",
|
|
132
|
+
category=FutureWarning,
|
|
133
|
+
stacklevel=_find_stack_level(),
|
|
134
|
+
)
|
|
135
|
+
original_init(self, *args, **kwargs)
|
|
136
|
+
|
|
137
|
+
obj.__init__ = new_init
|
|
138
|
+
return obj
|
|
139
|
+
else:
|
|
140
|
+
|
|
141
|
+
@functools.wraps(obj)
|
|
142
|
+
def wrapper_class(*args, **kwargs): # noqa: ANN202
|
|
143
|
+
warnings.warn(
|
|
144
|
+
f"{obj.__name__} is deprecated and will be removed in "
|
|
145
|
+
f"qblox-instruments>={drop_version}. {msg}",
|
|
146
|
+
category=FutureWarning,
|
|
147
|
+
stacklevel=_find_stack_level(),
|
|
148
|
+
)
|
|
149
|
+
return obj(*args, **kwargs)
|
|
150
|
+
|
|
151
|
+
return wrapper_class
|
|
152
|
+
|
|
153
|
+
return decorator
|
|
Binary file
|
|
Binary file
|
|
Binary file
|