piel.models.logic.electro_optic.signal_map
==========================================

.. py:module:: piel.models.logic.electro_optic.signal_map

.. autoapi-nested-parse::

   TODO implement this function.
   In this function we implement different methods of mapping electronic signals to phase.

   One particular implementation of phase mapping would be:

   .. list-table:: Example Basic Phase Mapping
      :header-rows: 1

      * - Bit
        - Phase
      * - b0
        - :math:`\phi_0 \to 0`
      * - b1
        - :math:`\phi_1 \to \pi`

   We can define the two corresponding angles that this would be.

   A more complex implementation of phase mapping can be similar to a DAC mapping: a bitstring within a converter
   bit-size can map directly to a particular phase space within a particular mapping.



Functions
---------

.. autoapisummary::

   piel.models.logic.electro_optic.signal_map.linear_bit_phase_map


Module Contents
---------------

.. py:function:: linear_bit_phase_map(bits_amount: int, final_phase_rad: float, initial_phase_rad: float = 0, quantization_error: float = 1e-06, **kwargs) -> piel.types.digital_electro_optic.BitPhaseMap

   Returns a linear direct mapping of bits to phase.

   :param bits_amount: Amount of bits to generate.
   :type bits_amount: int
   :param final_phase_rad: Final phase to map to.
   :type final_phase_rad: float
   :param initial_phase_rad: Initial phase to map to.
   :type initial_phase_rad: float
   :param quantization_error: Error in the phase mapping.
   :type quantization_error: float

   :returns: Mapping of bits to phase.
   :rtype: BitPhaseMap


