Readout combined amplitude and frequency optimization#
The two-step strategy described in readout frequency optimization and readout amplitude optimization optimizes frequency and amplitude sequentially, using different proxies for each (resonator-spectroscopy separation for frequency, single-shot assignment fidelity for amplitude). This node instead optimizes both jointly: it sweeps readout amplitude and readout frequency together on a 2-D grid, taking single-shot IQ data at every grid point, and picks the single (amplitude, frequency) pair that directly maximizes state-assignment fidelity. This is more expensive (a full 2-D grid of single-shot acquisitions rather than two 1-D sweeps) but avoids the assumption, implicit in the two-step approach, that the frequency which best separates the resonator states in spectroscopy is also the frequency that gives the best single-shot fidelity at the readout amplitude used in practice.
This can be performed for both 2-state and 3-state readout configurations; the class description below is given for the 3-state case, but the same applies to the 2-state case.
Code structure#
Class: ROCombinedOptimizationParameters#
The optimal grid point is picked as the fidelity maximum with no accept/reject threshold, so every field that shapes the sweep itself is an acquisition field; see Parameter field categories. Two further fields only affect which cells of the debugging IQ-grid figure get rendered, so they are analysis fields — safe to change and re-apply to already-saved data during a bragi_quantum.gui reanalysis.
Acquisition fields#
The sweep is configured by amplitude_bins (int = 21), frequency_samples/frequency_half_width (int = 11 / float = 0.3e6 Hz, frequency window centered on the qubit’s currently calibrated state-0 readout frequency), and repetitions (int = 1024). The amplitude axis can be swept in two modes: if amplitude_lower_fraction and amplitude_upper_fraction differ, the sweep spans that fraction range of the qubit’s current nominal readout amplitude; if they are equal (the default, both 1.0), the sweep instead spans the fixed min_amplitude/max_amplitude range directly (default 0.015 / 0.2).
Analysis fields#
iq_grid_row: str | None = None — restricts the IQ-cloud grid support figure to this amplitude row only, when set.iq_grid_col: str | None = None — restricts the IQ-cloud grid support figure to this frequency column only, when set.
Class: ROTwoStateCombinedOptimizationNode / ROThreeStateCombinedOptimizationNode#
The nodes in which the measurement, analysis and QOI are defined for the 2-state (\(|0\rangle\), \(|1\rangle\)) and 3-state (\(|0\rangle\), \(|1\rangle\), \(|2\rangle\)) variants respectively.
Class: ROCombinedOptimizationMeasurement#
Performs single-shot acquisitions (bin_mode="append") for every (amplitude, frequency) grid point, with the qubit prepared in each of the requested states in turn.
Class: ROCombinedOptimizationAnalysis#
The shared base (unified — replaces the former ROCombinedOptimizationQubitAnalysis + RO{Two,Three}StateCombinedOptimizationNodeAnalysis split) fits a LinearDiscriminantAnalysis model independently at every (amplitude, frequency) grid point on that point’s single-shot IQ cloud, and computes the assignment fidelity as the trace of the (state-count-normalized) confusion matrix. The grid point with the highest fidelity is selected as the optimum; its fidelity heatmap over (amplitude, frequency) is the standard figure, with the selected point marked and — when a previous calibration exists — the previous operating point marked for comparison. A support figure shows the IQ cloud grid across all sampled points, with the optimal cell highlighted.
ROTwoStateCombinedOptimizationAnalysisadditionally rotates the optimal-point IQ cloud so that \(|0\rangle\) falls on the negative and \(|1\rangle\) on the positive side of one axis (the Thresholded-Acquisition convention), and reports the LDA decision boundary as a rotation angle and a threshold on that axis, alongside the raw LDA coefficients.ROThreeStateCombinedOptimizationAnalysisinstead reports the three-state decision boundary in the compact centroid/angle form described in readout amplitude optimization: the common intersection point of the three pairwise boundaries (centroid_I,centroid_Q) plus the angle of each boundary from that point (omega_01,omega_12,omega_20).
QOI classes: ROTwoStateCombinedOptimizationQOI / ROThreeStateCombinedOptimizationQOI#
Both store the optimal amplitude, frequency and fidelity. The 2-state QOI adds rotation, threshold, and the raw LDA coefficients (lda_coef_0, lda_coef_1, lda_intercept); the 3-state QOI adds centroid_I, centroid_Q, omega_01, omega_12, omega_20, and the inverted confusion matrix at the optimum (inv_cm_opt, used downstream to correct readout-assignment statistics).