Readout optimization¶
Qibocal provides different protocols to improve the readout pulse parameters by optimizing the assignment fidelity.
Resonator Amplitude¶
The resonator amplitude protocol improves the readout amplitude by optimizing the assignment fidelity.
Parameters¶
- class qibocal.protocols.readout_optimization.resonator_amplitude.ResonatorAmplitudeParameters(amplitude_step: float, amplitude_start: float = 0.0, amplitude_stop: float = 1.0, error_threshold: float = 0.003)[source]
ResonatorAmplitude runcard inputs.
- amplitude_step: float
Amplituude step to be probed.
- amplitude_start: float = 0.0
Amplitude start.
- amplitude_stop: float = 1.0
Amplitude stop value
- error_threshold: float = 0.003
Probability error threshold to stop the best amplitude search
- hardware_average: bool = False
By default hardware average will be performed.
- nshots: int
Number of executions on hardware.
- relaxation_time: float
Wait time for the qubit to decohere back to the gnd state.
Example¶
It follows an example runcard of the resonator amplitude routine with the plot generated in the report.
- id: resonator_amplitude
operation: resonator_amplitude
parameters:
amplitude_step: 0.0005
amplitude_start: 0.001
amplitude_stop: 0.005
As shown in the picture below, the protocol sweeps the readout amplitude and evaluates the errors probability.

Resonator Frequency¶
The resonator frequency protocol performs a sweep of the readout frequency to maximize assignment fidelity.
Parameters¶
- class qibocal.protocols.readout_optimization.resonator_frequency.ResonatorFrequencyParameters(freq_width: int, freq_step: int)[source]
Optimization RO frequency inputs.
- freq_width: int
Width [Hz] for frequency sweep relative to the readout frequency [Hz].
- freq_step: int
Frequency step for sweep [Hz].
- hardware_average: bool = False
By default hardware average will be performed.
- nshots: int
Number of executions on hardware.
- relaxation_time: float
Wait time for the qubit to decohere back to the gnd state.
Example¶
In the following we show a possible runcard for the optimization of the resonator frequency together with expected output plot.
- id: resonator_frequency
operation: resonator_frequency
parameters:
freq_width: 1_000_000
freq_step: 100_000

Resonator Optimization¶
In addition to this metric, the protocol also computes the quantum non-demolition-ness (QND) of the measurement, which serves to evaluate measurement-induced state disturbance. To capture leakage outside the computational basis the protocol includes the computation of QND with an additional \(\pi\) pulse. Readout parameters are then updated based on the configuration that yields the highest assignment fidelity.
Parameters¶
- class qibocal.protocols.readout_optimization.resonator_optimization.ResonatorOptimizationParameters(freq_width: int, freq_step: int, amplitude_min: float, amplitude_max: float, amplitude_step: float, delay: float = 0)[source]
Resonator optimization runcard inputs
- freq_width: int
Width for frequency sweep relative to the readout frequency [Hz].
- freq_step: int
Frequency step for sweep [Hz].
- amplitude_min: float
Minimum amplitude.
- amplitude_max: float
Maximum amplitude.
- amplitude_step: float
Step amplitude.
- delay: float = 0
Delay between readouts, could account for resonator depletion or not [ns].
- property frequency_span: ndarray
- hardware_average: bool = False
By default hardware average will be performed.
- nshots: int
Number of executions on hardware.
- relaxation_time: float
Wait time for the qubit to decohere back to the gnd state.
Example¶
A possible runcard for the resonator optimization protocol could be:
- id: resonator optimization
operation: resonator_optimization
parameters:
freq_width: 3_000_000
freq_step: 125_000
amplitude_step: 0.00025
amplitude_start: 0.00025
amplitude_stop: 0.0085
delay: 1000
The plot generated by the report should be similar to the following one:
