:py:mod:`kosmos.topology.link` ============================== .. py:module:: kosmos.topology.link Classes ------- .. py:class:: LinkId Identifier of a link. .. attribute:: value Identifier string. :type: str ---- .. py:class:: LinkType(*args, **kwds) Bases: :py:class:`enum.Enum` Type of link. ---- .. py:class:: Link Bases: :py:class:`abc.ABC` Base for undirected links between two nodes. .. attribute:: id Link identifier. :type: LinkId .. attribute:: label Label of the link. Defaults to None. :type: str | None .. attribute:: src Source node. :type: Node .. attribute:: dst Destination node. :type: Node | .. rubric:: Properties .. py:property:: type Type of the link. .. py:property:: weight Cost of the link. ---- .. py:class:: OpticalLink Bases: :py:class:`Link` Base for optical fiber links. .. attribute:: id Link identifier. :type: LinkId .. attribute:: label Label of the link. Defaults to None. :type: str | None .. attribute:: src Source node. :type: Node .. attribute:: dst Destination node. :type: Node .. attribute:: distance Length of the fiber in meters. :type: float .. attribute:: attenuation Attenuation of the fiber in dB/m. :type: float .. attribute:: signal_speed Propagation speed in m/ps. :type: float | .. rubric:: Properties .. py:property:: delay Propagation delay in ps. .. py:property:: total_attenuation Total attenuation in dB. .. py:property:: transmissivity Transmitted fraction. .. py:property:: loss Loss rate for transmitted photons. .. py:property:: type Type of the link. .. py:property:: weight Cost of the link. ---- .. py:class:: ClassicalLink Bases: :py:class:`OpticalLink` Classical optical fiber link. .. attribute:: id Link identifier. :type: LinkId .. attribute:: label Label of the link. Defaults to None. :type: str | None .. attribute:: src Source node. :type: Node .. attribute:: dst Destination node. :type: Node .. attribute:: distance Length of the fiber in meters. :type: float .. attribute:: attenuation Attenuation of the fiber in dB/m. :type: float .. attribute:: signal_speed Propagation speed in m/ps. :type: float .. attribute:: bandwidth Link bandwidth in bit/s. :type: float | .. rubric:: Properties .. py:property:: type Type of the link. .. py:property:: weight Heuristic cost of the classical link. .. py:property:: delay Propagation delay in ps. .. py:property:: total_attenuation Total attenuation in dB. .. py:property:: transmissivity Transmitted fraction. .. py:property:: loss Loss rate for transmitted photons. ---- .. py:class:: QuantumLink Bases: :py:class:`OpticalLink` Quantum optical fiber link. .. attribute:: id Link identifier. :type: LinkId .. attribute:: label Label of the link. Defaults to None. :type: str | None .. attribute:: src Source node. :type: Node .. attribute:: dst Destination node. :type: Node .. attribute:: distance Length of the fiber in meters. :type: float .. attribute:: attenuation Attenuation of the fiber in dB/m. :type: float .. attribute:: signal_speed Propagation speed in m/ps. :type: float .. attribute:: polarization_fidelity Probability of no polarization error. Defaults to 1.0. :type: float .. attribute:: repetition_rate Photon generation repetition rate in Hz. :type: float | .. rubric:: Properties .. py:property:: type Type of the link. .. py:property:: weight Heuristic cost of the quantum link. .. py:property:: delay Propagation delay in ps. .. py:property:: total_attenuation Total attenuation in dB. .. py:property:: transmissivity Transmitted fraction. .. py:property:: loss Loss rate for transmitted photons.