qat.experimental.dialect.pulse.ir.interfaces module

class IsAnalyticalWaveformInterface(*, operands=(), result_types=(), properties={}, attributes={}, location=None, successors=(), regions=())

Bases: Operation, ABC

Marks operations that produce waveforms via an analytical definition.

Operations implementing this interface know how to construct the WaveformShape they represent from their own shape-specific operands and properties.

WAVEFORM_NAME: ClassVar[str]

The string representation of the waveform which acts as a hook for waveform information that lives outside the IR.

abstract property amplitude: SSAValue

The amplitude of the waveform produced by this operation.

attributes: dict[str, Attribute]

The attributes attached to the operation.

abstract build_shape()

Build the waveform shape for this op from shape-specific operands.

Amplitude, duration, and DRAG coefficients are handled by the waveform evaluation pass. Returns None if any shape-defining operand is not a compile-time constant.

Return type:

WaveformShape | None

Returns:

The waveform shape instance, or None if it cannot be built.

abstract property drag_coefficients: tuple[SSAValue, ...]

Optional DRAG coefficient operands for this waveform.

location: LocationAttr

The source location attached to this operation.

name: ClassVar[str]

The operation name. Should be a static member of the class

properties: dict[str, Attribute]

The properties attached to the operation. Properties are inherent to the definition of an operation’s semantics, and thus cannot be discarded by transformations.

traits: ClassVar[OpTraits]

Traits attached to an operation definition. This is a static field, and is made empty by default by PyRDL if not set by the operation definition.

abstract property width: SSAValue

The width of the waveform produced by this operation.