laboneq_applications.contrib.experiments.qubit_spectroscopy_qflux
¶
This module defines the qubit spectroscopy versus flux experiment.
In this experiment, we sweep the frequency of the qubit drive pulse and the amplitude of a flux pulse played at the same time, in a 2D fashion, to measure how the qubit transition frequency depends on the flux bias.
The qubit spectroscopy versus flux experiment has the following pulse sequence:
qb --- [ spectroscopy drive (swept frequency) ] --- [ measure ]
flux --- [ flux pulse (swept amplitude) ]
If multiple qubits are passed to the experiment_workflow, the above pulses are
applied in parallel on all the qubits.
create_experiment(qpu, qubits, frequencies, amplitudes, options=None)
¶
Creates a qubit spectroscopy versus flux 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 flux-pulse amplitudes to sweep over for each qubit. If |
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 flux-pulse amplitudes to sweep over for each qubit. If |
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 TuneUpWorkflowOptions. See the docstring of TuneUpWorkflowOptions for more details. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
The result of the workflow. |
Example
options = experiment_workflow.options()
options.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()