add_laser#

method

ClassicalSim.add_laser(ports: Union[str, List[str]], power: float = 1.0, phase: float = 0.0, mod_function: Callable = None) simphony.classical.Laser[source]#

Add an ideal laser source.

If multiple ports are specified, the same laser will be connected to all of them.

Parameters
  • ports (OPort or list of OPort) – The ports to which the laser is connected.

  • power (float, optional) – The power of the laser (in mW), by default 1.0

  • phase (float, optional) – The phase of the laser (in radians), by default 0.0

  • mod_function (Callable, optional) – The modulation function, by default None (not yet implemented).

Returns

The created laser.

Return type

Laser

Examples

>>> laser = sim.add_laser(ports=["in"], power=1.0)