Skip to content

laboneq_applications.contrib.experiments.resonator_spectroscopy_qflux

This module defines the resonator spectroscopy versus flux experiment.

In this experiment, we sweep the resonator frequency and the amplitude of a flux pulse played on the flux line of the qubit, in a 2D fashion, to measure how the frequency of the resonator depends on the flux bias of the qubit. In contrast to the resonator spectroscopy amplitude sweep, the swept amplitude is the one of the flux pulse and not the one of the measure pulse.

The resonator spectroscopy versus flux experiment has the following pulse sequence:

qb   --- [ measure ]
flux --- [ flux pulse (swept 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)

Creates a resonator 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 experiment on. May be either a single qubit or a list of qubits.

required
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. The frequencies of all the qubits must contain the same number of sweep points.

required
amplitudes QubitSweepPoints

The amplitudes of the flux 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. 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 frequencies are not a list of numbers or an array.

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)
setup = DeviceSetup("my_device")
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(7.1e9, 7.6e9, 501),
        np.linspace(7.2e9, 7.7e9, 501),
    ],
    amplitudes=[np.linspace(0.1, 1, 10), np.linspace(0.1, 1, 10)],
    options=options,
)

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

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

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. 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.

required
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 flux 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
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(7.1e9, 7.6e9, 501),
        np.linspace(7.2e9, 7.7e9, 501),
    ],
    amplitudes=[np.linspace(0.1, 1, 10), np.linspace(0.1, 1, 10)],
    options=options,
).run()