qat.experimental.conversion.pulse_to_q1.pre_q1_ir module

Intermediate ops bridging Pulse IR and Q1 for the Pulse-to-Q1 conversion.

These ops sit between the Pulse dialect and the flat Q1 instruction dialect. They capture QBlox-specific acquisition context (such as the result store index and repetition count) that is derived from the surrounding Pulse control flow, so that the final lowering to Q1 instructions can be a straightforward, context-free rewrite.

class PreQ1AcquireOp(frame, duration, store_idx, number_runs, weights=None, label=None)

Bases: PreQ1AcquireOp, IRDLOperation, Operation, _IRNode, ABC, object

A pre-lowering form of pulse.acquire enriched with QBlox context.

pulse.acquire describes only what to acquire; QBlox hardware additionally needs to know where the result is stored (the bin/store index) and how many times the acquisition repeats (derived from the enclosing loop nest). Q1PreAcquireTransformationPass computes that context and replaces each pulse.acquire with this op, which RewritePreQ1AcquireOp then lowers to a concrete Q1 acquire instruction.

Variables:
  • frame – The frame on which the acquisition is performed.

  • duration – The acquisition duration, of type pulse.time.

  • store_idx – The index-typed bin into which results are written.

  • frame_result – The frame threaded to downstream time-ordered ops.

  • acquisition_result – The acquisition result value.

  • number_runs – The number of times the acquisition executes across the loop nest.

  • weights – Optional integration weights.

  • label – Optional label used for observability and debugging.

Build a pre_q1_pulse.acquire op.

Parameters:
  • frame (SSAValue | Operation) – The SSA value representing the frame on which to perform the acquisition.

  • duration (SSAValue | Operation) – The SSA value representing the duration of the acquisition, of type pulse.time.

  • store_idx (SSAValue | Operation) – The index-typed SSA value giving the bin into which the acquisition result is stored.

  • number_runs (int | IntAttr) – The total number of acquisition repetitions across the enclosing loop nest, used to size the acquisition’s bin allocation.

  • weights (Optional[WeightsAttr]) – Optional weights attribute for the acquisition.

  • label (Union[str, StringAttr, None]) – Optional string attribute used to label the acquisition for observability and debugging.

acquisition_result

Access a non-variadic construct which appears before any variadic arguments.

duration

Access a non-variadic construct which appears before any variadic arguments.

frame

Access a non-variadic construct which appears before any variadic arguments.

frame_result

Access a non-variadic construct which appears before any variadic arguments.

classmethod get_irdl_definition()

Get the IRDL operation definition.

label

Accessor for an optional operation attribute.

name: ClassVar[str] = 'pre_q1_pulse.acquire'

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

number_runs

Accessor for an operation property.

store_idx

Access a non-variadic construct which appears before any variadic arguments.

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_()
weights

Accessor for an optional operation attribute.