mqt.ionshuttler.linear.field_profile¶
Site-dependent field values associated with a Linear architecture.
Module Contents¶
- class FieldProfile[source]¶
Store the scalar field assigned to each hardware site.
Unspecified sites receive
default_field. Values retain their supplied scale; this class does not perform RMS normalization. The compiler stores the profile for downstream analysis but does not use it during search.- __post_init__() None[source]¶
Fill unspecified sites and store the profile in site order.
- Raises:
ValueError – If the number of sites or a site index is invalid.
- field_at(site: int) float[source]¶
Return the field at one site.
- Parameters:
site – Zero-based architecture site.
- Returns:
The configured field value.
- Raises:
ValueError – If
sitelies outside the architecture.
- classmethod from_dict(data: object, num_sites: int | None = None) FieldProfile[source]¶
Construct a profile from structured or site-to-value mapping data.
- Parameters:
data – JSON-style field-profile mapping.
num_sites – Architecture size for structured mappings.
- Returns:
A complete field profile covering every site.
- Raises:
ValueError – If the mapping has an invalid shape or lacks a required size.
- classmethod from_json(raw: str, num_sites: int | None = None) FieldProfile[source]¶
Deserialize a field profile from JSON.
- Parameters:
raw – Serialized JSON object.
num_sites – Architecture size for structured mappings.
- Returns:
A complete field profile covering every site.