symop.modes.labels.path

Path labels for spatial or logical mode identification.

This module defines PathLabel, a simple label used to distinguish spatial (or logical) mode paths. Path labels are orthonormal: two labels overlap if and only if their names are identical.

Classes

Path(name)

Path label identifying a spatial (or logical) mode path.

class Path(name: str) None

Bases: object

Path label identifying a spatial (or logical) mode path.

Two path labels overlap if and only if their names are identical:

\[\begin{split}\langle \mathrm{path}(a), \mathrm{path}(b) \rangle = \begin{cases} 1, & a=b \\ 0, & a\neq b \end{cases}.\end{split}\]
Parameters:

name (str)

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

Approximate signature with rounded floating parameters.

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

name: str
overlap(other: Path) complex

Compute the overlap with another path label.

Parameters:

other (Path) – Another path label.

Returns:

\(1\) if names match, otherwise \(0\).

Return type:

complex

property signature: tuple[object, ...]

Stable signature for caching/comparison.

Returns:

Tuple identifying the path label.

Return type:

Signature

_path_check: PathProtocol