EigenmodeResults¶
A result object containing all modal data extracted from an Eigenmode simulation.
Each mode includes its frequency, quality factor, and optional label. The result can be flattened into tabular form or relabeled for use in quantum workflows.
Bases: BaseSimulationOutput
Result container for an Eigenmode simulation.
Stores computed modes, each with its frequency and quality factor. Provides utilities to transform, flatten, and relabel the results.
Attributes:
Name | Type | Description |
---|---|---|
type |
Literal[EIGENMODE_RESULT]
|
Simulation result type identifier (always 'eigenmode_result'). |
results |
dict[int, SingleModeResult]
|
Mapping of mode index to a SingleModeResult instance. |
frequencies_unit |
str
|
The unit in which frequencies are expressed (default: 'GHz'). |
profile |
dict
|
Additional metadata or profile information. |
change_frequencies_unit ¶
Change the unit of all stored frequencies.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
unit
|
str
|
New frequency unit (e.g., 'MHz', 'GHz', etc.) |
required |
Source code in src/quansys/simulation/eigenmode/results.py
flatten ¶
Flatten the result into a dictionary for tabular or CSV output.
Returns:
Type | Description |
---|---|
FlatDictType
|
A flat dictionary with labeled keys and scalar values. |
Source code in src/quansys/simulation/eigenmode/results.py
generate_a_labeled_version ¶
Create a new result object with mode labels assigned.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode_to_labels
|
dict[int, str]
|
Mapping of mode index to label string. |
required |
Returns:
Name | Type | Description |
---|---|---|
EigenmodeResults |
EigenmodeResults
|
A labeled version of the results. |
Source code in src/quansys/simulation/eigenmode/results.py
generate_simple_form ¶
Convert the result set to a simplified dict format.
Returns:
Type | Description |
---|---|
dict[int, dict[str, float]]
|
A dictionary mapping each mode to its frequency and quality factor. |