qat.experimental.conversion.pulse_to_q1.waveform module
Waveform rewrite strategies for Pulse-to-Q1 conversion.
- class SquareWaveformLegalisation
Bases:
objectCanonicalise a square waveform’s width to integer nanoseconds.
- class SquareWaveformLowering
Bases:
objectLower a canonical square pulse to latched Q1 AWG offsets.
The non-zero offset remains live for exactly the Pulse waveform width. Latching the falling edge then advances the Q1 timeline by one minimum RT duration.
- split_wait_duration(duration_ns, q1asm)
Split a pulse-level wait into exactly representable normal Q1 waits.
The special
wait 0encoding is never emitted here. A final remainder below the minimum non-zero RT duration is made up by shortening the preceding chunks.- Parameters:
- Return type:
tuple[int,...]- Returns:
Wait-immediate durations whose exact sum is
duration_ns.- Raises:
PassFailedException – If the duration cannot be represented using normal waits.