qat.experimental.dialect.q1_sequence package
- class AcqTableIndex(value)
Bases:
Q1ImmIndex into a sequencer’s acquisition table:
[0, 31].Up to 32 acquisition entries per sequencer;
acquire*instructions reference them viaacq_idx.- name: ClassVar[str] = 'q1_sequence.acq_table_index'
The attribute name should be a static field in the attribute classes.
- class AcquisitionAttr(*parameters)
Bases:
AcquisitionAttrAn acquisition entry in a Qblox sequence’s acquisitions dictionary.
- Parameters:
- acquisition_name: StringAttr = <xdsl.irdl.attributes._ParameterDef object>
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- index: AcqTableIndex = <xdsl.irdl.attributes._ParameterDef object>
- name: ClassVar[str] = 'q1_sequence.acquisition'
The attribute name should be a static field in the attribute classes.
- num_bins: BinCountImm = <xdsl.irdl.attributes._ParameterDef object>
- class AcquisitionPathConnectionAttr(input_id, path)
Bases:
AcquisitionPathConnectionAttrPhysical input connected to one Qblox acquisition path.
- Parameters:
input_id¶ (
IntAttr|int) – Physical input selected by the acquisition path.path¶ (
SignalPathAttr|SignalPath) – Acquisition path receiving the input.
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- input_id: IntAttr = <xdsl.irdl.attributes._ParameterDef object>
- name: ClassVar[str] = 'q1_sequence.acquisition_path_connection'
The attribute name should be a static field in the attribute classes.
- path: SignalPathAttr = <xdsl.irdl.attributes._ParameterDef object>
- verify()
Check that the attribute parameters satisfy the expected invariants. Raise a VerifyException otherwise.
- Return type:
None
- class BinCountImm(value)
Bases:
Q1ImmNumber of acquisition bins:
[0, 7_000_000].The hardware budget is per-module, not per-acquisition: 3 M bins total for QRM / QRM-RF and 7 M total for QRC. We allow the worst-case max here; cross-acquisition aggregation is checked elsewhere.
- name: ClassVar[str] = 'q1_sequence.bin_count_imm'
The attribute name should be a static field in the attribute classes.
- class ConnectionAttr(direction, port_ids)
Bases:
ConnectionAttrOne connection string accepted by the Qblox sequencer connection API.
A connection names one I/O port for real mode or an I and a Q port for complex mode, in every direction. Which combinations a module kind accepts is verified against the target description rather than here.
- Parameters:
direction¶ (
DirectionKindAttr|DirectionKind) – Whether the connection carries output, input, or bidirectional data.port_ids¶ (
ArrayAttr[IntAttr] |Iterable[IntAttr|int]) – Ordered I/O ports connected to the sequencer I/Q paths.
- property connection: str
Return the connection string accepted by
connect_sequencer.
- direction: DirectionKindAttr = <xdsl.irdl.attributes._ParameterDef object>
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- property input_ids: tuple[int, ...]
Return the physical inputs this connection acquires from.
An
ioX_Yconnection acquires on every listed lane; seeconnection_input_ids().
- name: ClassVar[str] = 'q1_sequence.connection'
The attribute name should be a static field in the attribute classes.
- property output_ids: tuple[int, ...]
Return the physical outputs this connection drives.
An
ioX_Yconnection drives every listed lane; seeconnection_output_ids().
- port_ids: ArrayAttr[IntAttr] = <xdsl.irdl.attributes._ParameterDef object>
- verify()
Check that the attribute parameters satisfy the expected invariants. Raise a VerifyException otherwise.
- Return type:
None
- class DirectionKindAttr(data)
Bases:
EnumAttribute[DirectionKind],SpacedOpaqueSyntaxAttributeDirection prefix accepted by the Qblox sequencer connection API.
- enum_type
alias of
DirectionKind
- name: ClassVar[str] = 'q1_sequence.direction_kind'
The attribute name should be a static field in the attribute classes.
- class OutputPathConnectionAttr(output_id, path=None)
Bases:
OutputPathConnectionAttrOne physical output connected to a sequencer output path.
- Parameters:
output_id¶ (
IntAttr|int) – Physical output configured by theoutNfield.path¶ (
Union[SignalPathAttr,SignalPath,None]) – Qblox sequencer path carried by the connection.
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- name: ClassVar[str] = 'q1_sequence.output_path_connection'
The attribute name should be a static field in the attribute classes.
- output_id: IntAttr = <xdsl.irdl.attributes._ParameterDef object>
- path: SignalPathAttr | NoneAttr = <xdsl.irdl.attributes._ParameterDef object>
- verify()
Check that the attribute parameters satisfy the expected invariants. Raise a VerifyException otherwise.
- Return type:
None
- class Q1SequenceTarget
Bases:
Target- emit(ctx, module, output)
Emits a Q1 sequence module as JSON.
- name: ClassVar[str] = 'q1_sequence'
- 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.
- 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.
- 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.
- 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.
- class SignalPathAttr(data)
Bases:
EnumAttribute[SignalPath],SpacedOpaqueSyntaxAttributeSequencer I/Q signal path selected by a connection.
- enum_type
alias of
SignalPath
- name: ClassVar[str] = 'q1_sequence.sequencer_path'
The attribute name should be a static field in the attribute classes.
- class WaveformAttr(*parameters)
Bases:
WaveformAttrA waveform entry in a Qblox sequence’s waveforms dictionary.
- Parameters:
- data: DenseIntOrFPElementsAttr[Float32Type] = <xdsl.irdl.attributes._ParameterDef object>
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- index: WaveformTableIndex = <xdsl.irdl.attributes._ParameterDef object>
- name: ClassVar[str] = 'q1_sequence.waveform'
The attribute name should be a static field in the attribute classes.
- verify()
Check that the attribute parameters satisfy the expected invariants. Raise a VerifyException otherwise.
- Return type:
None
- waveform_name: StringAttr = <xdsl.irdl.attributes._ParameterDef object>
- class WaveformTableIndex(value)
Bases:
Q1ImmIndex into a sequencer’s waveform table:
[0, 1023].A Q1 sequencer can hold up to 1024 waveform entries shared across both output paths;
play.wave0/play.wave1reference them by index.- name: ClassVar[str] = 'q1_sequence.waveform_table_index'
The attribute name should be a static field in the attribute classes.
- class WeightAttr(*parameters)
Bases:
WeightAttrA weight entry in a Qblox sequence’s weights dictionary.
Each coefficient multiplies one demodulated ADC sample before summation. A sequencer accepts at most 32 weight arrays and 16 384 samples.
- Parameters:
- data: DenseIntOrFPElementsAttr[Float32Type] = <xdsl.irdl.attributes._ParameterDef object>
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- index: WeightTableIndex = <xdsl.irdl.attributes._ParameterDef object>
- name: ClassVar[str] = 'q1_sequence.weight'
The attribute name should be a static field in the attribute classes.
- verify()
Check that the attribute parameters satisfy the expected invariants. Raise a VerifyException otherwise.
- Return type:
None
- weight_name: StringAttr = <xdsl.irdl.attributes._ParameterDef object>
- class WeightTableIndex(value)
Bases:
Q1ImmIndex into a sequencer’s weight table:
[0, 31].Up to 32 integration-weight arrays are stored per sequencer; the
acquire_weightedinstruction selects one via its 6-bitweight_idx{0,1}fields (encoded asUI6Imm), of which only the low 5 bits address an entry on current hardware.- name: ClassVar[str] = 'q1_sequence.weight_table_index'
The attribute name should be a static field in the attribute classes.
- find_enclosing_sequence(op)
Walk the parent chain to find the enclosing
SequenceOp.- Parameters:
op¶ (
Operation) – The operation from which to start the upward search.- Return type:
- Returns:
The nearest ancestor
SequenceOpofop.- Raises:
ValueError – If no
SequenceOpis found in the parent chain.
Subpackages
- qat.experimental.dialect.q1_sequence.ir package
- Submodules
- qat.experimental.dialect.q1_sequence.ir.attrs module
AcquireConfigAttrAcquisitionAttrAcquisitionPathConnectionAttrAwgConfigAttrConfigAttrConnectionAttrDirectionKindAttrInputConfigAttrInputSignalConfigAttrLocalOscillatorConfigAttrMarkerOverrideConfigAttrMixerCorrectionConfigAttrModuleConfigAttrNcoConfigAttrOutputConfigAttrOutputPathConnectionAttrOutputSignalConfigAttrQbloxModuleKindAttrRealTimePredistortionConfigAttrScopeAcquireConfigAttrSequencerConfigAttrSignalPathAttrThresholdedAcquireConfigAttrUnweightedAcquireConfigAttrWaveformAttrWeightAttrmake_acquisition()make_dense_floats()make_module_config()make_sequencer_config()make_waveform()make_weight()
- qat.experimental.dialect.q1_sequence.ir.imm_desc module
- qat.experimental.dialect.q1_sequence.ir.ops module
- qat.experimental.dialect.q1_sequence.ir.attrs module
- Submodules