Readout amplitude optimization, step 2 in readout optimization#

The current strategy for optimizing the readout consists of two main steps:

  • Step 1: Optimize the readout frequency for each state using resonator spectroscopy.

  • Step 2: Optimize the readout amplitude for each state using single-shot measurements and state discrimination analysis.

This can be performed for both 2-state and 3-state readout configurations. The class description is given for the 3-state case, but the same applies to the 2-state case.

This node implements step 2 of the readout optimization by performing a scan of the amplitudes and selecting the value providing the highest readout fidelity. The frequency used is the one determined in the previous step of the readout optimization.

Code structure#

Class: ROAmplitudeOptimizationParameters#

The ROAmplitudeOptimizationParameters class only defines acquisition fields (see Parameter field categories) — there is no analysis field, since the optimal amplitude is picked as the fidelity maximum with no accept/reject threshold.

Acquisition fields#

  • repetitions: int = 1024 — number of repetitions (averages) per point.

  • amplitude_bins: int = 30 — number of amplitude samples in the sweep.

  • amplitude_lower_fraction: float = 0.25 — lower bound of the sweep as a fraction of the punchout amplitude.

  • amplitude_upper_fraction: float = 1.2 — upper bound of the sweep as a fraction of the punchout amplitude.

Class: ROThreeStateAmplitudeOptimizationNode#

The node in which the measurement, analysis and QOI are defined. A sibling class, ROTwoStateAmplitudeOptimizationNode, implements the 2-state (\(|0\rangle\), \(|1\rangle\)) variant.

Class: ROAmplitudeOptimizationMeasurement#

This class performs a single-shot measurement for a range of readout amplitudes at the readout frequency determined in the previous step of the readout optimization.

Class: ROThreeStateAmplitudeOptimizationAnalysis#

This class (together with its shared base ROAmplitudeOptimizationAnalysis, unified — replaces the former ROAmplitudeOptimizationQubitAnalysis + ROThreeStateAmplitudeOptimizationNodeAnalysis split) handles all the operations common to all qubits and produces the figures. For each qubit, three figures are displayed.

  1. The readout fidelity as a function of the readout amplitude, with the optimal amplitude indicated.

  2. The IQ points at the optimal amplitude with the state assignment indicated.

  3. The matrix of confusion at the optimal amplitude.

For each amplitude, the single-shot assignments are performed using a LinearDiscriminantAnalysis model. The readout fidelity is calculated from the assignments as the trace of the confusion matrix. The optimal amplitude is selected as the one maximizing the readout fidelity. For the 3-state case, the three pairwise LDA decision boundaries (0|1, 1|2, 2|0) meet at a common point in the IQ plane — the centroid (centroid_I, centroid_Q) — and each boundary line is then stored compactly as its angle from that centroid (omega_01, omega_12, omega_20), rather than as three separate LDA coefficient sets. The 2-state variant, ROTwoStateAmplitudeOptimizationAnalysis, shares this same base and fidelity search but only needs a single boundary, reported instead as the LDA decision-boundary parameters (rotation angle, threshold, coefficients).