qat.experimental.dialect.q1_sequence.ir.ops module
- class SequenceOp(channel_id, program, port_id=None, waveforms=None, weights=None, acquisitions=None, instrument_id=None, slot_idx=None, seq_idx=None, sequencer_config=None, module_config=None)
Bases:
SequenceOp,IRDLOperation,Operation,_IRNode,ABC,objectA sequence op represents the payload for a single Sequencer/PPU in a Qblox instrument. The body region holds Q1 assembly ops across one or more blocks, each terminated by an
IsTerminatorop:q1_cfbranches wire the control-flow graph andStop*ops end terminating paths. In multi-block (CFG) form the region must be linearised to a single block before emission, sinceemit_sequencelowers viaq1.emit_programwhich requires all ops to beAssemblyPrintable(q1_cfterminators are not). Data table attributes (waveforms, weights, acquisitions) are static lookup tables referenced by instruction indices.instrument_id,slot_idxandseq_idxidentify the physical allocation.sequencer_configowns the digital configuration and connections, whilemodule_configowns the authoritative analogue configuration of the physical module.- Parameters:
channel_id¶ (
str|StringAttr) – Stable identifier for the emitted sequencer program.program¶ (
Sequence[Operation] |Region) – Q1 instruction operations or a region containing one or more blocks.port_id¶ (
Union[str,StringAttr,None]) – Canonical port identifier (e.g."Q0/drive"). Defaults tochannel_idfor an unbound sequence.waveforms¶ (
Optional[ArrayAttr[WaveformAttr]]) – Waveform data table entries.weights¶ (
Optional[ArrayAttr[WeightAttr]]) – Weight data table entries.acquisitions¶ (
Optional[ArrayAttr[AcquisitionAttr]]) – Acquisition data table entries.instrument_id¶ (
Union[str,StringAttr,None]) – Physical Cluster instrument, absent until hardware binding.slot_idx¶ (
Union[int,SlotIndexAttr,None]) – Physical Cluster slot, absent until hardware binding.seq_idx¶ (
Union[int,SequencerIndexAttr,None]) – Physical sequencer index, absent until hardware binding.sequencer_config¶ (
Optional[SequencerConfigAttr]) – Per-sequencer configuration and connections, absent until resolved.module_config¶ (
Optional[ModuleConfigAttr]) – Analogue module configuration, absent until hardware binding.
- acquisitions
Accessor for an operation property.
- attributes: dict[str, Attribute]
The attributes attached to the operation.
- body
Access a non-variadic construct which appears before any variadic arguments.
- channel_id
Accessor for an operation attribute.
- classmethod get_irdl_definition()
Get the IRDL operation definition.
- instrument_id
Accessor for an optional operation property.
- location: LocationAttr
The source location attached to this operation.
- module_config
Accessor for an optional operation property.
- name: ClassVar[str] = 'q1_sequence.sequence'
The operation name. Should be a static member of the class
- port_id
Accessor for an operation attribute.
- 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.
- seq_idx
Accessor for an optional operation property.
- sequencer_config
Accessor for an optional operation property.
- slot_idx
Accessor for an optional operation property.
- traits: ClassVar[OpTraits] = <xdsl.ir.core.OpTraits object>
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.
- verify_()
Verify structural and physical sequence invariants.
Structural verification requires non-empty sequence and port identifiers, complete allocation identity, terminated body blocks, and unique names and indices in each data table. Bound sequences additionally validate module location, module lanes, sequencer index and capability, connection routing, mixer configuration, and agreement between sequence allocation and module or sequencer configuration.
- waveforms
Accessor for an operation property.
- weights
Accessor for an operation property.