qkd_key_rate.base.detector module
Base class for detector objects.
- class qkd_key_rate.base.detector.Detector(name, jitter_source, jitter_detector, dead_time, detection_window, efficiency_system, polarization_drift=0.122782758757646, error_detector=0, dark_count_frequency=None, dark_count_rate=None, detection_frequency=None, interval=None, efficiency_detector=None, efficiency_party=None)[source]
Bases:
ABC
Class for the detectors to be used in the key-rate estimates.
- __init__(name, jitter_source, jitter_detector, dead_time, detection_window, efficiency_system, polarization_drift=0.122782758757646, error_detector=0, dark_count_frequency=None, dark_count_rate=None, detection_frequency=None, interval=None, efficiency_detector=None, efficiency_party=None)[source]
Initialise a Detector instance.
- Parameters:
name (
str
) – Label of the detector partyjitter_source (
float
) – Time-delay introduced at the sourcejitter_detector (
float
) – Time-delay introduced at the detectordead_time (
float
) – The recovery time before a new event can be recordeddetection_window (
float
) – Time window used for event detectionefficiency_system (
float
) – Efficiency of the detecting side without the detectorpolarization_drift (
float
) – Shift/drift in the encoding of the photonserror_detector (
float
) – Error-rate of detectordark_count_frequency (
Optional
[float
]) – Number of dark-counts per seconddark_count_rate (
Optional
[float
]) – Number of dark-counts per detection windowdetection_frequency (
Optional
[float
]) – Number of detection windows per secondinterval (
Optional
[float
]) – Length of a single detection window in secondsefficiency_detector (
Optional
[float
]) – Efficiency of the detector on the detecting sideefficiency_party (
Optional
[float
]) – Total efficiency of the detecting side
If related optional arguments are both given they must satisfy
\(\text{interval} = \frac{1}{\text{detection_frequency}}\)
\(\text{dark_count_frequency} = \text{dark_count_rate} \cdot \text{detection_frequency}\)
\(\text{efficiency_party} = \text{efficiency_system} \cdot \text{efficiency_detector}\)
If they are not given, they are calculated using the same formulas.
- Returns:
Detector instance with specified parameters.
- Raises:
ValueError – If a required field is missing.
ValueError – If a needed optional field is missing.
AssertionError – If inconsistent related optional fields are provided.
- customise(name=None, jitter_source=None, jitter_detector=None, dead_time=None, detection_window=None, efficiency_system=None, polarization_drift=None, error_detector=None, dark_count_frequency=None, dark_count_rate=None, detection_frequency=None, interval=None, efficiency_detector=None, efficiency_party=None)[source]
Create a detector with customised parameter from current detector
See
__init__()
for parameter description.- Return type:
- classmethod from_file(path)[source]
Construct Detectors from csv file.
- Parameters:
path (
str
) – Path to csv file.- Return type:
List
[Detector
]
- required_fields = ['name', 'jitter_source', 'jitter_detector', 'dead_time', 'detection_window', 'efficiency_system']