add_detector#

method

ClassicalSim.add_detector(ports: Union[str, List[str]], responsivity: float = 1.0) List[simphony.classical.Detector][source]#

Add an ideal photodetector.

If multiple ports are specified, multiple detectors will be created and returned.

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

  • responsivity (float, optional) – The responsivity of the detector (in A/W), by default 1.0

Returns

A list of the created detector(s) (potentially a list of length 1).

Return type

list of Detector

Examples

>>> detector = sim.add_detector(ports=["out"], responsivity=0.8)