iqm.cpc.compiler.standard_stages.cancel_drive_crosstalk#
- iqm.cpc.compiler.standard_stages.cancel_drive_crosstalk(schedules, builder, context, drive_crosstalk_is_enabled=False, crosstalk_loci=None, override_aux_channel_settings=True)#
Add drive-crosstalk compensation pulses to the schedules, modifying them in-place.
For each
<target>__<control>locus incrosstalk_loci, the control’s drive channel content is replayed on<target_drive_channel>.aux0, IQ-scaled by the calibrated crosstalk amplitude and phase-shifted by adding the calibrated crosstalk phase to thephase_incrementof the first replayedIQPulse. The compensation pulses are built by thedrive_crosstalk_cancellation.scaled_waveform_cancellationgate implementation (seeScaledWaveformCancellation), fetched via the builder.This runs as the last schedule-level pass so the compensation pulses are not modified by any later pass. If compensation is disabled or no loci are given, the schedules are returned unchanged.
In addition, for each realized
target__controlpair, the target’s aux0 light corefrequencysetting is set to the control qubit’s own drive frequency (center_frequency + intermediate_frequency) incontext["settings"], unless it was already set explicitly. The target’s aux0trigger_delaysetting is similarly defaulted to thetrigger_delayof the target’s main channel, unless already set explicitly. Ifoverride_aux_channel_settingsis True, both settings are overwritten even if already set.- Parameters:
schedules (list[Schedule]) – Schedules representing the compiled circuits.
builder (ScheduleBuilder) – ScheduleBuilder used to resolve channels and the compensation implementation.
context (dict[str, Any]) – Compiler context;
context["settings"]is updated with the resolved aux0 frequencies and trigger delays.drive_crosstalk_is_enabled (bool) – Enables/disables this pass.
crosstalk_loci (list[str] | None) –
target__controlstrings for which compensation is attempted.override_aux_channel_settings (bool) – If True, overwrite already-set aux0
frequency/trigger_delaysettings instead of leaving them untouched.
- Returns:
Schedules with auxiliary compensation channels added where possible.
- Return type: