Skip to content

QuantumResult

The final output of a quantum EPR simulation. This object contains the diagonalized chi matrix, participation data from the distributed analysis, and labeled modal data from EigenmodeResults.

Bases: BaseSimulationOutput

Final result object for quantum EPR analysis.

This result aggregates: - A numerically diagonalized chi matrix (epr) - A raw distributed simulation result (distributed) - A labeled set of eigenmode data (eigenmode_result)

Attributes:

Name Type Description
type Literal[QUANTUM_EPR_RESULT]

Simulation result type identifier (always 'quantum_epr_result').

epr EprDiagResultType

Result of chi matrix diagonalization and EPR computation.

distributed ParticipationDatasetType

Raw participation dataset across modes and junctions.

eigenmode_result EigenmodeResults

Labeled EigenmodeResults used in the computation.

flatten

flatten() -> FlatDictType

Flatten the result into a dictionary containing chi matrix values, frequencies, and quality factors.

Returns:

Type Description
FlatDictType

A flat dictionary with scalar entries suitable for tabular export.

Source code in src/quansys/simulation/quantum_epr/results.py
def flatten(self) -> FlatDictType:
    """
    Flatten the result into a dictionary containing chi matrix values,
    frequencies, and quality factors.

    Returns:
        A flat dictionary with scalar entries suitable for tabular export.
    """

    flat_dict = {}

    chi_flat_dict = dict(self._flatten_chi())
    frequencies_flat_dict = dict(self._flatten_frequencies_and_q_factors())

    flat_dict.update(chi_flat_dict)
    flat_dict.update(frequencies_flat_dict)
    return flat_dict