Skip to content

laboneq_applications.contrib.experiments.ac_stark_shift_vs_power

This module defines the AC stark shift spectroscopy experiment.

In this experiment, qubit spectroscopy is performed while the amplitude of the readout tone is varied. The photons in the readout resonator cause a shift in the qubit frequency (AC Stark shift). By fitting the relationship between the frequency shift and the readout amplitude, we can determine the qubit frequency with greater precision.

The experiment has the following pulse sequence, where the qubit spectroscopy drive and the measure pulse are played simultaneously:

qb --- [ spect ]
   --- [ measure (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 amplitude of the readout line and uses its hardware oscillator, it can only be run in parallel on qubits whose measure lines use distinct QA channels.

The acquisition type is restricted to SPECTROSCOPY on QCCS or INTEGRATION on ZQCS, both utilizing Hardware modulation.

AcStarkExperimentOptions

Base options for the AC Stark shift vs power experiment.

Attributes:

Name Type Description
acquisition_type AcquisitionType

Acquisition type to use for the experiment. Use AcquisitionType.SPECTROSCOPY on QCCS or AcquisitionType.INTEGRATION on ZQCS. Default: AcquisitionType.SPECTROSCOPY.

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

Creates an AC Stark shift vs. power 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 spectroscopy drive 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 readout amplitudes to sweep over for the measure pulse 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 AcStarkExperimentOptions | None

The options for building the experiment as an instance of AcStarkExperimentOptions. See the docstring of this class for more details.

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, frequencies and amplitudes are not of the same length.

ValueError

If frequencies or amplitudes is not a list of numbers or an array when a single qubit is passed, or a list of lists of numbers or arrays of the same length when multiple qubits are passed.

ValueError

If the acquisition_type is neither AcquisitionType.SPECTROSCOPY nor AcquisitionType.INTEGRATION.

Example
options = AcStarkExperimentOptions()
options.count = 10
# QPU from a single-qubit device setup
qpu = QPU(
    quantum_elements=TunableTransmonQubit.from_device_setup(setup),
    quantum_operations=TunableTransmonOperations(),
)
create_experiment(
    qpu=qpu,
    qubits=qpu.quantum_elements[0],
    frequencies=np.linspace(6.0e9, 6.3e9, 101),
    amplitudes=np.linspace(0.2, 0.6, 21),
    options=options,
)

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

The AC Stark Shift vs Power 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 list[str] | str

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 amplitude of the readout line and uses its hardware oscillator, which are shared by all qubits multiplexed on the same QA channel.

required
frequencies QubitSweepPoints

The qubit frequencies to sweep over for the qubit spectroscopy drive 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 readout amplitudes to sweep over for the measure pulse 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.

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 this class for more details.

None

Returns:

Name Type Description
WorkflowBuilder None

The builder for the experiment 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(6.0e9, 6.3e9, 101),
    amplitudes=np.linspace(0.2, 0.6, 21),
    options=options,
).run()