boulder-opal-scale-up-sdk 1.0.3__py3-none-any.whl → 1.0.5__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.3.dist-info → boulder_opal_scale_up_sdk-1.0.5.dist-info}/METADATA +1 -1
- boulder_opal_scale_up_sdk-1.0.5.dist-info/RECORD +73 -0
- boulderopalscaleupsdk/agent/worker.py +23 -4
- boulderopalscaleupsdk/common/dtypes.py +31 -1
- boulderopalscaleupsdk/device/__init__.py +0 -7
- boulderopalscaleupsdk/device/config_loader.py +1 -0
- boulderopalscaleupsdk/device/controller/qblox.py +222 -25
- boulderopalscaleupsdk/device/defcal.py +5 -44
- boulderopalscaleupsdk/device/device.py +45 -3
- boulderopalscaleupsdk/device/processor/__init__.py +0 -2
- boulderopalscaleupsdk/device/processor/common.py +1 -6
- boulderopalscaleupsdk/device/processor/superconducting_processor.py +34 -7
- boulderopalscaleupsdk/experiments/__init__.py +24 -2
- boulderopalscaleupsdk/experiments/chi01_scan.py +18 -15
- boulderopalscaleupsdk/experiments/common.py +0 -16
- boulderopalscaleupsdk/experiments/drag_leakage_calibration.py +66 -0
- boulderopalscaleupsdk/experiments/fine_amplitude_calibration.py +54 -0
- boulderopalscaleupsdk/experiments/power_rabi.py +22 -16
- boulderopalscaleupsdk/experiments/power_rabi_ef.py +67 -0
- boulderopalscaleupsdk/experiments/ramsey.py +21 -18
- boulderopalscaleupsdk/experiments/readout_classifier_calibration.py +30 -8
- boulderopalscaleupsdk/experiments/resonator_spectroscopy.py +20 -18
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_bias.py +23 -20
- boulderopalscaleupsdk/experiments/resonator_spectroscopy_by_power.py +22 -21
- boulderopalscaleupsdk/experiments/t1.py +16 -22
- boulderopalscaleupsdk/experiments/t2.py +19 -16
- boulderopalscaleupsdk/experiments/t2_echo.py +51 -0
- boulderopalscaleupsdk/experiments/transmon_anharmonicity.py +26 -24
- boulderopalscaleupsdk/experiments/transmon_spectroscopy.py +19 -17
- boulderopalscaleupsdk/experiments/voltage_bias_fine_tune.py +58 -0
- boulderopalscaleupsdk/experiments/waveforms.py +63 -0
- boulderopalscaleupsdk/experiments/zz_ramsey.py +59 -0
- boulderopalscaleupsdk/plotting/dtypes.py +6 -3
- 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 +32 -32
- boulderopalscaleupsdk/protobuf/v1/device_pb2.pyi +8 -4
- boulderopalscaleupsdk/routines/__init__.py +25 -1
- boulderopalscaleupsdk/routines/common.py +13 -0
- boulderopalscaleupsdk/routines/one_qubit_calibration.py +36 -0
- boulderopalscaleupsdk/routines/resonator_mapping.py +17 -1
- boulderopalscaleupsdk/routines/transmon_coherence.py +34 -0
- boulderopalscaleupsdk/routines/transmon_discovery.py +41 -0
- boulderopalscaleupsdk/routines/transmon_retuning.py +41 -0
- boulderopalscaleupsdk/stubs/maps.py +11 -2
- boulder_opal_scale_up_sdk-1.0.3.dist-info/RECORD +0 -62
- {boulder_opal_scale_up_sdk-1.0.3.dist-info → boulder_opal_scale_up_sdk-1.0.5.dist-info}/LICENSE +0 -0
- {boulder_opal_scale_up_sdk-1.0.3.dist-info → boulder_opal_scale_up_sdk-1.0.5.dist-info}/WHEEL +0 -0
@@ -1,28 +1,50 @@
|
|
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
|
+
|
1
16
|
from pydantic import PrivateAttr
|
2
17
|
|
3
|
-
from .common import
|
18
|
+
from .common import Experiment
|
19
|
+
from .waveforms import ConstantWaveform
|
4
20
|
|
5
21
|
|
6
22
|
class ReadoutClassifierCalibration(Experiment):
|
7
23
|
"""
|
8
24
|
Parameters for running calibration of readout classifier for a transmon.
|
9
25
|
|
10
|
-
|
26
|
+
Attributes
|
11
27
|
----------
|
12
28
|
transmon : str
|
13
|
-
The reference for the transmon to target
|
29
|
+
The reference for the transmon to target.
|
14
30
|
recycle_delay_ns : int
|
15
|
-
The delay
|
31
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
16
32
|
shot_count : int, optional
|
17
|
-
The number of shots to
|
18
|
-
Defaults to 5000.
|
33
|
+
The number of shots to take. Defaults to 5,000.
|
19
34
|
measure_waveform : ConstantWaveform or None, optional
|
20
35
|
The waveform to use for the measurement pulse.
|
21
|
-
|
36
|
+
Defaults to the measurement defcal.
|
37
|
+
run_mixer_calibration: bool
|
38
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
39
|
+
update : "auto" or "off" or "prompt", optional
|
40
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
22
41
|
"""
|
23
42
|
|
24
43
|
_experiment_name: str = PrivateAttr("readout_classifier_calibration")
|
44
|
+
|
25
45
|
transmon: str
|
26
|
-
recycle_delay_ns: int
|
46
|
+
recycle_delay_ns: int = 200_000
|
27
47
|
shot_count: int = 5000
|
28
48
|
measure_waveform: ConstantWaveform | None = None
|
49
|
+
run_mixer_calibration: bool = False
|
50
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,43 +11,43 @@
|
|
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 (
|
17
|
-
ConstantWaveform,
|
18
19
|
CWSIterable,
|
19
20
|
Experiment,
|
20
21
|
HypIterable,
|
21
22
|
LinspaceIterable,
|
22
23
|
RangeIterable,
|
23
24
|
)
|
24
|
-
|
25
|
-
DEFAULT_DURATION_NS = 2000 # ns
|
26
|
-
DEFAULT_RECYCLE_DELAY_NS = 1000 # ns
|
27
|
-
DEFAULT_SHOT_COUNT = 100
|
25
|
+
from .waveforms import ConstantWaveform
|
28
26
|
|
29
27
|
|
30
28
|
class ResonatorSpectroscopy(Experiment):
|
31
29
|
"""
|
32
30
|
Parameters for running a resonator spectroscopy experiment.
|
33
31
|
|
34
|
-
|
32
|
+
Attributes
|
35
33
|
----------
|
36
34
|
resonator : str
|
37
|
-
The reference for the resonator to target
|
38
|
-
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
35
|
+
The reference for the resonator to target.
|
36
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable \
|
39
37
|
or HypIterable or None, optional
|
40
|
-
The frequencies at which to scan.
|
41
|
-
|
42
|
-
recycle_delay_ns :int, optional
|
43
|
-
The delay
|
44
|
-
Defaults to 1000 ns.
|
38
|
+
The frequencies at which to scan, in Hz.
|
39
|
+
Defaults to a scan around the readout frequency.
|
40
|
+
recycle_delay_ns : int, optional
|
41
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 1,000 ns.
|
45
42
|
shot_count : int, optional
|
46
|
-
The number of shots to
|
47
|
-
Defaults to 100.
|
43
|
+
The number of shots to take. Defaults to 100.
|
48
44
|
measure_waveform : ConstantWaveform or None, optional
|
49
45
|
The waveform to use for the measurement pulse.
|
50
|
-
|
46
|
+
Defaults to the measurement defcal.
|
47
|
+
run_mixer_calibration: bool
|
48
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
49
|
+
update : "auto" or "off" or "prompt", optional
|
50
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
51
51
|
"""
|
52
52
|
|
53
53
|
_experiment_name: str = PrivateAttr("resonator_spectroscopy")
|
@@ -56,6 +56,8 @@ class ResonatorSpectroscopy(Experiment):
|
|
56
56
|
frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
|
57
57
|
None
|
58
58
|
)
|
59
|
-
recycle_delay_ns: int =
|
60
|
-
shot_count: int =
|
59
|
+
recycle_delay_ns: int = 1_000
|
60
|
+
shot_count: int = 100
|
61
61
|
measure_waveform: ConstantWaveform | None = None
|
62
|
+
run_mixer_calibration: bool = False
|
63
|
+
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 (
|
17
|
-
ConstantWaveform,
|
18
19
|
CWSIterable,
|
19
20
|
Experiment,
|
20
21
|
HypIterable,
|
21
22
|
LinspaceIterable,
|
22
23
|
RangeIterable,
|
23
24
|
)
|
25
|
+
from .waveforms import ConstantWaveform
|
24
26
|
|
25
|
-
DEFAULT_DURATION_NS = 2000
|
26
|
-
DEFAULT_SHOT_COUNT = 100
|
27
|
-
DEFAULT_RECYCLE_DELAY_NS = 10_000
|
28
27
|
DEFAULT_BIASES = LinspaceIterable(start=-0.49, stop=0.49, count=21)
|
29
28
|
|
30
29
|
|
@@ -32,30 +31,32 @@ class ResonatorSpectroscopyByBias(Experiment):
|
|
32
31
|
"""
|
33
32
|
Parameters for running a resonator spectroscopy by power experiment.
|
34
33
|
|
35
|
-
|
34
|
+
Attributes
|
36
35
|
----------
|
37
36
|
resonator : str
|
38
|
-
The reference for the resonator to target
|
37
|
+
The reference for the resonator to target.
|
39
38
|
bias_transmons : list[str] or None, optional
|
40
39
|
The references for the transmons to bias.
|
41
|
-
|
42
|
-
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
40
|
+
Defaults to transmon coupled to the resonator.
|
41
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable \
|
43
42
|
or HypIterable or None, optional
|
44
|
-
The frequencies at which to scan.
|
45
|
-
|
46
|
-
biases : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
43
|
+
The frequencies at which to scan, in Hz.
|
44
|
+
Defaults to a scan around the readout frequency.
|
45
|
+
biases : list[int] or LinspaceIterable or RangeIterable or CWSIterable \
|
47
46
|
or HypIterable, optional
|
48
|
-
The biases at which to scan.
|
49
|
-
|
47
|
+
The biases at which to scan, in Volts.
|
48
|
+
Defaults to 21 points between -0.49 and 0.49.
|
50
49
|
recycle_delay_ns : int, optional
|
51
|
-
The delay
|
52
|
-
Defaults to 10000 ns.
|
50
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 1,000 ns.
|
53
51
|
shot_count : int, optional
|
54
|
-
The number of shots to
|
55
|
-
Defaults to 100.
|
52
|
+
The number of shots to take. Defaults to 100.
|
56
53
|
measure_waveform : ConstantWaveform or None, optional
|
57
54
|
The waveform to use for the measurement pulse.
|
58
|
-
|
55
|
+
Defaults to the measurement defcal.
|
56
|
+
run_mixer_calibration: bool
|
57
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
58
|
+
update : "auto" or "off" or "prompt", optional
|
59
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
59
60
|
"""
|
60
61
|
|
61
62
|
_experiment_name: str = PrivateAttr("resonator_spectroscopy_by_bias")
|
@@ -68,6 +69,8 @@ class ResonatorSpectroscopyByBias(Experiment):
|
|
68
69
|
biases: list[float] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable = (
|
69
70
|
DEFAULT_BIASES
|
70
71
|
)
|
71
|
-
recycle_delay_ns: int =
|
72
|
-
shot_count: int =
|
72
|
+
recycle_delay_ns: int = 1_000
|
73
|
+
shot_count: int = 100
|
73
74
|
measure_waveform: ConstantWaveform | None = None
|
75
|
+
run_mixer_calibration: bool = False
|
76
|
+
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 (
|
@@ -21,35 +23,32 @@ from .common import (
|
|
21
23
|
RangeIterable,
|
22
24
|
)
|
23
25
|
|
24
|
-
DEFAULT_DURATION_NS = 2000 # ns
|
25
|
-
DEFAULT_RECYCLE_DELAY_NS = 1000 # ns
|
26
|
-
DEFAULT_SHOT_COUNT = 100
|
27
|
-
|
28
26
|
|
29
27
|
class ResonatorSpectroscopyByPower(Experiment):
|
30
28
|
"""
|
31
29
|
Parameters for running a resonator spectroscopy by power experiment.
|
32
30
|
|
33
|
-
|
31
|
+
Attributes
|
34
32
|
----------
|
35
33
|
resonator : str
|
36
|
-
The reference for the resonator to target
|
37
|
-
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
34
|
+
The reference for the resonator to target.
|
35
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable \
|
38
36
|
or HypIterable or None, optional
|
39
|
-
The frequencies at which to scan.
|
40
|
-
|
41
|
-
|
42
|
-
The powers at which to scan the readout pulse.
|
37
|
+
The frequencies at which to scan, in Hz.
|
38
|
+
Defaults to a scan around the readout frequency.
|
39
|
+
powers_dbm : list[float] or None, optional
|
40
|
+
The powers at which to scan the readout pulse, in dBm.
|
43
41
|
If None, a default power scan will be used.
|
44
42
|
duration_ns : int, optional
|
45
|
-
The duration of the readout pulse, in nanoseconds.
|
46
|
-
Defaults to 2000 ns.
|
43
|
+
The duration of the readout pulse, in nanoseconds. Defaults to 2,000 ns.
|
47
44
|
recycle_delay_ns : int, optional
|
48
|
-
The delay
|
49
|
-
Defaults to 1000 ns.
|
45
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 1,000 ns.
|
50
46
|
shot_count : int, optional
|
51
|
-
The number of shots to
|
52
|
-
|
47
|
+
The number of shots to take. Defaults to 100.
|
48
|
+
run_mixer_calibration: bool
|
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.
|
53
52
|
"""
|
54
53
|
|
55
54
|
_experiment_name: str = PrivateAttr("resonator_spectroscopy_by_power")
|
@@ -58,7 +57,9 @@ class ResonatorSpectroscopyByPower(Experiment):
|
|
58
57
|
frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
|
59
58
|
None
|
60
59
|
)
|
61
|
-
|
62
|
-
duration_ns: int =
|
63
|
-
recycle_delay_ns: int =
|
64
|
-
shot_count: int =
|
60
|
+
powers_dbm: list[float] | None = None
|
61
|
+
duration_ns: int = 2_000
|
62
|
+
recycle_delay_ns: int = 1_000
|
63
|
+
shot_count: int = 100
|
64
|
+
run_mixer_calibration: bool = False
|
65
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,44 +11,38 @@
|
|
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, LogspaceIterable
|
17
19
|
|
18
|
-
DEFAULT_RECYCLE_DELAY_NS = 200_000
|
19
|
-
DEFAULT_SHOT_COUNT = 400
|
20
|
-
DEFAULT_DURATION_NS = 2_000
|
21
|
-
|
22
20
|
|
23
21
|
class T1(Experiment):
|
24
22
|
"""
|
25
23
|
Parameters for running a T1 experiment.
|
26
24
|
|
27
|
-
|
25
|
+
Attributes
|
28
26
|
----------
|
29
27
|
transmon : str
|
30
|
-
The transmon to target
|
31
|
-
delays_ns :
|
32
|
-
The delay
|
33
|
-
readout_amplitude : float, optional
|
34
|
-
The amplitude of the readout pulse.
|
35
|
-
If None, a default amplitude will be used.
|
36
|
-
duration_ns : int, optional
|
37
|
-
The duration of the readout pulse, in nanoseconds.
|
38
|
-
Defaults to 2000 ns.
|
28
|
+
The reference for the transmon to target.
|
29
|
+
delays_ns : LogspaceIterable
|
30
|
+
The delay times, in nanoseconds.
|
39
31
|
recycle_delay_ns : int, optional
|
40
|
-
The delay
|
41
|
-
Defaults to 200_000 ns.
|
32
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
42
33
|
shot_count : int, optional
|
43
|
-
The number of shots to
|
44
|
-
|
34
|
+
The number of shots to take. Defaults to 400.
|
35
|
+
run_mixer_calibration: bool
|
36
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
37
|
+
update : "auto" or "off" or "prompt", optional
|
38
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
45
39
|
"""
|
46
40
|
|
47
41
|
_experiment_name: str = PrivateAttr("t1")
|
48
42
|
|
49
43
|
transmon: str
|
50
44
|
delays_ns: LogspaceIterable
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
45
|
+
recycle_delay_ns: int = 200_000
|
46
|
+
shot_count: int = 400
|
47
|
+
run_mixer_calibration: bool = False
|
48
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,38 +11,41 @@
|
|
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, RangeIterable
|
17
19
|
|
18
|
-
DEFAULT_RECYCLE_DELAY_NS = 100_000
|
19
|
-
DEFAULT_SHOT_COUNT = 400
|
20
|
-
|
21
20
|
|
22
21
|
class T2(Experiment):
|
23
22
|
"""
|
24
|
-
Parameters for running a
|
23
|
+
Parameters for running a T2 experiment.
|
25
24
|
|
26
25
|
Parameters
|
27
26
|
----------
|
28
27
|
transmon : str
|
29
|
-
The reference for the transmon to target
|
30
|
-
delays_ns : list[int]
|
31
|
-
The delay
|
32
|
-
|
33
|
-
The
|
28
|
+
The reference for the transmon to target.
|
29
|
+
delays_ns : list[int] or RangeIterable
|
30
|
+
The delay times, in nanoseconds.
|
31
|
+
oscillation_count : int, optional
|
32
|
+
The target number of oscillations to expect. Defaults to 10.
|
34
33
|
recycle_delay_ns : int, optional
|
35
|
-
The delay
|
36
|
-
Defaults to 100_000 ns.
|
34
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
37
35
|
shot_count : int, optional
|
38
|
-
The number of shots to
|
39
|
-
|
36
|
+
The number of shots to take. Defaults to 400.
|
37
|
+
run_mixer_calibration: bool
|
38
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
39
|
+
update : "auto" or "off" or "prompt", optional
|
40
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
40
41
|
"""
|
41
42
|
|
42
43
|
_experiment_name: str = PrivateAttr("t2")
|
43
44
|
|
44
45
|
transmon: str
|
45
46
|
delays_ns: list[int] | RangeIterable
|
46
|
-
|
47
|
-
recycle_delay_ns: int =
|
48
|
-
shot_count: int =
|
47
|
+
oscillation_count: int = 10
|
48
|
+
recycle_delay_ns: int = 200_000
|
49
|
+
shot_count: int = 400
|
50
|
+
run_mixer_calibration: bool = False
|
51
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -0,0 +1,51 @@
|
|
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, RangeIterable
|
19
|
+
|
20
|
+
|
21
|
+
class T2Echo(Experiment):
|
22
|
+
"""
|
23
|
+
Parameters for running a T2 echo experiment.
|
24
|
+
|
25
|
+
Attributes
|
26
|
+
----------
|
27
|
+
transmon : str
|
28
|
+
The reference for the transmon to target.
|
29
|
+
delays_ns : list[int] or RangeIterable
|
30
|
+
The delay times, in nanoseconds.
|
31
|
+
oscillation_count : int, optional
|
32
|
+
The target number of oscillations to expect. Defaults to 10.
|
33
|
+
recycle_delay_ns : int, optional
|
34
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 200,000 ns.
|
35
|
+
shot_count : int, optional
|
36
|
+
The number of shots to take. Defaults to 400.
|
37
|
+
run_mixer_calibration: bool
|
38
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
39
|
+
update : "auto" or "off" or "prompt", optional
|
40
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
41
|
+
"""
|
42
|
+
|
43
|
+
_experiment_name: str = PrivateAttr("t2_echo")
|
44
|
+
|
45
|
+
transmon: str
|
46
|
+
delays_ns: list[int] | RangeIterable
|
47
|
+
oscillation_count: int = 10
|
48
|
+
recycle_delay_ns: int = 200_000
|
49
|
+
shot_count: int = 400
|
50
|
+
run_mixer_calibration: bool = False
|
51
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,52 +11,52 @@
|
|
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 (
|
17
|
-
ConstantWaveform,
|
18
19
|
CWSIterable,
|
19
20
|
Experiment,
|
20
21
|
HypIterable,
|
21
22
|
LinspaceIterable,
|
22
23
|
RangeIterable,
|
23
24
|
)
|
25
|
+
from .waveforms import ConstantWaveform
|
24
26
|
|
25
|
-
DEFAULT_DURATION_NS = 2_000 # ns
|
26
27
|
DEFAULT_RECYCLE_DELAY_NS = 1_000 # ns
|
27
|
-
DEFAULT_SHOT_COUNT = 100
|
28
|
-
DEFAULT_ANHARMONICITY_GUESS = -200e6 # Hz, typical anharmonicity for transmons
|
29
28
|
|
30
29
|
|
31
30
|
class TransmonAnharmonicity(Experiment):
|
32
31
|
"""
|
33
|
-
Parameters for running a
|
32
|
+
Parameters for running a transmon anharmonicity experiment.
|
34
33
|
|
35
|
-
|
34
|
+
Attributes
|
36
35
|
----------
|
37
36
|
transmon : str
|
38
|
-
The
|
39
|
-
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
37
|
+
The reference for the transmon to target.
|
38
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable \
|
40
39
|
or HypIterable or None, optional
|
41
|
-
The
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
range of frequencies to scan if `frequencies` is not provided.
|
47
|
-
Defaults to -200 MHz.
|
40
|
+
The frequencies at which to scan, in Hz.
|
41
|
+
Defaults to a scan based on the transmon's frequency and anharmonicity.
|
42
|
+
anharmonicity : float, optional
|
43
|
+
The guessed anharmonicity of the transmon, in Hz.
|
44
|
+
Used to determine the scan frequencies if not provided. Defaults to -200 MHz.
|
48
45
|
recycle_delay_ns : int, optional
|
49
|
-
The delay
|
50
|
-
Defaults to 1000 ns.
|
46
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 10,000 ns.
|
51
47
|
shot_count : int, optional
|
52
|
-
The number of shots to
|
48
|
+
The number of shots to take. Defaults to 400.
|
53
49
|
spectroscopy_waveform : ConstantWaveform or None, optional
|
54
50
|
The waveform to use in the spectroscopy pulse.
|
55
|
-
|
56
|
-
and an amplitude of 1.5 times the transmon's x_vp
|
51
|
+
Defaults to a constant waveform with a duration of 2,000 ns
|
52
|
+
and an amplitude of 1.5 times the transmon's x_vp.
|
57
53
|
measure_waveform : ConstantWaveform or None, optional
|
58
54
|
The waveform to use for the measurement pulse.
|
59
|
-
|
55
|
+
Defaults to the measurement defcal.
|
56
|
+
run_mixer_calibration: bool
|
57
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
58
|
+
update : "auto" or "off" or "prompt", optional
|
59
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
60
60
|
"""
|
61
61
|
|
62
62
|
_experiment_name: str = PrivateAttr("transmon_anharmonicity")
|
@@ -65,8 +65,10 @@ class TransmonAnharmonicity(Experiment):
|
|
65
65
|
frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
|
66
66
|
None
|
67
67
|
)
|
68
|
-
|
69
|
-
recycle_delay_ns: int =
|
70
|
-
shot_count: int =
|
68
|
+
anharmonicity: float = -200e6
|
69
|
+
recycle_delay_ns: int = 10_000
|
70
|
+
shot_count: int = 400
|
71
71
|
spectroscopy_waveform: ConstantWaveform | None = None
|
72
72
|
measure_waveform: ConstantWaveform | None = None
|
73
|
+
run_mixer_calibration: bool = False
|
74
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|
@@ -11,45 +11,45 @@
|
|
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 (
|
17
|
-
ConstantWaveform,
|
18
19
|
CWSIterable,
|
19
20
|
Experiment,
|
20
21
|
HypIterable,
|
21
22
|
LinspaceIterable,
|
22
23
|
RangeIterable,
|
23
24
|
)
|
24
|
-
|
25
|
-
DEFAULT_DURATION_NS = 2000 # ns
|
26
|
-
DEFAULT_RECYCLE_DELAY_NS = 1000 # ns
|
27
|
-
DEFAULT_SHOT_COUNT = 100
|
25
|
+
from .waveforms import ConstantWaveform
|
28
26
|
|
29
27
|
|
30
28
|
class TransmonSpectroscopy(Experiment):
|
31
29
|
"""
|
32
30
|
Parameters for running a transmon spectroscopy experiment.
|
33
31
|
|
34
|
-
|
32
|
+
Attributes
|
35
33
|
----------
|
36
34
|
transmon : str
|
37
|
-
The reference for the transmon to target
|
38
|
-
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable
|
35
|
+
The reference for the transmon to target.
|
36
|
+
frequencies : list[int] or LinspaceIterable or RangeIterable or CWSIterable \
|
39
37
|
or HypIterable or None, optional
|
40
|
-
The frequencies at which to scan.
|
41
|
-
|
38
|
+
The frequencies at which to scan, in Hz.
|
39
|
+
Default to a scan around the transmon frequency.
|
42
40
|
recycle_delay_ns : int, optional
|
43
|
-
The delay
|
44
|
-
Defaults to 1000 ns.
|
41
|
+
The delay between consecutive shots, in nanoseconds. Defaults to 50,000 ns.
|
45
42
|
shot_count : int, optional
|
46
|
-
The number of shots to
|
47
|
-
Defaults to 100.
|
43
|
+
The number of shots to take. Defaults to 100.
|
48
44
|
spectroscopy_waveform : ConstantWaveform
|
49
45
|
The waveform to use in the spectroscopy pulse.
|
50
46
|
measure_waveform : ConstantWaveform or None, optional
|
51
47
|
The waveform to use for the measurement pulse.
|
52
|
-
|
48
|
+
Defaults to the measurement defcal.
|
49
|
+
run_mixer_calibration: bool
|
50
|
+
Whether to run mixer calibrations before running a program. Defaults to False.
|
51
|
+
update : "auto" or "off" or "prompt", optional
|
52
|
+
How the device should be updated after an experiment run. Defaults to auto.
|
53
53
|
"""
|
54
54
|
|
55
55
|
_experiment_name: str = PrivateAttr("transmon_spectroscopy")
|
@@ -58,7 +58,9 @@ class TransmonSpectroscopy(Experiment):
|
|
58
58
|
frequencies: list[int] | LinspaceIterable | RangeIterable | CWSIterable | HypIterable | None = (
|
59
59
|
None
|
60
60
|
)
|
61
|
-
recycle_delay_ns: int =
|
62
|
-
shot_count: int =
|
61
|
+
recycle_delay_ns: int = 50_000
|
62
|
+
shot_count: int = 400
|
63
63
|
spectroscopy_waveform: ConstantWaveform
|
64
64
|
measure_waveform: ConstantWaveform | None = None
|
65
|
+
run_mixer_calibration: bool = False
|
66
|
+
update: Literal["auto", "off", "prompt"] = "auto"
|