laboneq_applications.experiments.qubit_spectroscopy_amplitude
¶
This module defines the qubit spectroscopy experiment.
In this experiment, we sweep the frequency and the amplitude of a qubit drive pulse to characterize the qubit transition frequency and its amplitude.
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, amplitudes, 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
|
QuantumElements
|
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 |
amplitudes
|
QubitSweepPoints
|
The amplitudes to sweep over for each qubit. It must be a list of numbers or arrays or a list of lists of numbers or arrays. |
required |
options
|
QubitSpectroscopyExperimentOptions | None
|
The options for building the experiment. See [QubitSpectroscopyExperimentOptions] and [BaseExperimentOptions] for accepted options. Overwrites the options from [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(
quantum_elements=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_quantum_elements()
create_experiment(
qpu=qpu,
qubits=temp_qubits,
frequencies = [
np.linspace(5.8e9, 6.2e9, 101),
np.linspace(0.8e9, 1.2e9, 101)
],
amplitudes=[[0.1, 0.5, 1], [0.1, 0.5, 1]],
options=options,
)
experiment_workflow(session, qpu, qubits, frequencies, amplitudes, 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
|
QuantumElements
|
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 |
amplitudes
|
QubitSweepPoints
|
The amplitudes to sweep over for each qubit drive pulse. |
required |
temporary_parameters
|
dict[str | tuple[str, str, str], dict | QuantumParameters] | None
|
The temporary parameters with which to update the quantum elements and
topology edges. For quantum elements, the dictionary key is the quantum
element UID. For topology edges, the dictionary key is the edge tuple
|
None
|
options
|
TuneUpWorkflowOptions | None
|
The options for building the workflow as an instance of [QubitSpectroscopyWorkflowOptions]. See the docstring of [QubitSpectroscopyWorkflowOptions] for more details. |
None
|
Returns:
Name | Type | Description |
---|---|---|
result |
None
|
The result of the workflow. |
Example
options = experiment_workflow.options()
options.create_experiment.count(10)
qpu = QPU(
quantum_elements=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_quantum_elements()
result = experiment_workflow(
session=session,
qpu=qpu,
qubits=temp_qubits,
frequencies = [
np.linspace(5.8e9, 6.2e9, 101),
np.linspace(0.8e9, 1.2e9, 101)
],
amplitudes=[[0.1, 0.5, 1], [0.1, 0.5, 1]],
options=options,
).run()