CZ Chevron 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\). The CZ chevron node tests a candidate working-point current (found previously by cz_currents_from_spectroscopies) by sweeping the coupler’s flux-pulse frequency and duration at fixed amplitude, and looking for the characteristic chevron pattern of a real avoided crossing: as the pulse frequency approaches the \(|11\rangle\)–\(|20\rangle\) (or \(|11\rangle\)–\(|02\rangle\)) resonance, population oscillates between the two qubits as a function of pulse duration. Where this oscillation is fastest marks the CZ working point, and the oscillation’s half-period gives the CZ pulse duration itself.

Code structure#

Class: CZChevron#

The CZChevron class sets up the frequency/duration chevron 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.

Class: CZChevronMeasurement#

The measurement class responsible for executing the chevron scan.

Method: schedule_function#

For every coupler, both qubits are excited to \(|1\rangle\) and the coupler’s flux pulse is applied at each (frequency, duration) point of that coupler’s sweep, then both qubits are read out. Because different couplers can have different frequency/duration 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: CZChevronAnalysis#

The CZChevronAnalysis class analyzes the coupler’s 2-D (frequency, duration) magnitude map for both of its qubits and packages the working point into a single QOI. 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#

  1. Coarse localization: for the qubit driven towards \(|2\rangle\) the magnitude map is expected to peak, and for the qubit driven towards \(|0\rangle\) it is expected to dip, at the same (frequency, duration) point if a real CZ avoided crossing exists there. The point of maximum normalized magnitude difference between the two qubits is taken as the candidate working point, via CombinedFrequencyVsDurationAnalysis, which also checks that this point agrees (within frequency_tolerance/duration_tolerance) with either the \(|2\rangle\)-qubit’s maximum or the \(|0\rangle\)-qubit’s minimum — i.e. that both qubits are consistent about where the crossing is.

  2. Duration refinement: unlike cz_parametrization, the duration sweep here is dense enough to resolve an actual population oscillation. A damped-sinusoid (Ramsey) model is fit to the duration trace at the chosen frequency for both qubits, and their fitted periods are averaged to give the refined CZ pulse duration (rounded to the 1 ns hardware grid). If the fit doesn’t converge to a genuine oscillation, the duration falls back to twice the coarse max-difference-point duration (treating it as a half-period).

  3. Reliability check: the same Ramsey fit is repeated at the SUPPORT_TRACE_HALF_WINDOW neighboring frequencies on either side of the chosen one (9 traces total). If more than trace_fit_failure_threshold of these support-trace fits fail to resolve a genuine oscillation, the working point is discarded even when the coarser two-qubit compatibility check passed — a clean chevron should show a coherent oscillation in a neighborhood around the true working point, not just at one lucky frequency.

The analysis fails (is_successful=False) if the two qubits are not compatible or too many support traces fail, in which case only diagnostic fields are populated.

Output: xarray.Dataset#

Each coupler’s dataset holds, per qubit, a 2-D magnitude map over the swept CZ pulse frequencies and durations.

Figures#

The main figure shows both qubits’ raw (frequency, duration) magnitude heatmaps side by side, with the working point marked and a text box reporting the parking current, support-trace fit failure fraction, and whether the two qubits were found compatible. A support figure additionally shows the magnitude-vs-duration trace (and its Ramsey fit) at each of the 9 frequencies around the working point, so a failed reliability check can be inspected directly.

Class: CZChevronParameters#

The CZChevronParameters class encapsulates the parameters for the CZ chevron 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 = 10.0e6 — half-width (Hz) of the CZ pulse frequency sweep.

  • frequency_bins: int = 15 — number of frequency points.

  • duration_min: float = 20.0e-9 — start of the duration sweep (s).

  • duration_max: float = 700.0e-9 — end of the duration sweep (s).

  • duration_bins: int = 30 — number of duration points.

  • cz_pulse_amplitude: float = 0.5 — amplitude of the CZ flux pulse (V), 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.

  • trace_fit_failure_threshold: float = 0.66 — support-trace fit failure fraction above which a working point is discarded even if the coarser two-qubit compatibility check passed.

Class: CZChevronQOI#

  • cz_pulse_frequency / cz_pulse_frequency_error: the refined CZ pulse frequency (Hz).

  • cz_pulse_duration / cz_pulse_duration_error: the refined CZ pulse duration (s).

  • cz_chevron_trace_periods: JSON-encoded list of [frequency, avg_period] pairs for the support traces whose fit resolved a genuine oscillation.

  • cz_chevron_trace_fit_failure_fraction: fraction of the support traces whose fit failed to resolve a genuine oscillation.

On success, cz_pulse_frequency/cz_pulse_duration are written to the coupler edge’s ParametricCZSubmodule (cz:cz_freq / cz:square_duration), the same device fields updated by cz_parametrization.