Skip to content

laboneq_applications.experiments.resonator_spectroscopy_amplitude

This module defines the resonator spectroscopy amplitude sweep experiment.

In this experiment, we sweep the resonator frequency and the amplitude of a measure pulse in a 2D fashion to characterize the resonators coupled to the qubits.

The resonator spectroscopy amplitude sweep experiment has the following pulse sequence:

qb --- [ measure ]
     sweep amplitude

If multiple qubits are passed to the experiment_workflow, the above sequence is applied in parallel on all the qubits. Since this experiment sweeps the frequency of the hardware oscillator of the readout line, it can only be run in parallel on qubits whose measure lines use distinct QA channels.

create_experiment(qpu, qubits, frequencies, amplitudes, options=None)

A Resonator Spectroscopy where the measure-pulse amplitude is also swept.

Changed in version 26.10.0

The qubit argument was renamed to qubits and now also accepts multiple qubits. The frequencies and amplitudes of multiple qubits are swept in parallel.

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 resonator frequencies to sweep over for each qubit. If qubits is a single qubit, frequencies must be a list of numbers or an array. Otherwise it must be a list of lists of numbers or arrays. The frequencies of all the qubits must contain the same number of sweep points.

required
amplitudes QubitSweepPoints

The amplitudes to sweep over for the resonator of each qubit. If qubits is a single qubit, amplitudes must be a list of numbers or an array. Otherwise it must be a list of lists of numbers or arrays. The amplitudes of all the qubits must contain the same number of sweep points.

required
options ResonatorSpectroscopyExperimentOptions | None

The options for building the experiment. See ResonatorSpectroscopyExperimentOptions 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 acquisition_type is neither AcquisitionType.SPECTROSCOPY nor AcquisitionType.INTEGRATION.

ValueError

If the frequencies or the amplitudes of the qubits do not contain the same number of sweep points.

Example
options = {
    "count": 10,
    "spectroscopy_reset_delay": 3e-6,
}
options = ResonatorSpectroscopyExperimentOptions(**options)
# QPU from a single-qubit device setup
qpu = QPU(
    quantum_elements=TunableTransmonQubit.from_device_setup(setup),
    quantum_operations=TunableTransmonOperations(),
)
q0 = qpu["q0"]
create_experiment(
    qpu=qpu,
    qubits=q0,
    frequencies=np.linspace(7.1e9, 7.6e9, 501),
    amplitudes=np.linspace(0.1, 1, 10),
    options=options,
)

experiment_workflow(session, qpu, qubits=None, *, frequencies, qubit=None, amplitudes, temporary_parameters=None, options=None)

The Workflow for a resonator spectroscopy with a readout-amplitude sweep.

The workflow consists of the following steps:

Deprecated in version 26.10.0

The qubit argument is deprecated. Please use qubits instead.

Changed in version 26.10.0

The qubit argument was renamed to qubits and now also accepts multiple qubits, passed as a list of UIDs. The frequencies and amplitudes of multiple qubits are swept in parallel, which is only possible if the measure lines of the qubits use distinct QA channels.

Removed in version 26.7.0

The qubit argument of type QuantumElement has been removed. Please pass qubit of type str instead, i.e., the quantum element UID instead of the quantum element instance.

Changed in version 26.4.0

All arguments apart from session, qpu, and qubits are now keyword arguments.

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 list[str] | str | None

The qubits to run the experiments on, passed by UID. May be either a single qubit or a list of qubits. The measure lines of the qubits must use distinct QA channels, because this experiment sweeps the frequency of the hardware oscillator of the readout line, which is shared by all qubits multiplexed on the same QA channel.

None
frequencies QubitSweepPoints

The resonator frequencies to sweep over for the readout pulse (or CW) sent to the resonator of each qubit. If qubits is a single qubit, frequencies must be a list of numbers or an array. Otherwise it must be a list of lists of numbers or arrays.

required
amplitudes QubitSweepPoints

The amplitudes of the readout pulses to sweep over for each qubit. If qubits is a single qubit, amplitudes must be a list of numbers or an array. Otherwise it must be a list of lists of numbers or arrays.

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 (tag, source node UID, target node UID).

None
qubit str | None

Deprecated. The single qubit to run on, passed by UID for the experiment workflows (quantum element for the analysis). Use qubits instead.

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
result None

The result of the workflow.

Example
options = experiment_workflow.options()
options.count(10)
# QPU from a single-qubit device setup
qpu = QPU(
    quantum_elements=TunableTransmonQubit.from_device_setup(setup),
    quantum_operations=TunableTransmonOperations(),
)
result = experiment_workflow(
    session=session,
    qpu=qpu,
    qubits="q0",
    frequencies=np.linspace(7.1e9, 7.6e9, 501),
    amplitudes=np.linspace(0.1, 1, 10),
    options=options,
).run()