qat.experimental.system_data.hardware.qblox.configuration module

Typed Qblox configuration extension carried by canonical system data.

A source materialiser decodes the configuration its calibration supplies for one physical channel and attaches the result to that channel’s canonical external resource under QBLOX_CONFIGURATION_ATTRIBUTE. The records here are the stable boundary between that source-specific decoding and the compiler layers that resolve Q1 configuration: they are immutable, sparse, and free of source syntax such as jsonpickle markers.

The extension deliberately stays port-scoped. Two canonical ports may share one physical Qblox module - a QRC exposes its control and readout ports that way - yet each port still supplies its own sequencer bank. Grouping the fragments of one module is a compilation concern, not a system-data one.

Values absent from the source stay absent here. A consumer therefore cannot confuse an unset value with one the calibration deliberately configured.

class AcquisitionPathConnection(input_id, path)

Bases: object

One physical input bound to a sequencer acquisition path.

Variables:
  • input_id – Physical input selected by the source acq field.

  • path – Acquisition path receiving the input.

input_id: int
path: SignalPath
class OutputPathConnection(output_id, path)

Bases: object

One physical output bound to a sequencer output path.

Variables:
  • output_id – Physical output configured by the source outN field.

  • path – Sequencer path driving the output.

output_id: int
path: SignalPath
class PortConnection(direction, port_ids)

Bases: object

One connection string accepted by the Qblox sequencer connection API.

A connection names one I/O port to put the sequencer in real mode, or an I and a Q port to put it in complex mode. Complex mode is available in every direction, so in0_1 is as valid as out0_1 and io0_1. Which of those a particular module accepts is a target concern, not a syntactic one. See qblox_instruments.qcodes_drivers.sequencer.Sequencer.validate_connections.

Variables:
  • direction – Whether the connection carries output, input, or bidirectional data.

  • port_ids – Ordered I/O ports bound to the sequencer paths.

property connection: str

Return the string accepted by connect_sequencer.

direction: DirectionKind
port_ids: tuple[int, ...]
QBLOX_CONFIGURATION_ATTRIBUTE = 'qblox_config'

Canonical external-resource attribute key holding a QbloxSuppliedConfiguration.

class QbloxModuleConfiguration(values=<factory>)

Bases: object

Sparse module configuration supplied through one canonical port.

Variables:

values – Decoded module values keyed by their source field names.

values: frozendict[str, str | int | float | bool | tuple[ConfigValue, ...] | frozendict[str, ConfigValue]]
class QbloxSequencerConfiguration(index, connection=None, values=<factory>)

Bases: object

Sparse configuration supplied for one physical sequencer.

Variables:
  • index – Physical sequencer index within its module.

  • connection – Routing supplied for the sequencer, when present.

  • values – Remaining decoded sequencer values keyed by source field name.

connection: SequencerConnection | None
index: int
values: frozendict[str, str | int | float | bool | tuple[ConfigValue, ...] | frozendict[str, ConfigValue]]
class QbloxSuppliedConfiguration(module_configuration=None, sequencers=(), is_reference=False)

Bases: object

Configuration one canonical port supplies for its physical module.

A source may describe the same installed configuration once and reference it from the other ports sharing the module. Such a port carries is_reference instead of a copy, leaving the compiler to resolve which fragment it refers to.

Variables:
  • module_configuration – Module-wide configuration supplied through this port, when present.

  • sequencers – Sequencer bank supplied for this port, ordered by index.

  • is_reference – Whether the source referenced another port’s configuration.

is_reference: bool
module_configuration: QbloxModuleConfiguration | None
sequencers: tuple[QbloxSequencerConfiguration, ...]
class SequencerConnection(connections=(), output_path_connections=(), acquisition_path_connections=(), acquisition_enabled=None, disabled_outputs=frozenset({}), disabled_acquisition_paths=frozenset({}), acquisition_disabled=None)

Bases: object

Routing the source supplies for one physical sequencer.

Variables:
  • connections – Ordered entries of the source bulk_value list.

  • output_path_connections – Output path selected for each physical output.

  • acquisition_path_connections – Physical input selected for each acquisition path.

  • acquisition_enabled – Explicit acquisition enable supplied as a boolean.

  • disabled_outputs – Physical outputs the source configures as off.

  • disabled_acquisition_paths – Acquisition paths the source configures as off.

  • acquisition_disabled – Whether the combined acquisition path is off.

acquisition_disabled: bool | None
acquisition_enabled: bool | None
acquisition_path_connections: tuple[AcquisitionPathConnection, ...]
connections: tuple[PortConnection, ...]
disabled_acquisition_paths: frozenset[SignalPath]
disabled_outputs: frozenset[int]
property input_ids: frozenset[int]

Return every physical input the connection binds.

property output_ids: frozenset[int]

Return every physical output the connection binds or disables.

output_path_connections: tuple[OutputPathConnection, ...]
property uses_acquisition: bool

Return whether the connection places the sequencer on an acquisition path.

Acquisition is implied by binding a physical input, but also by any explicit acquisition routing state the source supplied: enabling or disabling acquisition outright, and selecting or disabling individual acquisition signal paths. A module without acquisition support cannot honour any of those, so they must all be treated as acquisition use rather than silently ignored.

immutable_config_value(value, path='config')

Return a recursively immutable copy of a decoded configuration value.

Parameters:
  • value (Any) – Decoded configuration value using plain Python containers and scalars.

  • path (str) – Source path of the value, used to describe validation failures.

Return type:

str | int | float | bool | tuple[ConfigValue, ...] | frozendict[str, ConfigValue]

Returns:

An equal value built from immutable containers.

Raises:

ValueError – If the value cannot be represented by the typed extension.

supplied_configurations(canonical_data)

Read the typed Qblox configuration extension from canonical system data.

Parameters:

canonical_data (CanonicalSystemData) – Canonical system data produced by a validating materialiser.

Return type:

frozendict[str, QbloxSuppliedConfiguration]

Returns:

Supplied configurations keyed by external-resource identifier.

Raises:

ValueError – If a resource carries a duplicate or malformed extension.