boulder-opal-scale-up-sdk 1.0.4__py3-none-any.whl → 1.0.6__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.
- {boulder_opal_scale_up_sdk-1.0.4.dist-info → boulder_opal_scale_up_sdk-1.0.6.dist-info}/METADATA +1 -1
- boulder_opal_scale_up_sdk-1.0.6.dist-info/RECORD +79 -0
- boulderopalscaleupsdk/agent/worker.py +36 -4
- boulderopalscaleupsdk/common/dtypes.py +41 -2
- boulderopalscaleupsdk/{stubs/__init__.py → constants.py} +3 -0
- boulderopalscaleupsdk/device/controller/qblox.py +94 -26
- boulderopalscaleupsdk/device/controller/quantum_machines.py +86 -17
- boulderopalscaleupsdk/device/device.py +5 -1
- boulderopalscaleupsdk/device/processor/common.py +3 -3
- boulderopalscaleupsdk/device/processor/superconducting_processor.py +23 -3
- boulderopalscaleupsdk/errors.py +21 -0
- boulderopalscaleupsdk/experiments/__init__.py +16 -2
- boulderopalscaleupsdk/experiments/chi01_scan.py +9 -7
- boulderopalscaleupsdk/experiments/cz_spectroscopy_by_bias.py +84 -0
- boulderopalscaleupsdk/experiments/drag_leakage_calibration.py +66 -0
- boulderopalscaleupsdk/experiments/fine_amplitude_calibration.py +54 -0
- boulderopalscaleupsdk/experiments/power_rabi.py +10 -7
- boulderopalscaleupsdk/experiments/power_rabi_ef.py +10 -9
- boulderopalscaleupsdk/experiments/ramsey.py +9 -7
- boulderopalscaleupsdk/experiments/ramsey_ef.py +62 -0
- boulderopalscaleupsdk/experiments/{readout_classifier_calibration.py → readout_classifier.py} +16 -6
- boulderopalscaleupsdk/experiments/readout_optimization.py +57 -0
- boulderopalscaleupsdk/experiments/resonator_spectroscopy.py +9 -7
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_bias.py +12 -11
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_power.py +10 -9
- boulderopalscaleupsdk/experiments/t1.py +8 -6
- boulderopalscaleupsdk/experiments/t2.py +12 -10
- boulderopalscaleupsdk/experiments/t2_echo.py +12 -10
- boulderopalscaleupsdk/experiments/transmon_anharmonicity.py +13 -12
- boulderopalscaleupsdk/experiments/transmon_spectroscopy.py +10 -8
- boulderopalscaleupsdk/experiments/voltage_bias_fine_tune.py +58 -0
- boulderopalscaleupsdk/experiments/zz_ramsey.py +59 -0
- boulderopalscaleupsdk/grpc_interceptors/error.py +318 -0
- boulderopalscaleupsdk/plotting/dtypes.py +10 -8
- boulderopalscaleupsdk/protobuf/v1/agent_pb2.py +9 -3
- boulderopalscaleupsdk/protobuf/v1/agent_pb2.pyi +14 -0
- boulderopalscaleupsdk/protobuf/v1/agent_pb2_grpc.py +34 -0
- boulderopalscaleupsdk/protobuf/v1/device_pb2.py +57 -49
- boulderopalscaleupsdk/protobuf/v1/device_pb2.pyi +67 -41
- boulderopalscaleupsdk/protobuf/v1/device_pb2_grpc.py +100 -66
- boulderopalscaleupsdk/protobuf/v1/job_pb2.py +47 -0
- boulderopalscaleupsdk/protobuf/v1/job_pb2.pyi +54 -0
- boulderopalscaleupsdk/protobuf/v1/job_pb2_grpc.py +138 -0
- boulderopalscaleupsdk/routines/__init__.py +10 -1
- boulderopalscaleupsdk/routines/one_qubit_calibration.py +36 -0
- boulderopalscaleupsdk/routines/resonator_mapping.py +1 -1
- boulderopalscaleupsdk/routines/transmon_coherence.py +34 -0
- boulderopalscaleupsdk/routines/transmon_discovery.py +5 -9
- boulderopalscaleupsdk/routines/transmon_retuning.py +13 -3
- boulderopalscaleupsdk/third_party/quantum_machines/__init__.py +1 -1
- boulderopalscaleupsdk/third_party/quantum_machines/config.py +51 -48
- boulder_opal_scale_up_sdk-1.0.4.dist-info/RECORD +0 -67
- boulderopalscaleupsdk/stubs/dtypes.py +0 -47
- boulderopalscaleupsdk/stubs/maps.py +0 -18
- {boulder_opal_scale_up_sdk-1.0.4.dist-info → boulder_opal_scale_up_sdk-1.0.6.dist-info}/LICENSE +0 -0
- {boulder_opal_scale_up_sdk-1.0.4.dist-info → boulder_opal_scale_up_sdk-1.0.6.dist-info}/WHEEL +0 -0
@@ -161,7 +161,27 @@ class Feedline(Component[Literal["feedline"]]):
|
|
161
161
|
traits: list = Field(default=[])
|
162
162
|
|
163
163
|
|
164
|
-
|
164
|
+
class TWPA(Component[Literal["twpa"]]):
|
165
|
+
dtype: Literal["twpa"] = "twpa"
|
166
|
+
traits: list = Field(default=[])
|
167
|
+
|
168
|
+
impedance: FloatComponentParameter = Field(
|
169
|
+
default=ComponentParameter(value=0.0),
|
170
|
+
json_schema_extra={"display": {"label": "impedance", "unit": "Ohm", "scale": 1}},
|
171
|
+
)
|
172
|
+
|
173
|
+
# Tunable TWPA parameters
|
174
|
+
pump_power: FloatComponentParameter = Field(
|
175
|
+
default=ComponentParameter(value=0.0),
|
176
|
+
json_schema_extra={"display": {"label": "pump_power", "unit": "dBm", "scale": 1}},
|
177
|
+
)
|
178
|
+
pump_freq: FloatComponentParameter = Field(
|
179
|
+
default=ComponentParameter(value=(0.0)),
|
180
|
+
json_schema_extra={"display": {"label": "pump_freq", "unit": "MHz", "scale": 1e-6}},
|
181
|
+
)
|
182
|
+
|
183
|
+
|
184
|
+
SuperconductingComponentType = Transmon | Resonator | Port | Feedline | Filter | Coupler | TWPA
|
165
185
|
|
166
186
|
|
167
187
|
class Edge(BaseModel):
|
@@ -176,14 +196,14 @@ class TemplateParam(BaseModel):
|
|
176
196
|
|
177
197
|
|
178
198
|
class ProcessorTemplate(BaseModel):
|
179
|
-
elements: dict[str,
|
199
|
+
elements: dict[str, SuperconductingComponentType]
|
180
200
|
edges: list[Edge]
|
181
201
|
|
182
202
|
|
183
203
|
class SuperconductingProcessorTemplate(BaseModel):
|
184
204
|
build: list[TemplateParam]
|
185
205
|
templates: dict[str, ProcessorTemplate]
|
186
|
-
device_parameters: dict[str,
|
206
|
+
device_parameters: dict[str, SuperconductingComponentType] = Field(
|
187
207
|
default={},
|
188
208
|
)
|
189
209
|
|
@@ -0,0 +1,21 @@
|
|
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
|
+
|
15
|
+
class ScaleUpServerError(Exception):
|
16
|
+
"""
|
17
|
+
Exception raised by client based on server behavior.
|
18
|
+
"""
|
19
|
+
|
20
|
+
def __init__(self, message: str):
|
21
|
+
super().__init__(message)
|
@@ -17,10 +17,13 @@ __all__ = [
|
|
17
17
|
"T1",
|
18
18
|
"T2",
|
19
19
|
"CWSIterable",
|
20
|
+
"CZSpectroscopyByBias",
|
20
21
|
"Chi01Scan",
|
21
22
|
"ConstantWaveform",
|
22
23
|
"DragCosineWaveform",
|
24
|
+
"DragLeakageCalibration",
|
23
25
|
"Experiment",
|
26
|
+
"FineAmplitudeCalibration",
|
24
27
|
"GaussianWaveform",
|
25
28
|
"HypIterable",
|
26
29
|
"LinspaceIterable",
|
@@ -28,15 +31,19 @@ __all__ = [
|
|
28
31
|
"PowerRabi",
|
29
32
|
"PowerRabiEF",
|
30
33
|
"Ramsey",
|
34
|
+
"RamseyEF",
|
31
35
|
"RangeIterable",
|
32
|
-
"
|
36
|
+
"ReadoutClassifier",
|
37
|
+
"ReadoutOptimization",
|
33
38
|
"ResonatorSpectroscopy",
|
34
39
|
"ResonatorSpectroscopyByBias",
|
35
40
|
"ResonatorSpectroscopyByPower",
|
36
41
|
"T2Echo",
|
37
42
|
"TransmonAnharmonicity",
|
38
43
|
"TransmonSpectroscopy",
|
44
|
+
"VoltageBiasFineTune",
|
39
45
|
"Waveform",
|
46
|
+
"ZZRamsey",
|
40
47
|
"update_amplitude",
|
41
48
|
]
|
42
49
|
|
@@ -49,10 +56,15 @@ from .common import (
|
|
49
56
|
LogspaceIterable,
|
50
57
|
RangeIterable,
|
51
58
|
)
|
59
|
+
from .cz_spectroscopy_by_bias import CZSpectroscopyByBias
|
60
|
+
from .drag_leakage_calibration import DragLeakageCalibration
|
61
|
+
from .fine_amplitude_calibration import FineAmplitudeCalibration
|
52
62
|
from .power_rabi import PowerRabi
|
53
63
|
from .power_rabi_ef import PowerRabiEF
|
54
64
|
from .ramsey import Ramsey
|
55
|
-
from .
|
65
|
+
from .ramsey_ef import RamseyEF
|
66
|
+
from .readout_classifier import ReadoutClassifier
|
67
|
+
from .readout_optimization import ReadoutOptimization
|
56
68
|
from .resonator_spectroscopy import ResonatorSpectroscopy
|
57
69
|
from .resonator_spectroscopy_by_bias import ResonatorSpectroscopyByBias
|
58
70
|
from .resonator_spectroscopy_by_power import ResonatorSpectroscopyByPower
|
@@ -61,6 +73,7 @@ from .t2 import T2
|
|
61
73
|
from .t2_echo import T2Echo
|
62
74
|
from .transmon_anharmonicity import TransmonAnharmonicity
|
63
75
|
from .transmon_spectroscopy import TransmonSpectroscopy
|
76
|
+
from .voltage_bias_fine_tune import VoltageBiasFineTune
|
64
77
|
from .waveforms import (
|
65
78
|
ConstantWaveform,
|
66
79
|
DragCosineWaveform,
|
@@ -68,3 +81,4 @@ from .waveforms import (
|
|
68
81
|
Waveform,
|
69
82
|
update_amplitude,
|
70
83
|
)
|
84
|
+
from .zz_ramsey import ZZRamsey
|
@@ -11,6 +11,8 @@
|
|
11
11
|
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
12
12
|
# License for the specific language.
|
13
13
|
|
14
|
+
from typing import Literal
|
15
|
+
|
14
16
|
from pydantic import PrivateAttr
|
15
17
|
|
16
18
|
from .common import (
|
@@ -22,9 +24,6 @@ from .common import (
|
|
22
24
|
)
|
23
25
|
from .waveforms import ConstantWaveform
|
24
26
|
|
25
|
-
DEFAULT_RECYCLE_DELAY_NS = 10_000
|
26
|
-
DEFAULT_SHOT_COUNT = 100
|
27
|
-
|
28
27
|
|
29
28
|
class Chi01Scan(Experiment):
|
30
29
|
"""
|
@@ -35,12 +34,12 @@ class Chi01Scan(Experiment):
|
|
35
34
|
----------
|
36
35
|
transmon : str
|
37
36
|
The reference for the transmon to target.
|
38
|
-
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
37
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable \
|
39
38
|
or HypIterable or None, optional
|
40
39
|
The frequencies at which to scan, in Hz.
|
41
40
|
Defaults to a scan around the readout frequency.
|
42
41
|
recycle_delay_ns : int, optional
|
43
|
-
The delay between consecutive shots, in nanoseconds. Defaults to
|
42
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
44
43
|
shot_count : int, optional
|
45
44
|
The number of shots to take. Defaults to 100.
|
46
45
|
measure_waveform : ConstantWaveform or None, optional
|
@@ -48,6 +47,8 @@ class Chi01Scan(Experiment):
|
|
48
47
|
Defaults to the measurement defcal.
|
49
48
|
run_mixer_calibration: bool
|
50
49
|
Whether to run mixer calibrations before running a program. Defaults to False.
|
50
|
+
update : "auto" or "off" or "prompt", optional
|
51
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
51
52
|
"""
|
52
53
|
|
53
54
|
_experiment_name: str = PrivateAttr("chi01_scan")
|
@@ -56,7 +57,8 @@ class Chi01Scan(Experiment):
|
|
56
57
|
frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
|
57
58
|
None
|
58
59
|
)
|
59
|
-
recycle_delay_ns: int =
|
60
|
-
shot_count: int =
|
60
|
+
recycle_delay_ns: int = 200_000
|
61
|
+
shot_count: int = 100
|
61
62
|
measure_waveform: ConstantWaveform | None = None
|
62
63
|
run_mixer_calibration: bool = False
|
64
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -0,0 +1,84 @@
|
|
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 typing import Literal
|
15
|
+
|
16
|
+
from pydantic import PrivateAttr
|
17
|
+
|
18
|
+
from .common import Experiment
|
19
|
+
|
20
|
+
DEFAULT_PREP_PADDING_NS = 16
|
21
|
+
DEFAULT_MEASUREMENT_PADDING_NS = 16
|
22
|
+
DEFAULT_MIN_DURATION_NS = 16
|
23
|
+
DEFAULT_MAX_DURATION_NS = 200
|
24
|
+
DEFAULT_TIME_STEP_NS = 8
|
25
|
+
DEFAULT_RECYCLE_DELAY_NS = 500_000
|
26
|
+
DEFAULT_SHOT_COUNT = 200
|
27
|
+
|
28
|
+
|
29
|
+
class CZSpectroscopyByBias(Experiment):
|
30
|
+
"""
|
31
|
+
Parameters for running a Ramsey experiment.
|
32
|
+
|
33
|
+
Parameters
|
34
|
+
----------
|
35
|
+
control_transmon : str
|
36
|
+
The control transmon to target in the experiment.
|
37
|
+
target_transmon : str
|
38
|
+
The target transmon to pair with the control transmon.
|
39
|
+
min_vp : float
|
40
|
+
The minimum voltage point, in volts.
|
41
|
+
max_vp : float
|
42
|
+
The maximum voltage point, in volts.
|
43
|
+
num_vp : int
|
44
|
+
The number of voltage points to sample.
|
45
|
+
min_duration_ns : int
|
46
|
+
The minimum duration for the pulse in the experiment, in nanoseconds.
|
47
|
+
max_duration_ns : int
|
48
|
+
The maximum duration for the pulse in the experiment, in nanoseconds.
|
49
|
+
duration_step_ns : int
|
50
|
+
The step size for the duration, in nanoseconds.
|
51
|
+
prep_padding_ns : int
|
52
|
+
The padding to apply before the CZ pulse, in nanoseconds.
|
53
|
+
measurement_padding_ns : int
|
54
|
+
The padding to apply after the CZ pulse, in nanoseconds.
|
55
|
+
recycle_delay_ns : float
|
56
|
+
The delay time between consecutive shots of the experiment, in nanoseconds.
|
57
|
+
Defaults to 500000 ns.
|
58
|
+
shot_count : int,
|
59
|
+
The number of shots to be taken in the experiment.
|
60
|
+
Defaults to 200.
|
61
|
+
batch_analysis : bool
|
62
|
+
Whether to perform batch analysis on the results.
|
63
|
+
spectroscopy_waveform : ConstantWaveform
|
64
|
+
The waveform to use in the spectroscopy pulse.
|
65
|
+
"""
|
66
|
+
|
67
|
+
_experiment_name: str = PrivateAttr("cz_spectroscopy_by_bias")
|
68
|
+
|
69
|
+
control_transmon: str
|
70
|
+
target_transmon: str
|
71
|
+
coupler: str
|
72
|
+
min_vp: float
|
73
|
+
max_vp: float
|
74
|
+
num_vp: int
|
75
|
+
coupler_flux_vp: float
|
76
|
+
min_duration_ns: int = DEFAULT_MIN_DURATION_NS
|
77
|
+
max_duration_ns: int = DEFAULT_MAX_DURATION_NS
|
78
|
+
duration_step_ns: int = DEFAULT_TIME_STEP_NS
|
79
|
+
prep_padding_ns: int = DEFAULT_PREP_PADDING_NS
|
80
|
+
measurement_padding_ns: int = DEFAULT_MEASUREMENT_PADDING_NS
|
81
|
+
recycle_delay_ns: int = DEFAULT_RECYCLE_DELAY_NS
|
82
|
+
shot_count: int = DEFAULT_SHOT_COUNT
|
83
|
+
batch_analysis: bool = False
|
84
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -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 typing import Literal
|
15
|
+
|
16
|
+
from pydantic import PrivateAttr, field_validator
|
17
|
+
|
18
|
+
from .common import CWSIterable, Experiment
|
19
|
+
|
20
|
+
|
21
|
+
class DragLeakageCalibration(Experiment):
|
22
|
+
"""
|
23
|
+
Parameters for running a DRAG leakage calibration experiment for
|
24
|
+
a specified gate on a transmon.
|
25
|
+
|
26
|
+
Attributes
|
27
|
+
----------
|
28
|
+
transmon : str
|
29
|
+
The reference for the transmon to target.
|
30
|
+
recycle_delay_ns : int
|
31
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 10,000 ns.
|
32
|
+
shot_count : int, optional
|
33
|
+
The number of shots to take. Defaults to 1,000.
|
34
|
+
alphas: list[float] or CWSIterable
|
35
|
+
List of values to sweep for DRAG parameter alpha.
|
36
|
+
repetitions : list[int]
|
37
|
+
List of repetition counts for the calibration experiment.
|
38
|
+
gate : "sx" or "x"
|
39
|
+
The gate to calibrate.
|
40
|
+
anharmonicity : float or None, optional
|
41
|
+
The anharmonicity of the transmon, in Hz.
|
42
|
+
Defaults to None, in which case the anharmonicity of the transmon will be used.
|
43
|
+
drag_guess : float
|
44
|
+
Initial guess for the DRAG parameter.
|
45
|
+
update : "auto" or "off" or "prompt", optional
|
46
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
47
|
+
"""
|
48
|
+
|
49
|
+
_experiment_name: str = PrivateAttr("drag_leakage_calibration")
|
50
|
+
|
51
|
+
transmon: str
|
52
|
+
recycle_delay_ns: int = 10_000
|
53
|
+
shot_count: int = 1_000
|
54
|
+
alphas: list[float] | CWSIterable
|
55
|
+
repetitions: list[int]
|
56
|
+
gate: Literal["x", "sx"]
|
57
|
+
anharmonicity: float | None = None
|
58
|
+
drag_guess: float
|
59
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
60
|
+
|
61
|
+
@field_validator("alphas")
|
62
|
+
@classmethod
|
63
|
+
def validate_alphas(cls, value: list[float] | CWSIterable):
|
64
|
+
if isinstance(value, CWSIterable) and value.center is None:
|
65
|
+
raise TypeError("The center of alphas must not be None.")
|
66
|
+
return value
|
@@ -0,0 +1,54 @@
|
|
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 typing import Literal
|
15
|
+
|
16
|
+
from pydantic import Field, PrivateAttr
|
17
|
+
|
18
|
+
from .common import Experiment
|
19
|
+
from .waveforms import ConstantWaveform
|
20
|
+
|
21
|
+
|
22
|
+
class FineAmplitudeCalibration(Experiment):
|
23
|
+
"""
|
24
|
+
Parameters for running a fine amplitude calibration experiment for
|
25
|
+
a specified gate on a transmon.
|
26
|
+
|
27
|
+
Attributes
|
28
|
+
----------
|
29
|
+
transmon : str
|
30
|
+
The reference for the transmon to target.
|
31
|
+
gate : Literal["sx", "x"]
|
32
|
+
The gate to be calibrated.
|
33
|
+
repetitions : list[int]
|
34
|
+
List of repetition counts for the calibration experiment.
|
35
|
+
recycle_delay_ns : int
|
36
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 10,000 ns.
|
37
|
+
shot_count : int, optional
|
38
|
+
The number of shots to take. Defaults to 1000.
|
39
|
+
measure_waveform : ConstantWaveform or None, optional
|
40
|
+
The waveform to use for the measurement pulse.
|
41
|
+
Defaults to the measurement defcal.
|
42
|
+
update : "auto" or "off" or "prompt", optional
|
43
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
44
|
+
"""
|
45
|
+
|
46
|
+
_experiment_name: str = PrivateAttr("fine_amplitude_calibration")
|
47
|
+
|
48
|
+
transmon: str
|
49
|
+
gate: Literal["sx", "x"]
|
50
|
+
repetitions: list[int] = Field(default=list(range(0, 100, 4)))
|
51
|
+
recycle_delay_ns: int = 10_000
|
52
|
+
shot_count: int = 1000
|
53
|
+
measure_waveform: ConstantWaveform | None = None
|
54
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,6 +11,8 @@
|
|
11
11
|
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
12
12
|
# License for the specific language.
|
13
13
|
|
14
|
+
from typing import Literal
|
15
|
+
|
14
16
|
from pydantic import PrivateAttr
|
15
17
|
|
16
18
|
from .common import (
|
@@ -22,25 +24,23 @@ from .common import (
|
|
22
24
|
)
|
23
25
|
from .waveforms import ConstantWaveform, Waveform
|
24
26
|
|
25
|
-
DEFAULT_SHOT_COUNT = 400
|
26
|
-
|
27
27
|
|
28
28
|
class PowerRabi(Experiment):
|
29
29
|
"""
|
30
30
|
Parameters for running a Power Rabi experiment.
|
31
31
|
|
32
|
-
|
32
|
+
Attributes
|
33
33
|
----------
|
34
34
|
transmon : str
|
35
35
|
The reference for the transmon to target.
|
36
|
-
scales : list[float] or LinspaceIterable or RangeIterable
|
36
|
+
scales : list[float] or LinspaceIterable or RangeIterable \
|
37
37
|
or CWSIterable or HypIterable or None, optional
|
38
38
|
The scaling factors for the drive pulse amplitude.
|
39
39
|
If None, a default scan will be used.
|
40
40
|
drive_waveform : Waveform
|
41
41
|
The waveform to use for the drive pulse.
|
42
42
|
recycle_delay_ns : int
|
43
|
-
The delay between consecutive shots, in nanoseconds.
|
43
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
44
44
|
shot_count : int, optional
|
45
45
|
The number of shots to take. Defaults to 400.
|
46
46
|
pulse_vp : float, optional
|
@@ -50,6 +50,8 @@ class PowerRabi(Experiment):
|
|
50
50
|
Defaults to the measurement defcal.
|
51
51
|
run_mixer_calibration: bool
|
52
52
|
Whether to run mixer calibrations before running a program. Defaults to False.
|
53
|
+
update : "auto" or "off" or "prompt", optional
|
54
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
53
55
|
"""
|
54
56
|
|
55
57
|
_experiment_name: str = PrivateAttr("power_rabi")
|
@@ -57,8 +59,9 @@ class PowerRabi(Experiment):
|
|
57
59
|
transmon: str
|
58
60
|
scales: list[float] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = None
|
59
61
|
drive_waveform: Waveform
|
60
|
-
recycle_delay_ns: int
|
61
|
-
shot_count: int =
|
62
|
+
recycle_delay_ns: int = 200_000
|
63
|
+
shot_count: int = 400
|
62
64
|
pulse_vp: float | None = None
|
63
65
|
measure_waveform: ConstantWaveform | None = None
|
64
66
|
run_mixer_calibration: bool = False
|
67
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,6 +11,8 @@
|
|
11
11
|
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
12
12
|
# License for the specific language.
|
13
13
|
|
14
|
+
from typing import Literal
|
15
|
+
|
14
16
|
from pydantic import PrivateAttr
|
15
17
|
|
16
18
|
from .common import (
|
@@ -22,27 +24,23 @@ from .common import (
|
|
22
24
|
)
|
23
25
|
from .waveforms import ConstantWaveform, Waveform
|
24
26
|
|
25
|
-
DEFAULT_RECYCLE_DELAY_NS = 200_000
|
26
|
-
DEFAULT_SHOT_COUNT = 400
|
27
|
-
DEFAULT_DURATION_NS = 2_000
|
28
|
-
|
29
27
|
|
30
28
|
class PowerRabiEF(Experiment):
|
31
29
|
"""
|
32
30
|
Parameters for running a Power Rabi EF experiment.
|
33
31
|
|
34
|
-
|
32
|
+
Attributes
|
35
33
|
----------
|
36
34
|
transmon : str
|
37
35
|
The reference for the transmon to target.
|
38
|
-
scales : list[float] or LinspaceIterable or RangeIterable
|
36
|
+
scales : list[float] or LinspaceIterable or RangeIterable \
|
39
37
|
or CWSIterable or HypIterable or None, optional
|
40
38
|
The scaling factors for the drive pulse amplitude.
|
41
39
|
If None, a default scan will be used.
|
42
40
|
drive_waveform : Waveform
|
43
41
|
The waveform to use for the drive pulse.
|
44
42
|
recycle_delay_ns : int
|
45
|
-
The delay between consecutive shots, in nanoseconds.
|
43
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
46
44
|
shot_count : int, optional
|
47
45
|
The number of shots to take. Defaults to 400.
|
48
46
|
pulse_vp : float, optional
|
@@ -52,6 +50,8 @@ class PowerRabiEF(Experiment):
|
|
52
50
|
Defaults to the measurement defcal.
|
53
51
|
run_mixer_calibration: bool
|
54
52
|
Whether to run mixer calibrations before running a program. Defaults to False.
|
53
|
+
update : "auto" or "off" or "prompt", optional
|
54
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
55
55
|
"""
|
56
56
|
|
57
57
|
_experiment_name: str = PrivateAttr("power_rabi_ef")
|
@@ -59,8 +59,9 @@ class PowerRabiEF(Experiment):
|
|
59
59
|
transmon: str
|
60
60
|
scales: list[float] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = None
|
61
61
|
drive_waveform: Waveform
|
62
|
-
recycle_delay_ns: int =
|
63
|
-
shot_count: int =
|
62
|
+
recycle_delay_ns: int = 200_000
|
63
|
+
shot_count: int = 400
|
64
64
|
pulse_vp: float | None = None
|
65
65
|
measure_waveform: ConstantWaveform | None = None
|
66
66
|
run_mixer_calibration: bool = False
|
67
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,20 +11,19 @@
|
|
11
11
|
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
12
12
|
# License for the specific language.
|
13
13
|
|
14
|
+
from typing import Literal
|
15
|
+
|
14
16
|
from pydantic import PrivateAttr
|
15
17
|
|
16
18
|
from .common import Experiment
|
17
19
|
from .waveforms import ConstantWaveform
|
18
20
|
|
19
|
-
DEFAULT_RECYCLE_DELAY_NS = 10_000
|
20
|
-
DEFAULT_SHOT_COUNT = 400
|
21
|
-
|
22
21
|
|
23
22
|
class Ramsey(Experiment):
|
24
23
|
"""
|
25
24
|
Parameters for running a Ramsey experiment.
|
26
25
|
|
27
|
-
|
26
|
+
Attributes
|
28
27
|
----------
|
29
28
|
transmon : str
|
30
29
|
The reference for the transmon to target.
|
@@ -37,7 +36,7 @@ class Ramsey(Experiment):
|
|
37
36
|
virtual_detuning : float
|
38
37
|
The virtual detuning added between SX pulses, in Hz.
|
39
38
|
recycle_delay_ns : int, optional
|
40
|
-
The delay between consecutive shots, in nanoseconds. Defaults to
|
39
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
41
40
|
shot_count : int, optional
|
42
41
|
The number of shots to take. Defaults to 400.
|
43
42
|
measure_waveform : ConstantWaveform or None, optional
|
@@ -45,6 +44,8 @@ class Ramsey(Experiment):
|
|
45
44
|
Defaults to the measurement defcal.
|
46
45
|
run_mixer_calibration: bool
|
47
46
|
Whether to run mixer calibrations before running a program. Defaults to False.
|
47
|
+
update : "auto" or "off" or "prompt", optional
|
48
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
48
49
|
"""
|
49
50
|
|
50
51
|
_experiment_name: str = PrivateAttr("ramsey")
|
@@ -54,7 +55,8 @@ class Ramsey(Experiment):
|
|
54
55
|
max_delay_ns: int
|
55
56
|
delay_step_ns: int
|
56
57
|
virtual_detuning: float
|
57
|
-
recycle_delay_ns: int =
|
58
|
-
shot_count: int =
|
58
|
+
recycle_delay_ns: int = 200_000
|
59
|
+
shot_count: int = 400
|
59
60
|
measure_waveform: ConstantWaveform | None = None
|
60
61
|
run_mixer_calibration: bool = False
|
62
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -0,0 +1,62 @@
|
|
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 typing import Literal
|
15
|
+
|
16
|
+
from pydantic import PrivateAttr
|
17
|
+
|
18
|
+
from .common import Experiment
|
19
|
+
from .waveforms import ConstantWaveform
|
20
|
+
|
21
|
+
|
22
|
+
class RamseyEF(Experiment):
|
23
|
+
"""
|
24
|
+
Parameters for running a EF Ramsey experiment.
|
25
|
+
|
26
|
+
Attributes
|
27
|
+
----------
|
28
|
+
transmon : str
|
29
|
+
The reference for the transmon to target.
|
30
|
+
min_delay_ns : int
|
31
|
+
The minimum delay time, in nanoseconds.
|
32
|
+
max_delay_ns : int
|
33
|
+
The maximum delay time, in nanoseconds.
|
34
|
+
delay_step_ns : int
|
35
|
+
The step for generating the list of delays, in nanoseconds.
|
36
|
+
virtual_detuning : float
|
37
|
+
The virtual detuning added between sx_ef pulses, in Hz.
|
38
|
+
recycle_delay_ns : int, optional
|
39
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
40
|
+
shot_count : int, optional
|
41
|
+
The number of shots to take. Defaults to 400.
|
42
|
+
measure_waveform : ConstantWaveform or None, optional
|
43
|
+
The waveform to use for the measurement pulse.
|
44
|
+
Defaults to the measurement defcal.
|
45
|
+
run_mixer_calibration: bool
|
46
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
47
|
+
update : "auto" or "off" or "prompt", optional
|
48
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
49
|
+
"""
|
50
|
+
|
51
|
+
_experiment_name: str = PrivateAttr("ramsey_ef")
|
52
|
+
|
53
|
+
transmon: str
|
54
|
+
min_delay_ns: int
|
55
|
+
max_delay_ns: int
|
56
|
+
delay_step_ns: int
|
57
|
+
virtual_detuning: float
|
58
|
+
recycle_delay_ns: int = 200_000
|
59
|
+
shot_count: int = 400
|
60
|
+
measure_waveform: ConstantWaveform | None = None
|
61
|
+
run_mixer_calibration: bool = False
|
62
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
boulderopalscaleupsdk/experiments/{readout_classifier_calibration.py → readout_classifier.py}
RENAMED
@@ -11,22 +11,28 @@
|
|
11
11
|
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
12
12
|
# License for the specific language.
|
13
13
|
|
14
|
+
from typing import Literal
|
15
|
+
|
14
16
|
from pydantic import PrivateAttr
|
15
17
|
|
16
18
|
from .common import Experiment
|
17
19
|
from .waveforms import ConstantWaveform
|
18
20
|
|
19
21
|
|
20
|
-
class
|
22
|
+
class ReadoutClassifier(Experiment):
|
21
23
|
"""
|
22
|
-
Parameters for
|
24
|
+
Parameters for training a readout classifier.
|
25
|
+
|
26
|
+
This does not optimize the readout pulse itself.
|
27
|
+
The measure waveform is fixed (provided or using the device's default).
|
28
|
+
To optimize the readout pulse use ReadoutOptimization.
|
23
29
|
|
24
|
-
|
30
|
+
Attributes
|
25
31
|
----------
|
26
32
|
transmon : str
|
27
33
|
The reference for the transmon to target.
|
28
34
|
recycle_delay_ns : int
|
29
|
-
The delay between consecutive shots, in nanoseconds.
|
35
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
30
36
|
shot_count : int, optional
|
31
37
|
The number of shots to take. Defaults to 5,000.
|
32
38
|
measure_waveform : ConstantWaveform or None, optional
|
@@ -34,11 +40,15 @@ class ReadoutClassifierCalibration(Experiment):
|
|
34
40
|
Defaults to the measurement defcal.
|
35
41
|
run_mixer_calibration: bool
|
36
42
|
Whether to run mixer calibrations before running a program. Defaults to False.
|
43
|
+
update : "auto" or "off" or "prompt", optional
|
44
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
37
45
|
"""
|
38
46
|
|
39
|
-
_experiment_name: str = PrivateAttr("
|
47
|
+
_experiment_name: str = PrivateAttr("readout_classifier")
|
48
|
+
|
40
49
|
transmon: str
|
41
|
-
recycle_delay_ns: int
|
50
|
+
recycle_delay_ns: int = 200_000
|
42
51
|
shot_count: int = 5000
|
43
52
|
measure_waveform: ConstantWaveform | None = None
|
44
53
|
run_mixer_calibration: bool = False
|
54
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|