iqm.cpc.compiler.standard_stages.apply_drive_crosstalk

iqm.cpc.compiler.standard_stages.apply_drive_crosstalk#

iqm.cpc.compiler.standard_stages.apply_drive_crosstalk(schedules, builder, context, drive_crosstalk_is_enabled=False, crosstalk_loci=None)#

Add drive-crosstalk compensation pulses to the schedules.

For each <target>__<control> locus in crosstalk_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 the phase_increment of the first replayed IQPulse. The compensation pulses are built by the drive_crosstalk.drive_crosstalk gate implementation (see DriveCrossTalk), 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.

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 (currently unused by this pass).

  • drive_crosstalk_is_enabled (bool) – Enables/disables this pass.

  • crosstalk_loci (list[str] | None) – target__control strings for which compensation is attempted.

Returns:

Schedules with auxiliary compensation channels added where possible.

Return type:

list[Schedule]