Qubit Spectroscopy Calibration and Analysis#
Qubit spectroscopy is a vital technique for identifying qubit resonance frequencies. By applying a probing signal to a qubit at various frequencies and measuring the response, we can accurately locate resonance frequencies and optimize qubit operation. In this node, the qubit frequencies for both 01 and 12 transitions can be attained depending on the initial qubit state.
Several nodes exist to target 01 and 12 transitions, as well as different analysis methods. The most commonly used nodes are described below.
Registry variants: pulsed and continuous#
Three registry variants share one node class, measurement class and analysis class, differing in
transition and continuous_mode:
qubit_spectroscopy("01", pulsed) andqubit_spectroscopy_12("12", pulsed, X gate preparing \(|1\rangle\)).cont_qubit_spectroscopy("01", continuous): the drive tone is held on for the whole sweep.
Continuous mode is faster because there is nothing to reset. Pulsed spectroscopy keeps the qubit in a well-defined state, so — absent active reset protocols, which are experimental — every point must be followed by a passive reset waiting for the qubit to relax, and that wait dominates the run time. With the tone always on there is no well-defined state to preserve; the qubit is generally not in the ground state, and that is enough, since the resonator shifts dispersively and that shift is what is detected.
Continuous mode is 0→1 only: it would take three-tone spectroscopy to find the 1→2 transition this way,
which this node does not implement. continuous_mode=True with transition="12" is listed in
QubitSpectroscopyParameters.invalid_variant_combinations, so it raises ExperimentParameterError and has no
registry variant.
Code structure#
Measurement class: TwoTonesMultidimMeasurement#
The TwoTonesMultidimMeasurement class facilitates the creation of schedules for qubit spectroscopy experiments. It
supports multi-qubit spectroscopy, enabling parallel probing and measurement. Both 01 and 12 transitions can be targeted by setting the initial qubit state.
Method: schedule_function#
The schedule_function generates an experimental schedule for performing qubit spectroscopy. The sequence involves:
Reset: Resets all qubits to a known state.
Initialize Qubit: Initialize the qubit to state 0 or 1, depending on which qubit frequency you want to attain.
Frequency Sweeping: Iteratively adjusts the probing frequency and amplitude.
Measurement: Captures the qubit response at each probing point.
Parameters:
transition(str):"01"or"12"— which transition to target, and hence whether an X gate is applied to prepare \(|1\rangle\).spec_frequencies(dict[str, np.ndarray]): Frequencies to probe for each qubit.spec_pulse_amplitudes(dict[str, np.ndarray]): Amplitudes of the probing pulses.repetitions(int): Number of times the schedule will repeat.spec_pulse_duration(float | Literal["continuous"]): Length of the spectroscopy pulse in seconds, or the string"continuous"to hand off to_continuous_schedule_functionbelow.continuous_reset_duration(float): Forwarded to the continuous schedule; unused by the pulsed one.
Returns:
A
Scheduleobject representing the experimental procedure.
Method: _continuous_schedule_function#
Selected when spec_pulse_duration == "continuous", which is what the node passes in place of a pulse
length when continuous_mode is set. The drive is a constant VoltageOffset held across the sweep rather
than a SquarePulse per point, and SetClockFrequency steps the NCO from a loop register. Each frequency
is measured repetitions times, followed by an idle of continuous_reset_duration — there is no qubit
reset here, unlike the pulsed schedule.
Amplitude means the same thing in both schedules: the compiler scales the swept value identically for the
pulsed SquarePulse gain and the continuous VoltageOffset, so amplitudes are directly comparable
between variants.
Parameters: spec_frequencies, spec_pulse_amplitudes, repetitions and
continuous_reset_duration, as for schedule_function above.
Returns: a Schedule object representing the experimental procedure.
Analysis class: QubitSpectroscopyAnalysis#
The QubitSpectroscopyAnalysis class handles both the per-qubit fit and the figure generation for both the 0→1 and 1→2 transitions, selected via parameters.transition.
For a 1-D sweep (frequency only), a Lorentzian peak plus a constant baseline is fitted to the frequency trace and its center is returned as the qubit frequency. For a 2-D sweep (frequency × spectroscopy-pulse amplitude, as used to feed the optimal amplitude into qubit spectroscopy vs current), the same Lorentzian fit is applied independently to each amplitude slice; a fit is only accepted if its significance (peak height divided by the off-peak-region standard deviation) clears significance_threshold, and — among the amplitudes with an accepted peak — the amplitude whose raw magnitude maximum is highest is selected as the qubit frequency and optimal spectroscopy amplitude.
Method: qubit_spectroscopy_analysis#
Runs the peak-finding routine described above over the dataset (1-D or 2-D, detected automatically), populating the fitted frequency, its error, and — for the 2-D case — the selected optimal amplitude.
Returns (QOI): clock_freqs:f01 (or f12) and spec:spec_ampl_optimal, plus the fit significance.
Method: add_traces#
For a 2-D sweep, draws a 2-D color mesh of the spectroscopy data (frequency × amplitude) with the selected frequency/amplitude marked; for a 1-D sweep, draws the frequency trace with the fitted peak location marked.
Parameters class: QubitSpectroscopyParameters#
The QubitSpectroscopyParameters class is stored in the parameters.py file and contains the configurable parameters, all configurable from the device config file using the [device.node_parameters.all] group. Each field is either an acquisition field (baked into the hardware sweep) or an analysis field (post-processing only) — see Parameter field categories.
Acquisition fields#
transition:"01"or"12"— which transition to look for. Variant-defining.continuous_mode: whether to hold the drive tone on rather than pulse it (defaultFalse). Only usable with the 0→1 transition. Variant-defining.min_amplitude/max_amplitude/amplitude_bins: range and density of the spectroscopy-pulse amplitude sweep.samples/half_width: density and window of the frequency sweep.spec_pulse_duration: duration of the spectroscopy drive pulse, in seconds (default 20e-6). Ignored whencontinuous_modeisTrue.continuous_reset_duration: idle time after each measurement in continuous mode, in seconds (default 20e-6). Continuous mode holds the drive on and so has no qubit reset; this wait instead lets the readout resonator relax (its kappa relaxation time), which keeps successive measurements statistically independent. It is a parameter becausereset_systemhas no settable duration. Ignored whencontinuous_modeisFalse.repetitions: number of repetitions (averages) per point (default 600).
Analysis fields#
significance_threshold: minimum peak significance (sigma) for a fit to be accepted (default 2.9).
QOI class: QubitSpectroscopyBaseQOI#
The QubitSpectroscopyBaseQOI class is stored in the parameters.py file and contains the QOI for the qubit spectroscopy node (fitted frequency, its error, the optimal spectroscopy amplitude, and the fit significance).