boulder-opal-scale-up-sdk 1.0.2__py3-none-any.whl → 1.0.4__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.
Files changed (44) hide show
  1. {boulder_opal_scale_up_sdk-1.0.2.dist-info → boulder_opal_scale_up_sdk-1.0.4.dist-info}/METADATA +1 -1
  2. boulder_opal_scale_up_sdk-1.0.4.dist-info/RECORD +67 -0
  3. boulderopalscaleupsdk/agent/worker.py +10 -5
  4. boulderopalscaleupsdk/common/dtypes.py +14 -1
  5. boulderopalscaleupsdk/common/typeclasses.py +22 -0
  6. boulderopalscaleupsdk/device/__init__.py +0 -8
  7. boulderopalscaleupsdk/device/common.py +0 -3
  8. boulderopalscaleupsdk/device/config_loader.py +1 -0
  9. boulderopalscaleupsdk/device/controller/qblox.py +129 -0
  10. boulderopalscaleupsdk/device/defcal.py +5 -44
  11. boulderopalscaleupsdk/device/device.py +34 -12
  12. boulderopalscaleupsdk/device/processor/__init__.py +0 -2
  13. boulderopalscaleupsdk/device/processor/common.py +37 -20
  14. boulderopalscaleupsdk/device/processor/superconducting_processor.py +28 -22
  15. boulderopalscaleupsdk/experiments/__init__.py +20 -2
  16. boulderopalscaleupsdk/experiments/chi01_scan.py +14 -8
  17. boulderopalscaleupsdk/experiments/common.py +15 -16
  18. boulderopalscaleupsdk/experiments/power_rabi.py +16 -12
  19. boulderopalscaleupsdk/experiments/power_rabi_ef.py +66 -0
  20. boulderopalscaleupsdk/experiments/ramsey.py +15 -17
  21. boulderopalscaleupsdk/experiments/readout_classifier_calibration.py +25 -5
  22. boulderopalscaleupsdk/experiments/resonator_spectroscopy.py +14 -17
  23. boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_bias.py +17 -20
  24. boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_power.py +12 -12
  25. boulderopalscaleupsdk/experiments/t1.py +46 -0
  26. boulderopalscaleupsdk/experiments/t2.py +49 -0
  27. boulderopalscaleupsdk/experiments/t2_echo.py +49 -0
  28. boulderopalscaleupsdk/experiments/transmon_anharmonicity.py +29 -26
  29. boulderopalscaleupsdk/experiments/transmon_spectroscopy.py +16 -21
  30. boulderopalscaleupsdk/experiments/waveforms.py +63 -0
  31. boulderopalscaleupsdk/plotting/dtypes.py +1 -0
  32. boulderopalscaleupsdk/protobuf/v1/device_pb2.py +20 -20
  33. boulderopalscaleupsdk/protobuf/v1/device_pb2.pyi +4 -2
  34. boulderopalscaleupsdk/protobuf/v1/task_pb2.py +16 -16
  35. boulderopalscaleupsdk/protobuf/v1/task_pb2.pyi +4 -2
  36. boulderopalscaleupsdk/routines/__init__.py +16 -1
  37. boulderopalscaleupsdk/routines/common.py +13 -0
  38. boulderopalscaleupsdk/routines/resonator_mapping.py +16 -0
  39. boulderopalscaleupsdk/routines/transmon_discovery.py +45 -0
  40. boulderopalscaleupsdk/routines/transmon_retuning.py +31 -0
  41. boulderopalscaleupsdk/stubs/maps.py +11 -2
  42. boulder_opal_scale_up_sdk-1.0.2.dist-info/RECORD +0 -60
  43. {boulder_opal_scale_up_sdk-1.0.2.dist-info → boulder_opal_scale_up_sdk-1.0.4.dist-info}/LICENSE +0 -0
  44. {boulder_opal_scale_up_sdk-1.0.2.dist-info → boulder_opal_scale_up_sdk-1.0.4.dist-info}/WHEEL +0 -0
