Source¶
- class lightworks.emulator.Source(purity: float = 1, brightness: float = 1, indistinguishability: float = 1, probability_threshold: float = 1e-09)¶
Simulates an imperfect single photon source to model properties of photon inputs in the Sampler.
- Parameters:
purity (float) – The purity of the photon stream from the single photon source, should be given as a decimal. Note that it is assumed that any additional photons are distinguishable from the source photons.
brightness (float) – The brightness of the single photon source as a decimal value.
indistinguishability (float) – The indistinguishability of the input photons.
probability_threshold (float, optional) – Set a probability threshold for the input, this can be used to remove any inputs with probabilities below this value. Note, this should be used with some caution as it may reduce the overall accuracy of the simulation.
- property brightness: float¶
The output efficiency of the single photon source.
- check_number(state: State) int ¶
Check the number of possible inputs states that a given target input and source properties will produce.
- Parameters:
state (State) – The target input state produced by the source.
- Returns:
- The number of states contained in the generated source input
state probability distribution.
- Return type:
int
- property indistinguishability: float¶
The measured indistinguishability of the single photon source.
- property probability_threshold: float¶
Define a probability threshold below which single input states are discarded.
- property purity: float¶
The purity as a source, given as a decimal. Purity = 1 - g2.