ionpulse_sequence_generator 2.8.0__cp313-cp313-win_amd64.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.
- ionpulse_sequence_generator/__init__.pyi +24 -0
- ionpulse_sequence_generator/base/__init__.pyi +1 -0
- ionpulse_sequence_generator/base/configuration.pyi +8 -0
- ionpulse_sequence_generator/base/header.pyi +17 -0
- ionpulse_sequence_generator/base/jsonexportable.pyi +52 -0
- ionpulse_sequence_generator/event/__init__.pyi +1 -0
- ionpulse_sequence_generator/event/ddspidstatechange.pyi +18 -0
- ionpulse_sequence_generator/event/dioevent.pyi +17 -0
- ionpulse_sequence_generator/event/event.pyi +29 -0
- ionpulse_sequence_generator/event/multitonerfevent.pyi +29 -0
- ionpulse_sequence_generator/event/qubitevent.pyi +20 -0
- ionpulse_sequence_generator/event/readout.pyi +63 -0
- ionpulse_sequence_generator/event/singletonerfevent.pyi +30 -0
- ionpulse_sequence_generator/event/wait.pyi +17 -0
- ionpulse_sequence_generator/event/waveform.pyi +16 -0
- ionpulse_sequence_generator/hardware/__init__.pyi +1 -0
- ionpulse_sequence_generator/hardware/channel.pyi +53 -0
- ionpulse_sequence_generator/hardware/device.pyi +86 -0
- ionpulse_sequence_generator/hardware/hardware.pyi +177 -0
- ionpulse_sequence_generator/hardware/readout.pyi +114 -0
- ionpulse_sequence_generator/hardware/system.pyi +58 -0
- ionpulse_sequence_generator/hardware/units.pyi +39 -0
- ionpulse_sequence_generator/parameter/__init__.pyi +1 -0
- ionpulse_sequence_generator/parameter/acquisition_setup.pyi +31 -0
- ionpulse_sequence_generator/parameter/parameter.pyi +197 -0
- ionpulse_sequence_generator/parameter/pid_parameter.pyi +67 -0
- ionpulse_sequence_generator/parameter/spline_parameter.pyi +74 -0
- ionpulse_sequence_generator/py.typed +0 -0
- ionpulse_sequence_generator/sequence/__init__.pyi +1 -0
- ionpulse_sequence_generator/sequence/conditional.pyi +29 -0
- ionpulse_sequence_generator/sequence/loop.pyi +27 -0
- ionpulse_sequence_generator/sequence/sequence.pyi +114 -0
- ionpulse_sequence_generator/utils/__init__.pyi +1 -0
- ionpulse_sequence_generator/utils/logging.pyi +24 -0
- ionpulse_sequence_generator/utils/utils.pyi +10 -0
- ionpulse_sequence_generator-2.8.0.dist-info/METADATA +75 -0
- ionpulse_sequence_generator-2.8.0.dist-info/RECORD +41 -0
- ionpulse_sequence_generator-2.8.0.dist-info/WHEEL +4 -0
- ionpulse_sequence_generator-2.8.0.dist-info/licenses/AUTHORS.md +17 -0
- ionpulse_sequence_generator-2.8.0.dist-info/licenses/LICENSE +56 -0
- ionpulse_sequence_generator.cp313-win_amd64.pyd +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from .base.header import Header
|
|
3
|
+
from .event.ddspidstatechange import DDSPIDStateChange
|
|
4
|
+
from .event.dioevent import DIOEvent
|
|
5
|
+
from .event.event import Event
|
|
6
|
+
from .event.multitonerfevent import MultiToneRFEvent
|
|
7
|
+
from .event.readout import Discriminator, DiscriminatorType, PopCameraFIFO, PopPMTFIFO
|
|
8
|
+
from .event.singletonerfevent import SingleToneRFEvent
|
|
9
|
+
from .event.wait import Wait
|
|
10
|
+
from .event.waveform import WaveformEvent
|
|
11
|
+
from .hardware.channel import ChannelMask
|
|
12
|
+
from .hardware.device import DeviceRole, FastinoRack, MACTIONRack, QuenchRFSoC
|
|
13
|
+
from .hardware.hardware import DDSADCHardware, DDSHardware, DIOHardware, Domain, FastinoHardware, QuenchADCHardware, QuenchHardware
|
|
14
|
+
from .hardware.readout import CameraChannel, PMTChannel, PlotWindow, PlotWindowType, Readout, ReadoutChannel, ReadoutPostprocessingMethod, ShotChannel, VectorChannel
|
|
15
|
+
from .hardware.system import System
|
|
16
|
+
from .hardware.units import Unit, Units
|
|
17
|
+
from .parameter.acquisition_setup import AcquisitionSource, QuenchAcquisitionSetup
|
|
18
|
+
from .parameter.parameter import Amp, Freq, Phase, Time
|
|
19
|
+
from .parameter.pid_parameter import DDSPIDParameter, PidCoreMask, PidLowPassResponse, QuenchPIDParameter
|
|
20
|
+
from .parameter.spline_parameter import AmpSpline, FreqSpline, PhaseSpline
|
|
21
|
+
from .sequence.conditional import ConditionalSequence
|
|
22
|
+
from .sequence.loop import LoopSequence
|
|
23
|
+
from .sequence.sequence import LinearSequence, Sequence
|
|
24
|
+
__all__ = ['AcquisitionSource', 'Amp', 'AmpSpline', 'CameraChannel', 'ChannelMask', 'ConditionalSequence', 'DDSADCHardware', 'DDSHardware', 'DDSPIDParameter', 'DDSPIDStateChange', 'DIOEvent', 'DIOHardware', 'DeviceRole', 'Discriminator', 'DiscriminatorType', 'Domain', 'Event', 'FastinoHardware', 'FastinoRack', 'Freq', 'FreqSpline', 'Header', 'LinearSequence', 'LoopSequence', 'MACTIONRack', 'MultiToneRFEvent', 'PMTChannel', 'Phase', 'PhaseSpline', 'PidCoreMask', 'PidLowPassResponse', 'PlotWindow', 'PlotWindowType', 'PopCameraFIFO', 'PopPMTFIFO', 'QuenchADCHardware', 'QuenchAcquisitionSetup', 'QuenchHardware', 'QuenchPIDParameter', 'QuenchRFSoC', 'Readout', 'ReadoutChannel', 'ReadoutPostprocessingMethod', 'Sequence', 'ShotChannel', 'SingleToneRFEvent', 'System', 'Time', 'Unit', 'Units', 'VectorChannel', 'Wait', 'WaveformEvent']
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
...
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
logger = ...
|
|
3
|
+
|
|
4
|
+
class Header:
|
|
5
|
+
typename = ...
|
|
6
|
+
|
|
7
|
+
def __init__(self, debug_level: int=...) -> None:
|
|
8
|
+
...
|
|
9
|
+
|
|
10
|
+
def add_field(self, name: str, value: Any) -> None:
|
|
11
|
+
...
|
|
12
|
+
|
|
13
|
+
def set_shots(self, shots: int):
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
def to_json(self) -> dict[str, Any]:
|
|
17
|
+
...
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from typing import Any, ClassVar
|
|
2
|
+
logger = ...
|
|
3
|
+
configuration = ...
|
|
4
|
+
json_indent = ...
|
|
5
|
+
garbage_collection_warning_threshold = ...
|
|
6
|
+
|
|
7
|
+
def to_tuple(d: list[Any] | tuple[Any] | dict[Any, Any], use_idx: bool=...) -> tuple[Any, ...]:
|
|
8
|
+
...
|
|
9
|
+
|
|
10
|
+
class JSONexportable:
|
|
11
|
+
__slots__ = ...
|
|
12
|
+
typename: str = ...
|
|
13
|
+
|
|
14
|
+
def __init__(self, name: str | None) -> None:
|
|
15
|
+
...
|
|
16
|
+
|
|
17
|
+
def content_v(self) -> tuple:
|
|
18
|
+
...
|
|
19
|
+
|
|
20
|
+
def content_k(self) -> tuple:
|
|
21
|
+
...
|
|
22
|
+
|
|
23
|
+
def get_content(self) -> dict[str, Any]:
|
|
24
|
+
...
|
|
25
|
+
|
|
26
|
+
def to_json(self) -> dict[str, Any]:
|
|
27
|
+
...
|
|
28
|
+
|
|
29
|
+
def to_json_member(self):
|
|
30
|
+
...
|
|
31
|
+
|
|
32
|
+
def __eq__(self, other) -> bool:
|
|
33
|
+
...
|
|
34
|
+
|
|
35
|
+
def to_tuple(self) -> tuple:
|
|
36
|
+
...
|
|
37
|
+
|
|
38
|
+
def __hash__(self) -> int:
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def clear(cls) -> None:
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
def mark(self) -> None:
|
|
46
|
+
...
|
|
47
|
+
|
|
48
|
+
def register(self) -> JSONexportable:
|
|
49
|
+
...
|
|
50
|
+
|
|
51
|
+
def __repr__(self) -> str:
|
|
52
|
+
...
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
...
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
2
|
+
from ionpulse_sequence_generator.hardware.hardware import DDSHardware
|
|
3
|
+
from ionpulse_sequence_generator.parameter.parameter import Time
|
|
4
|
+
from .wait import Wait
|
|
5
|
+
logger = ...
|
|
6
|
+
system = ...
|
|
7
|
+
|
|
8
|
+
class DDSPIDStateChange(Wait):
|
|
9
|
+
__slots__ = ...
|
|
10
|
+
|
|
11
|
+
def __init__(self, name: str, ch_idx: ChannelMask, time: Time, state: DDSHardware.PIDStateChangeType, wait_for_trigger=...) -> None:
|
|
12
|
+
...
|
|
13
|
+
|
|
14
|
+
def content_v(self) -> tuple:
|
|
15
|
+
...
|
|
16
|
+
|
|
17
|
+
def content_k(self) -> tuple:
|
|
18
|
+
...
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
2
|
+
from ionpulse_sequence_generator.parameter.parameter import Time
|
|
3
|
+
from .event import Event
|
|
4
|
+
logger = ...
|
|
5
|
+
system = ...
|
|
6
|
+
|
|
7
|
+
class DIOEvent(Event):
|
|
8
|
+
__slots__ = ...
|
|
9
|
+
|
|
10
|
+
def __init__(self, name: str, ch_idx: ChannelMask, time: Time, output_state: int, output_mask: int, input_gate_state: int, input_gate_mask: int) -> None:
|
|
11
|
+
...
|
|
12
|
+
|
|
13
|
+
def content_v(self) -> tuple:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
def content_k(self) -> tuple:
|
|
17
|
+
...
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from typing import Any, ClassVar
|
|
2
|
+
from ionpulse_sequence_generator.base.jsonexportable import JSONexportable
|
|
3
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
4
|
+
from ionpulse_sequence_generator.parameter.parameter import Time
|
|
5
|
+
logger = ...
|
|
6
|
+
system = ...
|
|
7
|
+
configuration = ...
|
|
8
|
+
|
|
9
|
+
class Event(JSONexportable):
|
|
10
|
+
__slots__ = ...
|
|
11
|
+
typename = ...
|
|
12
|
+
|
|
13
|
+
def __init__(self, name: str, ch_mask: ChannelMask, time: Time | None) -> None:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
def get_time(self) -> Time:
|
|
17
|
+
...
|
|
18
|
+
|
|
19
|
+
def get_post_time(self) -> Time:
|
|
20
|
+
...
|
|
21
|
+
|
|
22
|
+
def content_v(self) -> tuple:
|
|
23
|
+
...
|
|
24
|
+
|
|
25
|
+
def content_k(self) -> tuple:
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
def mark(self) -> None:
|
|
29
|
+
...
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
3
|
+
from ionpulse_sequence_generator.parameter.parameter import Amp, Freq, Phase, Time
|
|
4
|
+
from ionpulse_sequence_generator.parameter.spline_parameter import AmpSpline, FreqSpline, PhaseSpline
|
|
5
|
+
from .event import Event
|
|
6
|
+
from ionpulse_sequence_generator.parameter.pid_parameter import PidCoreMask
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
...
|
|
9
|
+
logger = ...
|
|
10
|
+
system = ...
|
|
11
|
+
configuration = ...
|
|
12
|
+
|
|
13
|
+
class MultiToneRFEvent(Event):
|
|
14
|
+
__slots__ = ...
|
|
15
|
+
|
|
16
|
+
def __init__(self, name: str, ch_idx: ChannelMask, freqs: list[Freq | FreqSpline], phases: list[Phase | PhaseSpline], amps: list[Amp | AmpSpline], time: Time) -> None:
|
|
17
|
+
...
|
|
18
|
+
|
|
19
|
+
def content_v(self) -> tuple:
|
|
20
|
+
...
|
|
21
|
+
|
|
22
|
+
def content_k(self) -> tuple:
|
|
23
|
+
...
|
|
24
|
+
|
|
25
|
+
def mark(self) -> None:
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
def set_pid_reference(self, pid_core: PidCoreMask, pid_reset: bool, pid_hold: bool, ref_v: Amp | AmpSpline) -> MultiToneRFEvent:
|
|
29
|
+
...
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
2
|
+
from ionpulse_sequence_generator.parameter.parameter import Freq, Phase, Time
|
|
3
|
+
from .event import Event
|
|
4
|
+
logger = ...
|
|
5
|
+
system = ...
|
|
6
|
+
|
|
7
|
+
class QubitEvent(Event):
|
|
8
|
+
__slots__ = ...
|
|
9
|
+
|
|
10
|
+
def __init__(self, name: str, ch_idx: ChannelMask, freq: Freq, phase: Phase, time: Time, flags: int=...) -> None:
|
|
11
|
+
...
|
|
12
|
+
|
|
13
|
+
def content_v(self) -> tuple:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
def content_k(self) -> tuple:
|
|
17
|
+
...
|
|
18
|
+
|
|
19
|
+
def mark(self) -> None:
|
|
20
|
+
...
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import Any
|
|
3
|
+
from ionpulse_sequence_generator.hardware.readout import CameraChannel, PMTChannel, ReadoutChannel, ShotChannel, VectorChannel
|
|
4
|
+
from .event import Event
|
|
5
|
+
logger = ...
|
|
6
|
+
|
|
7
|
+
class ReadoutEvent(Event):
|
|
8
|
+
|
|
9
|
+
def __init__(self, name: str) -> None:
|
|
10
|
+
...
|
|
11
|
+
|
|
12
|
+
def mark(self) -> None:
|
|
13
|
+
...
|
|
14
|
+
|
|
15
|
+
class PopPMTFIFO(ReadoutEvent):
|
|
16
|
+
__slots__ = ...
|
|
17
|
+
|
|
18
|
+
def __init__(self, name: str, pmt_channel: PMTChannel, shot_channel: ShotChannel, timestamp_vector_channel: VectorChannel | None=...) -> None:
|
|
19
|
+
...
|
|
20
|
+
|
|
21
|
+
def content_v(self) -> tuple:
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
def content_k(self) -> tuple:
|
|
25
|
+
...
|
|
26
|
+
|
|
27
|
+
def to_json(self):
|
|
28
|
+
...
|
|
29
|
+
|
|
30
|
+
class DiscriminatorType(Enum):
|
|
31
|
+
RAW = ...
|
|
32
|
+
CORRECT_BACKGROUND = ...
|
|
33
|
+
THRESHOLD = ...
|
|
34
|
+
CUSTOM = ...
|
|
35
|
+
|
|
36
|
+
class Discriminator(ReadoutEvent):
|
|
37
|
+
|
|
38
|
+
def __init__(self, name: str, discriminator_type: DiscriminatorType, readout_channel: ReadoutChannel, args: dict[str, Any] | None) -> None:
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
def content_v(self) -> tuple:
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
def content_k(self) -> tuple:
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
def to_json(self):
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
class PopCameraFIFO(ReadoutEvent):
|
|
51
|
+
__slots__ = ...
|
|
52
|
+
|
|
53
|
+
def __init__(self, name: str, camera_channel: CameraChannel, ion_mask_indices: list[int], shot_channels: list[ShotChannel]) -> None:
|
|
54
|
+
...
|
|
55
|
+
|
|
56
|
+
def content_v(self) -> tuple:
|
|
57
|
+
...
|
|
58
|
+
|
|
59
|
+
def content_k(self) -> tuple:
|
|
60
|
+
...
|
|
61
|
+
|
|
62
|
+
def to_json(self):
|
|
63
|
+
...
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
2
|
+
from ionpulse_sequence_generator.hardware.units import Unit
|
|
3
|
+
from ionpulse_sequence_generator.parameter.parameter import Amp, Freq, Phase, Time
|
|
4
|
+
from .event import Event
|
|
5
|
+
logger = ...
|
|
6
|
+
system = ...
|
|
7
|
+
|
|
8
|
+
class SingleToneRFEvent(Event):
|
|
9
|
+
__slots__ = ...
|
|
10
|
+
|
|
11
|
+
def __init__(self, name: str, ch_idx: ChannelMask, freq: Freq, phase: Phase, amp: Amp, time: Time, flags: int=...) -> None:
|
|
12
|
+
...
|
|
13
|
+
|
|
14
|
+
def content_v(self) -> tuple:
|
|
15
|
+
...
|
|
16
|
+
|
|
17
|
+
def content_k(self) -> tuple:
|
|
18
|
+
...
|
|
19
|
+
|
|
20
|
+
def mark(self) -> None:
|
|
21
|
+
...
|
|
22
|
+
|
|
23
|
+
def set_slope_time(self, slope_time: Time) -> SingleToneRFEvent:
|
|
24
|
+
...
|
|
25
|
+
|
|
26
|
+
def get_time(self) -> Time:
|
|
27
|
+
...
|
|
28
|
+
|
|
29
|
+
def set_pid_reference(self, pid_ch: int, adc_ch: ChannelMask, ref_v: float, unit: Unit) -> SingleToneRFEvent:
|
|
30
|
+
...
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
2
|
+
from ionpulse_sequence_generator.parameter.parameter import Time
|
|
3
|
+
from .event import Event
|
|
4
|
+
logger = ...
|
|
5
|
+
system = ...
|
|
6
|
+
|
|
7
|
+
class Wait(Event):
|
|
8
|
+
__slots__ = ...
|
|
9
|
+
|
|
10
|
+
def __init__(self, name: str, ch_idx: ChannelMask, time: Time, wait_for_trigger=...) -> None:
|
|
11
|
+
...
|
|
12
|
+
|
|
13
|
+
def content_v(self) -> tuple:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
def content_k(self) -> tuple:
|
|
17
|
+
...
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
2
|
+
from ionpulse_sequence_generator.parameter.parameter import Time
|
|
3
|
+
from .event import Event
|
|
4
|
+
logger = ...
|
|
5
|
+
|
|
6
|
+
class WaveformEvent(Event):
|
|
7
|
+
__slots__ = ...
|
|
8
|
+
|
|
9
|
+
def __init__(self, name: str, ch_mask: ChannelMask, time: Time, waveform_id: str | int, reverse: bool, slowdown: int) -> None:
|
|
10
|
+
...
|
|
11
|
+
|
|
12
|
+
def content_v(self) -> tuple:
|
|
13
|
+
...
|
|
14
|
+
|
|
15
|
+
def content_k(self) -> tuple:
|
|
16
|
+
...
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
...
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
DEFAULT_CHANNEL = ...
|
|
2
|
+
|
|
3
|
+
class ChannelMask:
|
|
4
|
+
typename = ...
|
|
5
|
+
__slots__ = ...
|
|
6
|
+
|
|
7
|
+
def __init__(self, channels: set[int] | list[int]=...) -> None:
|
|
8
|
+
...
|
|
9
|
+
|
|
10
|
+
def __hash__(self) -> int:
|
|
11
|
+
...
|
|
12
|
+
|
|
13
|
+
def to_idx_list(self) -> list[int]:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
def is_single_channel(self) -> bool:
|
|
17
|
+
...
|
|
18
|
+
|
|
19
|
+
def contains(self, other: ChannelMask) -> bool:
|
|
20
|
+
...
|
|
21
|
+
|
|
22
|
+
def __or__(self, other: ChannelMask) -> ChannelMask:
|
|
23
|
+
...
|
|
24
|
+
|
|
25
|
+
def __eq__(self, other: ChannelMask) -> bool:
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
def __sub__(self, other: ChannelMask) -> ChannelMask:
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
def __len__(self) -> int:
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
def is_empty(self) -> bool:
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
def __and__(self, other: ChannelMask) -> ChannelMask:
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
def to_json_member(self) -> tuple:
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
def __str__(self) -> str:
|
|
44
|
+
...
|
|
45
|
+
|
|
46
|
+
def __bool__(self) -> bool:
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
def __repr__(self) -> str:
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
def __iter__(self):
|
|
53
|
+
...
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
3
|
+
from ionpulse_sequence_generator.hardware.hardware import Hardware
|
|
4
|
+
logger = ...
|
|
5
|
+
|
|
6
|
+
class DeviceRole(Enum):
|
|
7
|
+
MAIN = ...
|
|
8
|
+
SUBORDINATE = ...
|
|
9
|
+
|
|
10
|
+
class Device:
|
|
11
|
+
__slots__ = ...
|
|
12
|
+
|
|
13
|
+
def __init__(self, name: str, role: DeviceRole, is_async: bool=...) -> None:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
def __getitem__(self, hardware_type: type[Hardware]) -> Hardware:
|
|
17
|
+
...
|
|
18
|
+
|
|
19
|
+
def __repr__(self) -> str:
|
|
20
|
+
...
|
|
21
|
+
|
|
22
|
+
def get_num_channels(self) -> int:
|
|
23
|
+
...
|
|
24
|
+
|
|
25
|
+
def get_hw_from_ch_mask(self, ch_mask: ChannelMask) -> list[Hardware]:
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
def export_config(self) -> list[str]:
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
def build(self) -> None:
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
def clear(self) -> None:
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
class MACTIONRack(Device):
|
|
38
|
+
|
|
39
|
+
def __init__(self, name: str, role: DeviceRole, is_async: bool=...) -> None:
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
def add_dds_cards(self, slots: list[int]) -> None:
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
def add_quench_cards(self, slots: list[int]) -> None:
|
|
46
|
+
...
|
|
47
|
+
|
|
48
|
+
def build(self) -> None:
|
|
49
|
+
...
|
|
50
|
+
|
|
51
|
+
def clear(self) -> None:
|
|
52
|
+
...
|
|
53
|
+
|
|
54
|
+
class QuenchRFSoC(Device):
|
|
55
|
+
|
|
56
|
+
def __init__(self, name: str, role: DeviceRole, is_async: bool=...) -> None:
|
|
57
|
+
...
|
|
58
|
+
|
|
59
|
+
def build(self) -> None:
|
|
60
|
+
...
|
|
61
|
+
|
|
62
|
+
def clear(self) -> None:
|
|
63
|
+
...
|
|
64
|
+
|
|
65
|
+
def enable_pid(self, rf_channel: ChannelMask, source: ChannelMask) -> None:
|
|
66
|
+
...
|
|
67
|
+
|
|
68
|
+
def set_pid_limit(self, rf_channel: ChannelMask, limit: float) -> None:
|
|
69
|
+
...
|
|
70
|
+
|
|
71
|
+
def enable_pid_acquisition(self, rf_channel: ChannelMask) -> None:
|
|
72
|
+
...
|
|
73
|
+
|
|
74
|
+
def export_config(self) -> list[str]:
|
|
75
|
+
...
|
|
76
|
+
|
|
77
|
+
class FastinoRack(Device):
|
|
78
|
+
|
|
79
|
+
def __init__(self, name: str, n_cards: int, role: DeviceRole, is_async: bool=...) -> None:
|
|
80
|
+
...
|
|
81
|
+
|
|
82
|
+
def build(self) -> None:
|
|
83
|
+
...
|
|
84
|
+
|
|
85
|
+
def clear(self) -> None:
|
|
86
|
+
...
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from enum import Enum
|
|
4
|
+
from typing import Any
|
|
5
|
+
from ionpulse_sequence_generator.hardware.channel import ChannelMask
|
|
6
|
+
from ionpulse_sequence_generator.hardware.units import Unit
|
|
7
|
+
logger = ...
|
|
8
|
+
|
|
9
|
+
class Domain(Enum):
|
|
10
|
+
READOUT = ...
|
|
11
|
+
DIGITAL = ...
|
|
12
|
+
DDS = ...
|
|
13
|
+
QUENCH = ...
|
|
14
|
+
QUBIT = ...
|
|
15
|
+
DDS_ADC = ...
|
|
16
|
+
QUENCH_ADC = ...
|
|
17
|
+
FASTINO = ...
|
|
18
|
+
|
|
19
|
+
class Hardware:
|
|
20
|
+
domain: Domain
|
|
21
|
+
|
|
22
|
+
def __init__(self) -> None:
|
|
23
|
+
...
|
|
24
|
+
|
|
25
|
+
def channel(self, *args: Any, **kwargs: Any) -> ChannelMask:
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
def log_conversion(self, name: str, value: np.ndarray, converted_value: int, unit: Unit, func: Callable) -> None:
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
def to_amp(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> np.ndarray[Any, np.dtype[np.uint16]]:
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
def to_freq(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> np.ndarray[Any, np.dtype[np.int32]]:
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
def to_phase(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> np.ndarray[Any, np.dtype[np.uint16]]:
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
def to_time(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> np.ndarray[Any, np.dtype[np.uint64]]:
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
def from_amp(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> np.ndarray[Any, np.dtype[np.float64]]:
|
|
44
|
+
...
|
|
45
|
+
|
|
46
|
+
def from_freq(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> np.ndarray[Any, np.dtype[np.float64]]:
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
def from_phase(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> np.ndarray[Any, np.dtype[np.float64]]:
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
def from_time(self, value: np.ndarray, unit: Unit) -> np.ndarray[Any, np.dtype[np.float64]]:
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
def check_freq(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> None:
|
|
56
|
+
...
|
|
57
|
+
|
|
58
|
+
def check_phase(self, degree: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> None:
|
|
59
|
+
...
|
|
60
|
+
|
|
61
|
+
def check_amp(self, value: np.ndarray[Any, np.dtype[np.float64]], unit: Unit) -> None:
|
|
62
|
+
...
|
|
63
|
+
|
|
64
|
+
def check_time(self, value: np.ndarray[Any, np.dtype[np.uint64]], unit: Unit, edge: bool=..., **kwargs: Any) -> None:
|
|
65
|
+
...
|
|
66
|
+
|
|
67
|
+
def get_min_edge_time(self, unit: Unit) -> float:
|
|
68
|
+
...
|
|
69
|
+
|
|
70
|
+
def get_time_resolution(self, unit: Unit) -> float:
|
|
71
|
+
...
|
|
72
|
+
|
|
73
|
+
def __repr__(self) -> str:
|
|
74
|
+
...
|
|
75
|
+
|
|
76
|
+
def get_num_channels(self) -> int:
|
|
77
|
+
...
|
|
78
|
+
|
|
79
|
+
def get_indices_from_channel(self, channel: ChannelMask) -> list:
|
|
80
|
+
...
|
|
81
|
+
|
|
82
|
+
class DDSHardware(Hardware):
|
|
83
|
+
domain = ...
|
|
84
|
+
|
|
85
|
+
def __init__(self, slots: list) -> None:
|
|
86
|
+
...
|
|
87
|
+
|
|
88
|
+
def channel(self, channel: int, slot: int | None=...) -> ChannelMask:
|
|
89
|
+
...
|
|
90
|
+
|
|
91
|
+
class SlopeTime(Enum):
|
|
92
|
+
SLOWEST = ...
|
|
93
|
+
SLOW = ...
|
|
94
|
+
MEDIUM = ...
|
|
95
|
+
FAST = ...
|
|
96
|
+
slope_time_max = ...
|
|
97
|
+
slope_time_min = ...
|
|
98
|
+
slope_time_delay = ...
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def get_slope_time(cls, slope: SlopeTime, unit: Unit) -> float:
|
|
102
|
+
...
|
|
103
|
+
|
|
104
|
+
def check_time(self, value: np.ndarray[Any, np.dtype[np.uint64]], unit: Unit, **kwargs: Any) -> None:
|
|
105
|
+
...
|
|
106
|
+
|
|
107
|
+
class PIDStateChangeType(Enum):
|
|
108
|
+
NONE = ...
|
|
109
|
+
ACTIVATE = ...
|
|
110
|
+
RESET = ...
|
|
111
|
+
OVERRIDE = ...
|
|
112
|
+
reference_voltage_max = ...
|
|
113
|
+
|
|
114
|
+
def to_refv(self, value: float, unit: Unit, pid_ch: int=..., adc_ch: int=...):
|
|
115
|
+
...
|
|
116
|
+
|
|
117
|
+
def get_slot(self, channel: ChannelMask) -> int:
|
|
118
|
+
...
|
|
119
|
+
|
|
120
|
+
class DIOHardware(Hardware):
|
|
121
|
+
domain = ...
|
|
122
|
+
ALL_SUBCHANNELS = ...
|
|
123
|
+
ALL = ...
|
|
124
|
+
|
|
125
|
+
def __init__(self) -> None:
|
|
126
|
+
...
|
|
127
|
+
|
|
128
|
+
def channel(self) -> ChannelMask:
|
|
129
|
+
...
|
|
130
|
+
|
|
131
|
+
class QuenchHardware(Hardware):
|
|
132
|
+
domain = ...
|
|
133
|
+
|
|
134
|
+
def __init__(self, slots: list) -> None:
|
|
135
|
+
...
|
|
136
|
+
|
|
137
|
+
def channel(self, channel: int, *, slot: int | None=...) -> ChannelMask:
|
|
138
|
+
...
|
|
139
|
+
|
|
140
|
+
def check_time(self, value: np.ndarray, unit: Unit, **kwargs: Any) -> None:
|
|
141
|
+
...
|
|
142
|
+
|
|
143
|
+
class DDSADCHardware(Hardware):
|
|
144
|
+
domain = ...
|
|
145
|
+
|
|
146
|
+
def __init__(self, slots: list) -> None:
|
|
147
|
+
...
|
|
148
|
+
|
|
149
|
+
def channel(self, channel: int, slot: int | None=...) -> ChannelMask:
|
|
150
|
+
...
|
|
151
|
+
|
|
152
|
+
def get_ADC_index(self, channel: ChannelMask) -> int:
|
|
153
|
+
...
|
|
154
|
+
|
|
155
|
+
def get_slot(self, channel: ChannelMask) -> int:
|
|
156
|
+
...
|
|
157
|
+
|
|
158
|
+
class QuenchADCHardware(Hardware):
|
|
159
|
+
domain = ...
|
|
160
|
+
|
|
161
|
+
def __init__(self, slots: list) -> None:
|
|
162
|
+
...
|
|
163
|
+
|
|
164
|
+
def channel(self, channel: int, slot: int | None=...) -> ChannelMask:
|
|
165
|
+
...
|
|
166
|
+
|
|
167
|
+
class FastinoHardware(Hardware):
|
|
168
|
+
domain = ...
|
|
169
|
+
|
|
170
|
+
def __init__(self, n_cards: int) -> None:
|
|
171
|
+
...
|
|
172
|
+
|
|
173
|
+
def channel(self) -> ChannelMask:
|
|
174
|
+
...
|
|
175
|
+
|
|
176
|
+
def get_num_channels(self) -> int:
|
|
177
|
+
...
|