@@ -23,11 +23,9 @@ from boulderopalscaleupsdk.common.dtypes import (
23
23
  from boulderopalscaleupsdk.device.common import (
24
24
  Component,
25
25
  ComponentRef,
26
- Processor,
27
26
  )
28
27
  from boulderopalscaleupsdk.device.processor import (
29
28
  ComponentParameter,
30
- DurationComponentParameter,
31
29
  FloatComponentParameter,
32
30
  )
33
31
 
@@ -37,23 +35,23 @@ class Transmon(Component[Literal["tunable"]]):
37
35
  dtype: Literal["transmon"] = "transmon"
38
36
  traits: list[Literal["tunable"]] = Field(default=["tunable"])
39
37
 
40
- freq_01: FloatComponentParameter | None = Field(
41
- default=None,
38
+ freq_01: FloatComponentParameter = Field(
39
+ default=ComponentParameter(value=(0.0)),
42
40
  json_schema_extra={"display": {"label": "freq_01", "unit": "MHz", "scale": 1e-6}},
43
41
  )
44
- anharm: FloatComponentParameter | None = Field(
45
- default=None,
42
+ anharm: FloatComponentParameter = Field(
43
+ default=ComponentParameter(value=0.0),
46
44
  json_schema_extra={"display": {"label": "anharm", "unit": "MHz", "scale": 1e-6}},
47
45
  )
48
- t1: DurationComponentParameter = Field(
46
+ t1: ComponentParameter[Duration] = Field(
49
47
  default=ComponentParameter(value=Duration(0, TimeUnit.NS)),
50
48
  json_schema_extra={"display": {"label": "t1", "unit": "µs", "scale": 1e6}},
51
49
  )
52
- t2: DurationComponentParameter = Field(
50
+ t2: ComponentParameter[Duration] = Field(
53
51
  default=ComponentParameter(value=Duration(0, TimeUnit.NS)),
54
52
  json_schema_extra={"display": {"label": "t2", "unit": "µs", "scale": 1e6}},
55
53
  )
56
- t2_echo: DurationComponentParameter = Field(
54
+ t2_echo: ComponentParameter[Duration] = Field(
57
55
  default=ComponentParameter(value=Duration(0, TimeUnit.NS)),
58
56
  json_schema_extra={"display": {"label": "t2_echo", "unit": "µs", "scale": 1e6}},
59
57
  )
@@ -65,15 +63,23 @@ class Transmon(Component[Literal["tunable"]]):
65
63
  default=ComponentParameter(value=0.0),
66
64
  json_schema_extra={"display": {"label": "sx_vp", "unit": "V", "scale": 1}},
67
65
  )
66
+ x_ef_vp: FloatComponentParameter = Field(
67
+ default=ComponentParameter(value=0.0),
68
+ json_schema_extra={"display": {"label": "x_ef_vp", "unit": "V", "scale": 1}},
69
+ )
70
+ sx_ef_vp: FloatComponentParameter = Field(
71
+ default=ComponentParameter(value=0.0),
72
+ json_schema_extra={"display": {"label": "sx_ef_vp", "unit": "V", "scale": 1}},
73
+ )
68
74
 
69
75
  # Tunable transmon parameters.
70
76
  dc_bias: FloatComponentParameter = Field(
71
77
  default=ComponentParameter(value=0.0),
72
78
  json_schema_extra={"display": {"label": "dc_bias", "unit": "V", "scale": 1}},
73
79
  )
74
- fmax_bias: FloatComponentParameter = Field(
80
+ bias_offset: FloatComponentParameter = Field(
75
81
  default=ComponentParameter(value=0.0),
76
- json_schema_extra={"display": {"label": "fmax_bias", "unit": "V", "scale": 1}},
82
+ json_schema_extra={"display": {"label": "bias_offset", "unit": "V", "scale": 1}},
77
83
  )
78
84
  bias_period: FloatComponentParameter = Field(
79
85
  default=ComponentParameter(value=0.0),
@@ -85,20 +91,20 @@ class Resonator(Component[Literal["readout"]]):
85
91
  dtype: Literal["resonator"] = "resonator"
86
92
  traits: list[Literal["readout"]] = Field(default=["readout"])
87
93
 
88
- frequency_high: FloatComponentParameter | None = Field(
89
- default=None,
94
+ frequency_high: FloatComponentParameter = Field(
95
+ default=ComponentParameter(value=0.0),
90
96
  json_schema_extra={"display": {"label": "frequency_high", "unit": "MHz", "scale": 1e-6}},
91
97
  )
92
- frequency_low: FloatComponentParameter | None = Field(
93
- default=None,
98
+ frequency_low: FloatComponentParameter = Field(
99
+ default=ComponentParameter(value=0.0),
94
100
  json_schema_extra={"display": {"label": "frequency_low", "unit": "MHz", "scale": 1e-6}},
95
101
  )
96
- kappa_low: FloatComponentParameter | None = Field(
97
- default=None,
102
+ kappa_low: FloatComponentParameter = Field(
103
+ default=ComponentParameter(value=0.0),
98
104
  json_schema_extra={"display": {"label": "kappa_low", "unit": "MHz", "scale": 1e-6}},
99
105
  )
100
- kappa_high: FloatComponentParameter | None = Field(
101
- default=None,
106
+ kappa_high: FloatComponentParameter = Field(
107
+ default=ComponentParameter(value=0.0),
102
108
  json_schema_extra={"display": {"label": "kappa_high", "unit": "MHz", "scale": 1e-6}},
103
109
  )
104
110
  vp_low: FloatComponentParameter = Field(
@@ -128,9 +134,9 @@ class Coupler(Component[Literal["tunable"]]):
128
134
  default=ComponentParameter(value=0.0),
129
135
  json_schema_extra={"display": {"label": "dc_bias", "unit": "V", "scale": 1}},
130
136
  )
131
- fmax_bias: FloatComponentParameter = Field(
137
+ bias_offset: FloatComponentParameter = Field(
132
138
  default=ComponentParameter(value=0.0),
133
- json_schema_extra={"display": {"label": "fmax_bias", "unit": "V", "scale": 1}},
139
+ json_schema_extra={"display": {"label": "bias_offset", "unit": "V", "scale": 1}},
134
140
  )
135
141
  bias_period: FloatComponentParameter = Field(
136
142
  default=ComponentParameter(value=0.0),
@@ -182,7 +188,7 @@ class SuperconductingProcessorTemplate(BaseModel):
182
188
  )
183
189
 
184
190
 
185
- class SuperconductingProcessor(Processor):
191
+ class SuperconductingProcessor(BaseModel):
186
192
  nodes: dict[ComponentRef, SuperconductingComponentType]
187
193
  edges: list[Edge]
188
194
 
@@ -14,39 +14,57 @@
14
14
  """Experiment library."""
15
15
 
16
16
  __all__ = [
17
+ "T1",
18
+ "T2",
17
19
  "CWSIterable",
18
20
  "Chi01Scan",
19
21
  "ConstantWaveform",
22
+ "DragCosineWaveform",
20
23
  "Experiment",
21
24
  "GaussianWaveform",
22
25
  "HypIterable",
23
26
  "LinspaceIterable",
27
+ "LogspaceIterable",
24
28
  "PowerRabi",
29
+ "PowerRabiEF",
25
30
  "Ramsey",
26
31
  "RangeIterable",
27
32
  "ReadoutClassifierCalibration",
28
33
  "ResonatorSpectroscopy",
29
34
  "ResonatorSpectroscopyByBias",
30
35
  "ResonatorSpectroscopyByPower",
36
+ "T2Echo",
31
37
  "TransmonAnharmonicity",
32
38
  "TransmonSpectroscopy",
39
+ "Waveform",
40
+ "update_amplitude",
33
41
  ]
34
42
 
35
43
  from .chi01_scan import Chi01Scan
36
44
  from .common import (
37
- ConstantWaveform,
38
45
  CWSIterable,
39
46
  Experiment,
40
- GaussianWaveform,
41
47
  HypIterable,
42
48
  LinspaceIterable,
49
+ LogspaceIterable,
43
50
  RangeIterable,
44
51
  )
45
52
  from .power_rabi import PowerRabi
53
+ from .power_rabi_ef import PowerRabiEF
46
54
  from .ramsey import Ramsey
47
55
  from .readout_classifier_calibration import ReadoutClassifierCalibration
48
56
  from .resonator_spectroscopy import ResonatorSpectroscopy
49
57
  from .resonator_spectroscopy_by_bias import ResonatorSpectroscopyByBias
50
58
  from .resonator_spectroscopy_by_power import ResonatorSpectroscopyByPower
59
+ from .t1 import T1
60
+ from .t2 import T2
61
+ from .t2_echo import T2Echo
51
62
  from .transmon_anharmonicity import TransmonAnharmonicity
52
63
  from .transmon_spectroscopy import TransmonSpectroscopy
64
+ from .waveforms import (
65
+ ConstantWaveform,
66
+ DragCosineWaveform,
67
+ GaussianWaveform,
68
+ Waveform,
69
+ update_amplitude,
70
+ )
@@ -13,13 +13,14 @@
13
13
 
14
14
  from pydantic import PrivateAttr
15
15
 
16
- from boulderopalscaleupsdk.experiments.common import (
16
+ from .common import (
17
17
  CWSIterable,
18
18
  Experiment,
19
19
  HypIterable,
20
20
  LinspaceIterable,
21
21
  RangeIterable,
22
22
  )
23
+ from .waveforms import ConstantWaveform
23
24
 
24
25
  DEFAULT_RECYCLE_DELAY_NS = 10_000
25
26
  DEFAULT_SHOT_COUNT = 100
@@ -33,17 +34,20 @@ class Chi01Scan(Experiment):
33
34
  Attributes
34
35
  ----------
35
36
  transmon : str
36
- The reference for the transmon to target in the experiment.
37
+ The reference for the transmon to target.
37
38
  frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
38
39
  or HypIterable or None, optional
39
- The frequencies at which to scan.
40
- If None, frequencies around the readout frequency will be used.
40
+ The frequencies at which to scan, in Hz.
41
+ Defaults to a scan around the readout frequency.
41
42
  recycle_delay_ns : int, optional
42
- The delay time between consecutive shots of the experiment, in nanoseconds.
43
- Defaults to 10000 ns.
43
+ The delay between consecutive shots, in nanoseconds. Defaults to 10,000 ns.
44
44
  shot_count : int, optional
45
- The number of shots to be taken in the experiment.
46
- Defaults to 100.
45
+ The number of shots to take. Defaults to 100.
46
+ measure_waveform : ConstantWaveform or None, optional
47
+ The waveform to use for the measurement pulse.
48
+ Defaults to the measurement defcal.
49
+ run_mixer_calibration: bool
50
+ Whether to run mixer calibrations before running a program. Defaults to False.
47
51
  """
48
52
 
49
53
  _experiment_name: str = PrivateAttr("chi01_scan")
@@ -54,3 +58,5 @@ class Chi01Scan(Experiment):
54
58
  )
55
59
  recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
56
60
  shot_count: int = DEFAULT_SHOT_COUNT
61
+ measure_waveform: ConstantWaveform | None = None
62
+ run_mixer_calibration: bool = False
@@ -14,7 +14,6 @@
14
14
  from typing import Literal
15
15
 
16
16
  from pydantic import BaseModel, ConfigDict, Field
17
- from pydantic.dataclasses import dataclass
18
17
 
19
18
 
20
19
  class Experiment(BaseModel):
@@ -56,6 +55,21 @@ class RangeIterable(_RangeIterable):
56
55
  step: float
57
56
 
58
57
 
58
+ class LogspaceIterable(_RangeIterable):
59
+ """A range of values spaced evenly on a log scale."""
60
+
61
+ dtype: Literal["logspace"] = "logspace"
62
+
63
+ # The starting value.
64
+ start: float
65
+ # The final value.
66
+ stop: float
67
+ # The number of values. Defaults to 101.
68
+ count: int = Field(default=101)
69
+ # Base of the logarithm
70
+ base: int = Field(default=10)
71
+
72
+
59
73
  class CWSIterable(_RangeIterable):
60
74
  """A range of linearly spaced values in center ± width/2."""
61
75
 
@@ -83,18 +97,3 @@ class HypIterable(_RangeIterable):
83
97
  width: float
84
98
  # The number of values. Defaults to 51.
85
99
  count: int = Field(default=51)
86
-
87
-
88
- @dataclass
89
- class ConstantWaveform:
90
- duration_ns: int
91
- scale: float
92
- waveform_type: Literal["constant"] = "constant"
93
-
94
-
95
- @dataclass
96
- class GaussianWaveform:
97
- duration_ns: int
98
- amplitude: float
99
- sigma: float
100
- waveform_type: Literal["gaussian"] = "gaussian"
@@ -14,14 +14,13 @@
14
14
  from pydantic import PrivateAttr
15
15
 
16
16
  from .common import (
17
- ConstantWaveform,
18
17
  CWSIterable,
19
18
  Experiment,
20
- GaussianWaveform,
21
19
  HypIterable,
22
20
  LinspaceIterable,
23
21
  RangeIterable,
24
22
  )
23
+ from .waveforms import ConstantWaveform, Waveform
25
24
 
26
25
  DEFAULT_SHOT_COUNT = 400
27
26
 
@@ -33,28 +32,33 @@ class PowerRabi(Experiment):
33
32
  Parameters
34
33
  ----------
35
34
  transmon : str
36
- The reference for the transmon to target in the experiment.
35
+ The reference for the transmon to target.
37
36
  scales : list[float] or LinspaceIterable or RangeIterable
38
37
  or CWSIterable or HypIterable or None, optional
39
- The scaling factors for the drive pulse amplitude. If None, a default scan will be used.
40
- drive_waveform : GaussianWaveform
38
+ The scaling factors for the drive pulse amplitude.
39
+ If None, a default scan will be used.
40
+ drive_waveform : Waveform
41
41
  The waveform to use for the drive pulse.
42
- measure_waveform : ConstantWaveform
43
- The waveform to use for the measurement pulse.
44
42
  recycle_delay_ns : int
45
- The delay time between consecutive shots of the experiment, in nanoseconds.
43
+ The delay between consecutive shots, in nanoseconds.
46
44
  shot_count : int, optional
47
- The number of shots to be taken in the experiment. Defaults to 400.
45
+ The number of shots to take. Defaults to 400.
48
46
  pulse_vp : float, optional
49
- The voltage per pulse. If None, a default value will be used.
47
+ The voltage per pulse, in Volts. Defaults to the amplitude of the X gate.
48
+ measure_waveform : ConstantWaveform or None, optional
49
+ The waveform to use for the measurement pulse.
50
+ Defaults to the measurement defcal.
51
+ run_mixer_calibration: bool
52
+ Whether to run mixer calibrations before running a program. Defaults to False.
50
53
  """
51
54
 
52
55
  _experiment_name: str = PrivateAttr("power_rabi")
53
56
 
54
57
  transmon: str
55
58
  scales: list[float] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = None
56
- drive_waveform: GaussianWaveform
57
- measure_waveform: ConstantWaveform
59
+ drive_waveform: Waveform
58
60
  recycle_delay_ns: int
59
61
  shot_count: int = DEFAULT_SHOT_COUNT
60
62
  pulse_vp: float | None = None
63
+ measure_waveform: ConstantWaveform | None = None
64
+ run_mixer_calibration: bool = False
@@ -0,0 +1,66 @@
1
+ # Copyright 2025 Q-CTRL. All rights reserved.
2
+ #
3
+ # Licensed under the Q-CTRL Terms of service (the "License"). Unauthorized
4
+ # copying or use of this file, via any medium, is strictly prohibited.
5
+ # Proprietary and confidential. You may not use this file except in compliance
6
+ # with the License. You may obtain a copy of the License at
7
+ #
8
+ # https://q-ctrl.com/terms
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS. See the
12
+ # License for the specific language.
13
+
14
+ from pydantic import PrivateAttr
15
+
16
+ from .common import (
17
+ CWSIterable,
18
+ Experiment,
19
+ HypIterable,
20
+ LinspaceIterable,
21
+ RangeIterable,
22
+ )
23
+ from .waveforms import ConstantWaveform, Waveform
24
+
25
+ DEFAULT_RECYCLE_DELAY_NS = 200_000
26
+ DEFAULT_SHOT_COUNT = 400
27
+ DEFAULT_DURATION_NS = 2_000
28
+
29
+
30
+ class PowerRabiEF(Experiment):
31
+ """
32
+ Parameters for running a Power Rabi EF experiment.
33
+
34
+ Parameters
35
+ ----------
36
+ transmon : str
37
+ The reference for the transmon to target.
38
+ scales : list[float] or LinspaceIterable or RangeIterable
39
+ or CWSIterable or HypIterable or None, optional
40
+ The scaling factors for the drive pulse amplitude.
41
+ If None, a default scan will be used.
42
+ drive_waveform : Waveform
43
+ The waveform to use for the drive pulse.
44
+ recycle_delay_ns : int
45
+ The delay between consecutive shots, in nanoseconds.
46
+ shot_count : int, optional
47
+ The number of shots to take. Defaults to 400.
48
+ pulse_vp : float, optional
49
+ The voltage per pulse, in Volts. Defaults to the amplitude of the X gate.
50
+ measure_waveform : ConstantWaveform or None, optional
51
+ The waveform to use for the measurement pulse.
52
+ Defaults to the measurement defcal.
53
+ run_mixer_calibration: bool
54
+ Whether to run mixer calibrations before running a program. Defaults to False.
55
+ """
56
+
57
+ _experiment_name: str = PrivateAttr("power_rabi_ef")
58
+
59
+ transmon: str
60
+ scales: list[float] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = None
61
+ drive_waveform: Waveform
62
+ recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
63
+ shot_count: int = DEFAULT_SHOT_COUNT
64
+ pulse_vp: float | None = None
65
+ measure_waveform: ConstantWaveform | None = None
66
+ run_mixer_calibration: bool = False
@@ -14,10 +14,10 @@
14
14
  from pydantic import PrivateAttr
15
15
 
16
16
  from .common import Experiment
17
+ from .waveforms import ConstantWaveform
17
18
 
18
19
  DEFAULT_RECYCLE_DELAY_NS = 10_000
19
20
  DEFAULT_SHOT_COUNT = 400
20
- DEFAULT_DURATION_NS = 2_000
21
21
 
22
22
 
23
23
  class Ramsey(Experiment):
@@ -27,36 +27,34 @@ class Ramsey(Experiment):
27
27
  Parameters
28
28
  ----------
29
29
  transmon : str
30
- The reference for the transmon to target in the experiment.
31
- max_delay_ns : int
32
- The maximum delay time, in nanoseconds.
30
+ The reference for the transmon to target.
33
31
  min_delay_ns : int
34
32
  The minimum delay time, in nanoseconds.
33
+ max_delay_ns : int
34
+ The maximum delay time, in nanoseconds.
35
35
  delay_step_ns : int
36
36
  The step for generating the list of delays, in nanoseconds.
37
37
  virtual_detuning : float
38
- The difference between the drive signal frequency and the qubit frequency, in Hz.
39
- readout_amplitude : float
40
- The amplitude of the readout pulse.
41
- duration_ns : int, optional
42
- The duration of the pulse, in nanoseconds.
43
- Defaults to 2000 ns.
38
+ The virtual detuning added between SX pulses, in Hz.
44
39
  recycle_delay_ns : int, optional
45
- The delay time between consecutive shots of the experiment, in nanoseconds.
46
- Defaults to 10000 ns.
40
+ The delay between consecutive shots, in nanoseconds. Defaults to 10,000 ns.
47
41
  shot_count : int, optional
48
- The number of shots to be taken in the experiment.
49
- Defaults to 400.
42
+ The number of shots to take. Defaults to 400.
43
+ measure_waveform : ConstantWaveform or None, optional
44
+ The waveform to use for the measurement pulse.
45
+ Defaults to the measurement defcal.
46
+ run_mixer_calibration: bool
47
+ Whether to run mixer calibrations before running a program. Defaults to False.
50
48
  """
51
49
 
52
50
  _experiment_name: str = PrivateAttr("ramsey")
53
51
 
54
52
  transmon: str
55
- max_delay_ns: int
56
53
  min_delay_ns: int
54
+ max_delay_ns: int
57
55
  delay_step_ns: int
58
56
  virtual_detuning: float
59
- readout_amplitude: float
60
- duration_ns: int = DEFAULT_DURATION_NS
61
57
  recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
62
58
  shot_count: int = DEFAULT_SHOT_COUNT
59
+ measure_waveform: ConstantWaveform | None = None
60
+ run_mixer_calibration: bool = False
@@ -1,6 +1,20 @@
1
+ # Copyright 2025 Q-CTRL. All rights reserved.
2
+ #
3
+ # Licensed under the Q-CTRL Terms of service (the "License"). Unauthorized
4
+ # copying or use of this file, via any medium, is strictly prohibited.
5
+ # Proprietary and confidential. You may not use this file except in compliance
6
+ # with the License. You may obtain a copy of the License at
7
+ #
8
+ # https://q-ctrl.com/terms
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS. See the
12
+ # License for the specific language.
13
+
1
14
  from pydantic import PrivateAttr
2
15
 
3
- from boulderopalscaleupsdk.experiments.common import Experiment
16
+ from .common import Experiment
17
+ from .waveforms import ConstantWaveform
4
18
 
5
19
 
6
20
  class ReadoutClassifierCalibration(Experiment):
@@ -10,15 +24,21 @@ class ReadoutClassifierCalibration(Experiment):
10
24
  Parameters
11
25
  ----------
12
26
  transmon : str
13
- The reference for the transmon to target in the experiment.
27
+ The reference for the transmon to target.
14
28
  recycle_delay_ns : int
15
- The delay time between consecutive shots of the experiment, in nanoseconds.
29
+ The delay between consecutive shots, in nanoseconds.
16
30
  shot_count : int, optional
17
- The number of shots to be taken in the experiment.
18
- Defaults to 5000.
31
+ The number of shots to take. Defaults to 5,000.
32
+ measure_waveform : ConstantWaveform or None, optional
33
+ The waveform to use for the measurement pulse.
34
+ Defaults to the measurement defcal.
35
+ run_mixer_calibration: bool
36
+ Whether to run mixer calibrations before running a program. Defaults to False.
19
37
  """
20
38
 
21
39
  _experiment_name: str = PrivateAttr("readout_classifier_calibration")
22
40
  transmon: str
23
41
  recycle_delay_ns: int
24
42
  shot_count: int = 5000
43
+ measure_waveform: ConstantWaveform | None = None
44
+ run_mixer_calibration: bool = False
@@ -20,8 +20,8 @@ from .common import (
20
20
  LinspaceIterable,
21
21
  RangeIterable,
22
22
  )
23
+ from .waveforms import ConstantWaveform
23
24
 
24
- DEFAULT_DURATION_NS = 2000 # ns
25
25
  DEFAULT_RECYCLE_DELAY_NS = 1000 # ns
26
26
  DEFAULT_SHOT_COUNT = 100
27
27
 
@@ -33,23 +33,20 @@ class ResonatorSpectroscopy(Experiment):
33
33
  Parameters
34
34
  ----------
35
35
  resonator : str
36
- The reference for the resonator to target in the experiment.
36
+ The reference for the resonator to target.
37
37
  frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
38
38
  or HypIterable or None, optional
39
- The frequencies at which to scan.
40
- If None, frequencies around the readout frequency will be used.
41
- readout_amplitude : float, optional
42
- The amplitude of the readout pulse.
43
- If None, a default amplitude will be used.
44
- duration_ns : int, optional
45
- The duration of the readout pulse, in nanoseconds.
46
- Defaults to 2000 ns.
47
- recycle_delay_ns :int, optional
48
- The delay time between consecutive shots of the experiment, in nanoseconds.
49
- Defaults to 1000 ns.
39
+ The frequencies at which to scan, in Hz.
40
+ Defaults to a scan around the readout frequency.
41
+ recycle_delay_ns : int, optional
42
+ The delay between consecutive shots, in nanoseconds. Defaults to 1,000 ns.
50
43
  shot_count : int, optional
51
- The number of shots to be taken in the experiment.
52
- Defaults to 100.
44
+ The number of shots to take. Defaults to 100.
45
+ measure_waveform : ConstantWaveform or None, optional
46
+ The waveform to use for the measurement pulse.
47
+ Defaults to the measurement defcal.
48
+ run_mixer_calibration: bool
49
+ Whether to run mixer calibrations before running a program. Defaults to False.
53
50
  """
54
51
 
55
52
  _experiment_name: str = PrivateAttr("resonator_spectroscopy")
@@ -58,7 +55,7 @@ class ResonatorSpectroscopy(Experiment):
58
55
  frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
59
56
  None
60
57
  )
61
- readout_amplitude: float | None = None
62
- duration_ns: int = DEFAULT_DURATION_NS
63
58
  recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
64
59
  shot_count: int = DEFAULT_SHOT_COUNT
60
+ measure_waveform: ConstantWaveform | None = None
61
+ run_mixer_calibration: bool = False
@@ -20,8 +20,8 @@ from .common import (
20
20
  LinspaceIterable,
21
21
  RangeIterable,
22
22
  )
23
+ from .waveforms import ConstantWaveform
23
24
 
24
- DEFAULT_DURATION_NS = 2000
25
25
  DEFAULT_SHOT_COUNT = 100
26
26
  DEFAULT_RECYCLE_DELAY_NS = 10_000
27
27
  DEFAULT_BIASES = LinspaceIterable(start=-0.49, stop=0.49, count=21)
@@ -34,30 +34,27 @@ class ResonatorSpectroscopyByBias(Experiment):
34
34
  Parameters
35
35
  ----------
36
36
  resonator : str
37
- The reference for the resonator to target in the experiment.
37
+ The reference for the resonator to target.
38
38
  bias_transmons : list[str] or None, optional
39
- The transmons to bias.
40
- If None, it defaults to transmon coupled to the resonator.
39
+ The references for the transmons to bias.
40
+ Defaults to transmon coupled to the resonator.
41
41
  frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
42
42
  or HypIterable or None, optional
43
- The frequencies at which to scan.
44
- If None, frequencies around the readout frequency will be used.
43
+ The frequencies at which to scan, in Hz.
44
+ Defaults to a scan around the readout frequency.
45
45
  biases : list[int] or LinspaceIterable or RangeIterable or CWSIterable
46
46
  or HypIterable, optional
47
- The biases at which to scan.
48
- If None, defaults to 21 points between -0.49 and 0.49.
49
- readout_amplitude : float, optional
50
- The amplitude of the readout pulse.
51
- Defaults to None.
52
- duration_ns : int, optional
53
- The duration of the pulse, in nanoseconds.
54
- Defaults to 2000 ns.
47
+ The biases at which to scan, in Volts.
48
+ Defaults to 21 points between -0.49 and 0.49.
55
49
  recycle_delay_ns : int, optional
56
- The delay time between consecutive shots of the experiment, in nanoseconds.
57
- Defaults to 10000 ns.
50
+ The delay between consecutive shots, in nanoseconds. Defaults to 10,000 ns.
58
51
  shot_count : int, optional
59
- The number of shots to be taken in the experiment.
60
- Defaults to 100.
52
+ The number of shots to take. Defaults to 100.
53
+ measure_waveform : ConstantWaveform or None, optional
54
+ The waveform to use for the measurement pulse.
55
+ Defaults to the measurement defcal.
56
+ run_mixer_calibration: bool
57
+ Whether to run mixer calibrations before running a program. Defaults to False.
61
58
  """
62
59
 
63
60
  _experiment_name: str = PrivateAttr("resonator_spectroscopy_by_bias")
@@ -70,7 +67,7 @@ class ResonatorSpectroscopyByBias(Experiment):
70
67
  biases: list[float] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable = (
71
68
  DEFAULT_BIASES
72
69
  )
73
- readout_amplitude: float | None = None
74
- duration_ns: int = DEFAULT_DURATION_NS
75
70
  recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
76
71
  shot_count: int = DEFAULT_SHOT_COUNT
72
+ measure_waveform: ConstantWaveform | None = None
73
+ run_mixer_calibration: bool = False