Detector¶
Models for photon detection devices.
This module models a single photon detector (SPD) for measurement of individual photons. It also defines a QSDetector class, which combines models of different hardware devices to measure photon states in different bases. QSDetector is defined as an abstract template and as implementations for polarization and time bin qubits.
- class src.components.detector.Detector(name: str, timeline: Timeline, efficiency=0.9, dark_count=0, count_rate=25000000, time_resolution=150)¶
Single photon detector device.
This class models a single photon detector, for detecting photons. Can be attached to many different devices to enable different measurement options.
- name¶
label for detector instance.
- Type:
str
- efficiency¶
probability to successfully measure an incoming photon.
- Type:
float
- dark_count¶
average number of false positive detections per second.
- Type:
float
- count_rate¶
maximum detection rate; defines detector cooldown time.
- Type:
float
- time_resolution¶
minimum resolving power of photon arrival time (in ps).
- Type:
int
- photon_counter¶
counts number of detection events.
- Type:
int
- add_dark_count() None ¶
Method to schedule false positive detection events.
Events are scheduled as a Poisson process.
- Side Effects:
May schedule future get method calls. May schedule future calls to self.
- get(photon=None, **kwargs) None ¶
Method to receive a photon for measurement.
- Parameters:
photon (Photon) – photon to detect (currently unused)
- Side Effects:
May notify upper entities of a detection event.
- init()¶
Implementation of Entity interface (see base class).
- notify(info: Dict[str, Any])¶
Custom notify function (calls trigger method).
- record_detection()¶
Method to record a detection event.
Will calculate if detection succeeds (by checking if we have passed next_detection_time) and will notify observers with the detection time (rounded to the nearest multiple of detection frequency).
- class src.components.detector.QSDetector(name: str, timeline: Timeline)¶
Abstract QSDetector parent class.
Provides a template for objects measuring qubits in different encoding schemes.
- name¶
label for QSDetector instance.
- Type:
str
- components¶
list of all aggregated hardware components.
- Type:
List[entity]
- trigger_times¶
tracks simulation time of detection events for each detector.
- Type:
List[List[int]]
- abstract get(photon: Photon, **kwargs) None ¶
Abstract method for receiving photons for measurement.
- init()¶
Method to initialize entity (abstract).
Entity init methods are invoked for all timeline entities when the timeline is initialized. This method can be used to perform any necessary functions before simulation.
- set_detector(idx: int, efficiency=0.9, dark_count=0, count_rate=25000000, time_resolution=150)¶
Method to set the properties of an attached detector.
- Parameters:
idx (int) – the index of attached detector whose properties are going to be set.
class. (For other parameters see the Detector class. Default values are same as in Detector) –
- class src.components.detector.QSDetectorFockDirect(name: str, timeline: Timeline, src_list: List[str])¶
QSDetector to directly measure photons in Fock state.
Usage: to measure diagonal elements of effective density matrix.
- name¶
label for QSDetector instance.
- Type:
str
- src_list¶
list of two sources which send photons to this detector (length 2).
- Type:
List[str]
- trigger_times¶
tracks simulation time of detection events for each detector.
- Type:
List[List[int]]
- arrival_times¶
tracks simulation time of Photon arrival at each input port
- Type:
List[List[int]]
- init()¶
Method to initialize entity (abstract).
Entity init methods are invoked for all timeline entities when the timeline is initialized. This method can be used to perform any necessary functions before simulation.
- class src.components.detector.QSDetectorFockInterference(name: str, timeline: Timeline, src_list: List[str], phase: float = 0)¶
QSDetector with two input ports and two photon detectors behind beamsplitter.
The detectors will physically measure the two beamsplitter output photonic modes’ Fock states, respectively. POVM operators which apply to pre-beamsplitter photonic state are used. NOTE: in the current implementation, to realize interference, we require that Photons arrive at both input ports simultaneously, and at most 1 Photon instance can be input at an input port at a time.
Usage: to realize Bell state measurement (BSM) and to measure off-diagonal elements of the effective density matrix.
- name¶
label for QSDetector instance.
- Type:
str
- src_list¶
list of two sources which send photons to this detector (length 2).
- Type:
List[str]
- phase¶
relative phase between two input optical paths.
- Type:
float
- trigger_times¶
tracks simulation time of detection events for each detector.
- Type:
List[List[int]]
- detect_info¶
tracks detection information, including simulation time of detection events and detection outcome for each detector.
- Type:
List[List[Dict]]
- arrival_times¶
tracks simulation time of arrival of photons at each input mode.
- Type:
List[List[int]]
- temporary_photon_info¶
temporary list of information of Photon arriving at each input port. Specific to current implementation. At most 1 Photon’s information will be recorded in a dictionary. When there are 2 non-empty dictionaries, e.g. [{“photon”:Photon1, “time”:arrival_time1}, {“photon”:Photon2, “time”:arrival_time2}], the entangling measurement will be carried out. After measurement, the temporary list will be reset.
- Type:
List[Dict]
- get(photon, **kwargs)¶
Abstract method for receiving photons for measurement.
- get_photon_times() List[List[int]] ¶
Method to get detector trigger times and detection information. Will clear trigger_times and detect_info.
- init()¶
Method to initialize entity (abstract).
Entity init methods are invoked for all timeline entities when the timeline is initialized. This method can be used to perform any necessary functions before simulation.
- class src.components.detector.QSDetectorPolarization(name: str, timeline: Timeline)¶
QSDetector to measure polarization encoded qubits.
There are two detectors. Detectors[0] and detectors[1] are directly connected to the beamsplitter.
- name¶
label for QSDetector instance.
- Type:
str
- trigger_times¶
tracks simulation time of detection events for each detector.
- Type:
List[List[int]]
- splitter¶
internal beamsplitter object.
- Type:
- get(photon: Photon, **kwargs) None ¶
Method to receive a photon for measurement.
Forwards the photon to the internal polariaztion beamsplitter.
- Parameters:
photon (Photon) – photon to measure.
- Side Effects:
Will call get method of attached beamsplitter.
- init() None ¶
Implementation of Entity interface (see base class).
- class src.components.detector.QSDetectorTimeBin(name: str, timeline: Timeline)¶
QSDetector to measure time bin encoded qubits.
There are three detectors. The switch is connected to detectors[0] and the interferometer. The interferometer is connected to detectors[1] and detectors[2].
- name¶
label for QSDetector instance.
- Type:
str
- trigger_times¶
tracks simulation time of detection events for each detector.
- Type:
List[List[int]]
- interferometer¶
internal interferometer component.
- Type:
- get(photon, **kwargs)¶
Method to receive a photon for measurement.
Forwards the photon to the internal fiber switch.
- Parameters:
photon (Photon) – photon to measure.
- Side Effects:
Will call get method of attached switch.
- init()¶
Implementation of Entity interface (see base class).