CZ Standard Error Amplification (SEA) in Two-Qubit Gate Calibration#
A single CZ pulse’s leakage into \(|2\rangle\) (or other coherent errors) can be too small to resolve directly.
Standard error amplification (SEA) is the standard gate-error-amplification technique for this: repeat the
gate many times in a row, so that the small error of each repetition accumulates into a detectable signal.
This node (registry variant cz_sea_fix_cycles) applies the CZ gate n_cz_gates times in a row on both
qubits of a coupler prepared in \(|1\rangle\), then sweeps the CZ pulse duration (outer) and frequency (inner) around
the coupler’s currently calibrated values and picks the point where the joint P(\(|00\rangle\)) after the repeated
gates is highest. An ideal CZ leaves \(|11\rangle\) unchanged apart from a phase, so the closing X gates return the pair
to \(|00\rangle\) (P = 1); leakage into \(|2\rangle\) or a coherent over/under-rotation leaves population elsewhere and lowers
it.
“Fix cycles” in the name means that the number of repeated CZ gates (the “cycles”) is held fixed at
n_cz_gates for the whole scan while duration and frequency are swept — the same “Fix X” naming as
CZParametrizationFixDuration in CZ Parametrization, whose duration is fixed.
Where it fits in the CZ calibration chain#
This node is meant as the final fine-tuning pass. It cannot find a working point from scratch: it reads the
coupler’s already calibrated CZ pulse amplitude, duration, frequency and virtual-Z phase corrections, and
only refines the duration and frequency around them. So it runs after the coarser working point has been found
by CZ Parametrization, CZ Chevron and/or
CZ Amp/Duration, and after the phase corrections have been calibrated by the local
variants of CZ Phases (cz_phases_local and cz_phases_local_swap).
Code structure#
Class: CZSEAFixCycles#
The CZSEAFixCycles class sets up the duration/frequency sweep for every coupler. Couplers whose computed CZ
transition frequency exceeds max_transition_frequency are skipped up front, as in the other CZ-tuning nodes.
Unlike those nodes, the sweep is centered not on a device default or a fresh spectroscopy result but on the
coupler’s currently calibrated CZ pulse settings — self.edges[coupler].cz.square_duration and .cz_freq,
read directly off the device (with .cz_freq falling back to the CZ transition frequency helper if it reads
as 0 or NaN). The CZ pulse amplitude and its virtual-Z phase corrections are likewise read from the currently
calibrated device state and held fixed. A single 3-state calibration-points
block is appended once for the whole run (append_calibration_points = True), used by the analysis to correct
the readout classifier for centroid drift since it was last calibrated.
Class: CZSEAFixCyclesMeasurement#
The measurement class responsible for executing the gate-error-amplification sequence, read out with
3-state-optimized readout (Measure_RO_3state_Opt).
Method: point_schedule / schedule_function#
For every coupler and each (duration, frequency) point, both qubits are reset and excited to \(|1\rangle\), then
n_cz_gates CZ pulses are applied back-to-back, each followed by its calibrated virtual-Z phase correction on
the control/target qubit (folded into (-360, 0] so the correction always rotates “backwards”). Both qubits
are then driven back towards \(|0\rangle\) (X gates) before a single-shot measurement tagged with the cz_pulse_durations,
cz_pulse_frequencies, and shot_index coordinates (bin_mode="append"). The whole per-point sequence is
wrapped in an explicit shot-loop register (loop_repetitions shots) rather than the schedule’s top-level
repetitions, as required by the automatic calibration-points block. Durations are snapped up to the 1 ns
hardware grid (ceiling) so the pulse never underruns. Because the repeated-CZ body’s duration is
summed loop_repetitions times, qblox_scheduler’s grid-time tolerance is widened to absorb the resulting
sub-picosecond float rounding residue (the same fix purity_benchmarking’s measurement uses).
Class: CZSEAFixCyclesAnalysis#
The analysis class that classifies both qubits’ single shots into states 0/1/2 and finds the best (duration, frequency) point.
Method: _read_boundary / _drift_correction#
Rather than fitting a fresh LDA classifier per run (as tergite-autocalibration’s original node did), this
analysis reads each qubit’s 3-state classification boundary (centroid_I/centroid_Q/omega_01/omega_12/
omega_20) directly from Redis — the value calibrated by
RO Amplitude Optimization (3-state) or
RO Combined Optimization (3-state). If the node’s automatic \(|0\rangle\)/\(|1\rangle\)/\(|2\rangle\)
calibration points are complete for a qubit, their measured mean centroid is compared against the
Redis-calibrated one and the difference (drift) is subtracted from that qubit’s raw IQ before classification;
if incomplete (e.g. no calibrated 1→2 pulse for that qubit), the Redis-calibrated boundary is used as-is with
a warning.
Method: compute_qoi#
Both qubits’ (drift-corrected) single-shot IQ is classified via assign_state, and the fraction of shots where
both qubits classify as \(|0\rangle\) is computed per (duration, frequency) bin. The bin with the highest joint P(\(|00\rangle\))
is selected and reported as the new CZ pulse duration/frequency working point.
Output: xarray.Dataset#
Each coupler’s dataset holds, per qubit, the single-shot classified IQ data indexed by duration, frequency, and shot, plus the single automatic \(|0\rangle\)/\(|1\rangle\)/\(|2\rangle\) calibration-points block for the whole run.
Figures#
The figure shows a heatmap of joint P(\(|00\rangle\)) over the swept (frequency, duration) grid, with the selected best point marked with a star and a label box reporting its frequency, duration, and P(\(|00\rangle\)).
Class: CZSEAFixCyclesParameters#
The CZSEAFixCyclesParameters class encapsulates the parameters for the standard error amplification scan.
All fields are currently acquisition fields; see
Parameter field categories.
Acquisition fields#
n_cz_gates: int = 4 — number of CZ gates applied back-to-back per point, to amplify leakage into \(|2\rangle\) that a single CZ pulse would leave too small to resolve.number_of_shots: int = 500 — single-shot repetitions per (duration, frequency) point.repetitions: int = 1024 — hardware-averaged shots for the automatic calibration-points block, used to correct the 3-state readout classifier for centroid drift.reset_duration: float | None = None — override of the system reset duration;Nonefalls back to the device’s own reset duration.duration_sweep/duration_bins: float = 15 ns / int = 7 — half-width and number of points of the duration sweep, centered on the coupler’s currently calibratedcz.square_duration.frequency_sweep/frequency_bins: float = 0.2 MHz / int = 3 — half-width and number of points of the frequency sweep, centered on the coupler’s currently calibratedcz.cz_freq. The upper end is clipped tomax_transition_frequency − 1 MHz, so near that limit the sweep is no longer symmetric around the center.cz_transition: str = “20” — targeted transition,"20"or"02": determines which qubit of the coupler plays control vs. target for the virtual-Z phase corrections.downconvert_frequency: float = 4.4 GHz — flux-line downconversion offset; same convention as CZ Parametrization.max_transition_frequency: float = 1.0 GHz — couplers whose CZ transition frequency exceeds this are skipped entirely (SPI-rack safety limit).
Class: CZSEAFixCyclesQOI#
cz_pulse_frequency: the selected CZ pulse frequency (Hz).cz_pulse_duration: the selected CZ pulse duration (s).
Both are written to the coupler edge’s ParametricCZSubmodule (cz:cz_freq / cz:square_duration) — fields
the earlier CZ-tuning nodes already wrote (see Related nodes), refined further here. Unlike
most QOIs, no error term is reported for either field
(to_redis_dict hardcodes error: 0.0), since the selected point is a grid maximum rather than a fit result.