symop.devices.models.paths.delay

Path delay device model.

This module defines Delay, a semantic device that applies a temporal shift to all modes on a given input path.

The delay is implemented at the semantic level by modifying the temporal envelope associated with each mode. Specifically, the device produces label edits that replace each mode’s envelope with a delayed version and optionally redirect the mode to a new output path.

Notes

The delay operation requires envelopes that support temporal shifting. Therefore, only envelopes implementing TimeFrequencyEnvelope are supported. A TypeError is raised otherwise.

This device does not require a backend kernel. The transformation is fully expressed via label edits during the planning stage.

Classes

Delay(dt)

Path delay device.

class Delay(dt: float) None

Bases: DeviceBase

Path delay device.

Applies a temporal delay to all modes on the input path by shifting their associated envelopes in time.

Parameters:

dt (float) – Time delay applied to each mode envelope.

_abc_impl = <_abc._abc_data object>
dt: float
property kind: DeviceKind

Return the device kind identifier.

plan(*, state: State, ports: Mapping[str, Path], selection: object | None = None, ctx: ApplyContext | None = None) DeviceAction

Plan a delay action as label edits.

Parameters:
  • state (State) – Input quantum state.

  • ports (Mapping[str, Path]) – Mapping from device ports to paths.

  • selection (object | None) – Unused.

  • ctx (ApplyContext | None) – Unused.

Returns:

Action containing label edits that apply the delay.

Return type:

DeviceAction

property port_specs: tuple[PortSpec, ...]

Return the declared port interface.

Returns:

Two ports: "in" and ``”out”``i

Return type:

tuple[PortSpec, …]