laboneq_applications.contrib.experiments.spin_locking
¶
This module defines the spin locking experiment.
The spin locking experiment has the following pulse sequence:
qb --- [ prep transition ] --- [ x90_transition ] --- [ ry(delay) ] ---
--- [ x90_transition ] --- [ measure ]
If multiple qubits are passed to the run
workflow, the above pulses are applied
in parallel on all the qubits.
SpinLockingExperimentOptions
¶
Base options for the resonator spectroscopy experiment.
Additional attributes
refocus_pulse: String to define the quantum operation in-between the x90 pulses. Default: "y180".
pulse: dict = field(default_factory=lambda: {'function': 'gaussian_square_sweep', 'can_compress': True, 'risefall_in_samples': 64})
class-attribute
instance-attribute
¶
SpinLockingWorkflowOptions
¶
Option for spectroscopy workflow.
Attributes:
Name | Type | Description |
---|---|---|
create_experiment |
EchoExperimentOptions
|
The options for creating the experiment. |
create_experiment: SpinLockingExperimentOptions = SpinLockingExperimentOptions()
class-attribute
instance-attribute
¶
create_experiment(qpu, qubits, lengths, rel_amp=None, options=None)
¶
Creates a Hahn echo Experiment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qpu |
QPU
|
The qpu consisting of the original qubits and quantum operations. |
required |
qubits |
Qubits
|
The qubits to run the experiments on. May be either a single qubit or a list of qubits. |
required |
lengths |
QubitSweepPoints
|
The delays to sweep over for each qubit. Note that |
required |
rel_amp |
float | None
|
The relative amplitude specifies the spin_locking pulse amplitude relative to the pi-pulse amplitude. Default is None and corresponds to the pi pulse amplitude of the specified transition. |
None
|
options |
SpinLockingExperimentOptions | None
|
The options for building the experiment. See [EchoExperimentOptions] and [BaseExperimentOptions] for accepted options. Overwrites the options from [TuneupExperimentOptions] and [BaseExperimentOptions]. |
None
|
Returns:
Name | Type | Description |
---|---|---|
experiment |
Experiment
|
The generated LabOne Q experiment instance to be compiled and executed. |
Raises:
Type | Description |
---|---|
ValueError
|
If delays is not a list of numbers or array when a single qubit is passed. |
Example
options = {
"count": 10,
"transition": "ge",
"averaging_mode": "cyclic",
"acquisition_type": "integration_trigger",
"cal_traces": True,
}
options = TuneupExperimentOptions(**options)
setup = DeviceSetup()
qpu = QPU(
setup=DeviceSetup("my_device"),
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
create_experiment(
qpu=qpu,
qubits=temp_qubits,
lengths=[[1e-6, 5e-6, 10e-6], [1e-6, 5e-6, 10e-6]]
options=options,
)
experiment_workflow(session, qpu, qubits, lengths, rel_amp=None, options=None)
¶
The Hahn echo Workflow.
The workflow consists of the following steps:
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Session
|
The connected session to use for running the experiment. |
required |
qpu |
QPU
|
The qpu consisting of the original qubits and quantum operations. |
required |
qubits |
Qubits
|
The qubits to run the experiments on. May be either a single qubit or a list of qubits. |
required |
lengths |
QubitSweepPoints
|
The delays to sweep over for each qubit. Note that |
required |
rel_amp |
float | None
|
The relative amplitude specifies the spin_locking pulse amplitude relative to the pi-pulse amplitude. Default is None and corresponds to the pi pulse amplitude of the specified transition. |
None
|
options |
SpinLockingWorkflowOptions | None
|
The options for building the workflow. In addition to options from [WorkflowOptions], the following custom options are supported: - create_experiment: The options for creating the experiment. |
None
|
Returns:
Name | Type | Description |
---|---|---|
result |
None
|
The result of the workflow. |
Example
options = experiment_workflow.options()
options.count(10)
options.transition("ge")
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
result = experiment_workflow(
session=session,
qpu=qpu,
qubits=temp_qubits,
lengths=[[1e-6, 5e-6, 10e-6]], [1e-6, 5e-6, 10e-6]],
options=options,
).run()
gaussian_square_sweep(x, risefall_in_samples=None, sigma=1 / 3, zero_boundaries=False, **_)
¶
Create a square waveform with gaussian sides.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
array
|
Samples of the pulse |
required |
risefall_in_samples |
int
|
Width of the rise/fall of the pulse in samples. Dynamically set to 10%
(5% each) of |
None
|
sigma |
float
|
Std. deviation of the Gaussian rise/fall portion of the pulse |
1 / 3
|
zero_boundaries |
bool
|
Whether to zero the pulse at the boundaries |
False
|
Other Parameters:
Name | Type | Description |
---|---|---|
uid |
[str][]
|
Unique identifier of the pulse |
amplitude |
[float][]
|
Amplitude of the pulse |
Returns:
Name | Type | Description |
---|---|---|
pulse |
Pulse
|
Gaussian square pulse. |