symop.modes.labels.mode

Composite mode labels.

This module defines ModeLabel, a composite label combining path, polarization, and envelope components. The total mode overlap factorizes into the product of overlaps of its constituent labels.

Classes

ModeLabel(path, polarization, envelope)

Mode label composed of a path label and a polarization label.

class ModeLabel(path: Path, polarization: Polarization, envelope: Envelope) None

Bases: object

Mode label composed of a path label and a polarization label.

The overlap factorizes into the product of the component overlaps:

\[\langle m_1, m_2 \rangle = \langle p_1, p_2 \rangle \langle \pi_1, \pi_2 \rangle \langle \zeta_1, \zeta_2 \rangle,\]

where \(p\) denotes the path component ,:math:pi denotes the polarization component and \(\zeta\) denotes the envelope component.

Parameters:
  • path (Path)

  • polarization (Polarization)

  • envelope (Envelope)

path

Path label.

polarization

Polarization label.

envelope

Envelope label.

approx_signature(*, decimals: int = 12, ignore_global_phase: bool = False) tuple[object, ...]

Approximate signature.

Parameters are forwarded to component approx_signature() methods.

Parameters:
  • decimals (int) – Number of decimal places used for rounding float parameters.

  • ignore_global_phase (bool) – If True, component signatures may ignore global phase where applicable.

Returns:

Approximate signature tuple.

Return type:

Signature

envelope: Envelope
overlap(other: ModeLabel) complex

Compute the overlap with another mode label.

The total overlap factorizes into path, polarization, and envelope contributions. Evaluatinon short-circuits when an intremediate factor is zero.

Parameters:

other (ModeLabel) – Another mode label.

Returns:

Product of path, polarization, and envelope overlaps.

Return type:

complex

path: Path
polarization: Polarization
property signature: tuple[object, ...]

Stable signature for caching/comparison.

Returns:

Tuple identifying the mode label and its components.

Return type:

Signature

with_envelope(envelope: Envelope) Self

Return a copy with replaced envelope.

Parameters:

envelope (Envelope) – New envelope.

Returns:

Updated mode label.

Return type:

ModeLabel

with_path(path: Path) Self

Return a copy with a replaced path label.

Parameters:

path (Path) – New path label.

Returns:

Updated mode label.

Return type:

ModeLabel

with_polarization(polarization: Polarization) Self

Return a copy with a replaced polarization label.

Parameters:

polarization (Polarization) – New polarization label.

Returns:

Updated mode label.

Return type:

ModeLabel

_mode_label: ModeLabelProtocol