CZ Parametrization in Two-Qubit Gate Calibration#
The parametric CZ gate is implemented by flux-pulsing a tunable coupler so that the \(|11\rangle\) state of its two qubits comes into resonance with either \(|20\rangle\) or \(|02\rangle\). Before that resonance’s exact frequency and duration can be refined (see CZ chevron), a candidate working-point current first needs a coarse check: does a usable avoided crossing exist there at all? This node prepares both qubits of a coupler in the excited state, applies a CZ flux pulse of fixed duration, and sweeps the pulse’s frequency and amplitude. If a real \(|11\rangle\)–\(|20\rangle\) (or \(|11\rangle\)–\(|02\rangle\)) crossing exists in the swept region, one qubit’s magnitude response should peak (population transferred towards \(|2\rangle\)) while the other’s dips (population transferred towards \(|0\rangle\)) at the same (frequency, amplitude) point — a “blob” in the 2-D scan roughly co-located for both qubits.
Code structure#
Class: CZParametrizationFixDuration#
The CZParametrizationFixDuration class sets up the frequency/amplitude scan for every coupler. Couplers
whose computed CZ transition frequency exceeds max_transition_frequency are skipped up front (see
Parameters below). The frequency sweep is centered on each coupler’s CZ transition frequency —
preferentially read back from Redis (written by a prior cz_currents_from_spectroscopies run) and otherwise
computed from the qubits’ calibrated 01/12 clock frequencies. The amplitude sweep is capped at 0.70 V to stay
under the AWG gain limit, regardless of the configured amplitude_max.
Class: CZParametrizationFixDurationMeasurement#
The measurement class responsible for executing the scan.
Method: schedule_function#
For every coupler, both qubits are excited to \(|1\rangle\) and the coupler’s flux pulse — of fixed duration
cz_pulse_duration — is applied at each (frequency, amplitude) point of that coupler’s sweep, then both
qubits are read out. Because different couplers can have different sweeps, the sweep is unrolled at compile
time (a static pulse per point) rather than driven by a hardware loop; couplers run as parallel branches
anchored to a shared start reference.
Class: CZParametrizationFixDurationAnalysis#
The analysis class that finds the working point from the coupler’s 2-D (frequency, amplitude) magnitude maps
for both of its qubits. Because the dataset’s data variables are named after each qubit rather than the
coupler, this class overrides analyse_element/_process to group a coupler’s two qubit variables directly
instead of relying on the generic per-element slicing.
Method: compute_qoi#
The point of maximum normalized magnitude difference between the two qubits is taken as the candidate
working point, via CombinedFrequencyVsAmplitudeAnalysis, which accepts it only if both of the following
hold:
Position agreement: the max-difference point agrees (within
frequency_tolerance/amplitude_tolerance) with either the \(|2\rangle\)-driven qubit’s magnitude maximum or the \(|0\rangle\)-driven qubit’s magnitude minimum.Spatial coherence: both qubits’ magnitude maps show real spatial structure rather than being indistinguishable from noise. This is checked with
spatial_coherence_zscore, which compares the map’s total variation (mean absolute difference between neighboring pixels — low for a smooth blob/chevron, comparable to noise-shuffled data if there’s no real structure) against many random pixel-shuffles of the same map, and reports how many standard deviations below the shuffled-null mean the real total variation sits. Both qubits’ z-scores must exceedcoherence_zscore_threshold.
The weaker of the two qubits’ coherence z-scores is also reported as cz_parametrization_transition_quality
— a score for ranking multiple candidate parking currents against each other even when several pass the
compatibility check (higher is a cleaner, more chevron-like map).
Output: xarray.Dataset#
Each coupler’s dataset holds, per qubit, a 2-D magnitude map over the swept CZ pulse frequencies and amplitudes.
Figures#
The figure shows both qubits’ raw (frequency, amplitude) magnitude heatmaps side by side, with each qubit’s own extremum point and the shared working point marked, and a text box reporting the parking current, the transition quality, and whether the two qubits were found compatible.
Class: CZParametrizationFixDurationParameters#
The CZParametrizationFixDurationParameters class encapsulates the parameters for the scan. Every field is
an acquisition field (baked into the hardware sweep — changing it requires re-running on hardware) or an
analysis field (post-processing only — safe to change and re-apply to already-saved data); see
Parameter field categories.
Acquisition fields#
repetitions: int = 1024 — repetitions (averages) per point.frequency_sweep: float = 15.0e6 — half-width (Hz) of the CZ pulse frequency sweep.frequency_bins: int = 20 — number of frequency points.amplitude_min: float = 0.0 — start of the amplitude sweep (V).amplitude_max: float = 0.5 — end of the amplitude sweep (V); capped at 0.70 to stay under the AWG gain limit.amplitude_bins: int = 15 — number of amplitude points.cz_pulse_duration: float = 100.0e-9 — duration of the CZ flux pulse (s), fixed for this scan.cz_transition: str = “20” — targeted transition,"20"or"02": which qubit of the coupler (by name order) is driven towards \(|2\rangle\) versus \(|0\rangle\). Determines the sweep’s frequency center.cz_half_frequency_wp: bool = False — center the frequency sweep at half the computed CZ transition frequency, for couplers operated at a half-frequency working point.downconvert_frequency: float = 4.4e9 — flux-line downconversion offset (Hz); the CZ pulse clock is programmed at-frequency + downconvert_frequency. Hardware-wiring specific.max_transition_frequency: float = 1.0e9 — couplers whose computed CZ transition frequency exceeds this are skipped entirely (SPI-rack safety limit).
Analysis fields#
parking_current: float = 0.0 — the coupler’s DC parking current (A); informational only, shown on the plot but not applied to hardware by this node.
Class: CZParametrizationFixDurationQOI#
cz_pulse_frequency/cz_pulse_frequency_error: the working-point CZ pulse frequency (Hz).cz_pulse_amplitude/cz_pulse_amplitude_error: the working-point CZ pulse amplitude (V).cz_parametrization_transition_quality: the coherence-quality score described above, for ranking candidate parking currents.
On success, cz_pulse_frequency/cz_pulse_amplitude are written to the coupler edge’s
ParametricCZSubmodule (cz:cz_freq / cz:square_amp).