Switch

Model for simulation of an optical switch.

This module defines the Switch class for directing the flow of photons. The switch is usually created as part of a time bin QSDetector object, and will only accept time bin photons. A more general switch class is in development.

class src.components.switch.Switch(name: str, timeline: Timeline)

Class for a simple optical switch.

name

label for switch instance.

Type:

str

timeline

timeline for simulation.

Type:

Timeline

start_time

simulation start time (in ps) for transmission.

Type:

int

frequency

frequency with which to switch destinations.

Type:

float

basis_list

0/1 list denoting which receiver to rout photons to each period.

Type:

List[int]

get(photon, **kwargs) None

Method to receive photon for transmission

Parameters:

photon (Photon) – photon to transmit.

Side Effects:

May call get method of attached receivers.

init() None

Implementation of Entity interface (see base class).