laboneq_applications.experiments.qubit_spectroscopy
¶
This module defines the qubit spectroscopy experiment.
In this experiment, we sweep the frequency of a qubit drive pulse to characterize the qubit transition frequency.
The qubit spectroscopy experiment has the following pulse sequence:
qb --- [ prep transition ] --- [ x180_transition (swept frequency)] --- [ measure ]
If multiple qubits are passed to the run
workflow, the above pulses are applied
in parallel on all the qubits.
create_experiment(qpu, qubits, frequencies, options=None)
¶
Creates a Qubit Spectroscopy 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 |
frequencies |
QubitSweepPoints
|
The qubit frequencies to sweep over for the qubit drive pulse. If |
required |
options |
QubitSpectroscopyExperimentOptions | None
|
The options for building the experiment. See [QubitSpectroscopyExperimentOptions] and [BaseExperimentOptions] for accepted options. Overwrites the options from [QubitSpectroscopyExperimentOptions] 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 the qubits, amplitudes, and frequencies are not of the same length. |
ValueError
|
If amplitudes and frequencies are not a list of numbers when a single qubit is passed. |
ValueError
|
If frequencies is not a list of lists of numbers. If amplitudes is not None or a list of lists of numbers. |
Example
options = QubitSpectroscopyExperimentOptions()
options.count = 10
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
create_experiment(
qpu=qpu,
qubits=temp_qubits,
frequencies = [
np.linspace(6.0e9, 6.3e9, 101),
np.linspace(5.8e9, 6.2e9, 101)
]
options=options,
)
experiment_workflow(session, qpu, qubits, frequencies, temporary_parameters=None, options=None)
¶
The Qubit Spectroscopy 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 |
frequencies |
QubitSweepPoints
|
The qubit frequencies to sweep over for the qubit drive pulse. If |
required |
temporary_parameters |
dict[str, dict | TransmonParameters] | None
|
The temporary parameters to update the qubits with. |
None
|
options |
TuneUpWorkflowOptions | 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 |
---|---|---|
WorkflowBuilder |
None
|
The builder for the experiment workflow. |
Example
options = experiment_workflow.options()
options.create_experiment.count(10)
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,
frequencies = [
np.linspace(6.0e9, 6.3e9, 101),
np.linspace(5.8e9, 6.2e9, 101)
]
options=options,
).run()