Source
- class exqalibur.Source
Definition of a source We build on a phenomenological model first introduced in ref. [1] where an imperfect quantum-dot based single-photon source is modeled by a statistical mixture of Fock states. The model developed here, first introduced in ref. [2], constructs the input multi-photon state using features specific to Perceval.
[1] Pont, Mathias, et al. Physical Review X 12, 031033 (2022). https://doi.org/10.1103/PhysRevX.12.031033
[2] Pont, Mathias, et al. arXiv preprint arXiv:2211.15626 (2022). https://doi.org/10.48550/arXiv.2211.15626
- Parameters:
emission_probability – probability that the source emits at least one photon
multiphoton_component – second order intensity autocorrelation at zero time delay \(g^{(2)}(0)\)
indistinguishability – 2-photon mean wavepacket overlap
losses – optical losses
g2_distinguishable – True if additional photons are distinguishable, False otherwise
- create_sampler(self: exqalibur.Source, expected_input: exqalibur.FockState, min_photons_filter: SupportsInt = 0) exqalibur.SourceSampler
Creates a SourceSampler that will be able to sample states according to this source input probability distribution corresponding to the given expected input state without needing to generate it.
- Parameters:
expected_input – Expected input BasicState Sampler will try to generate photons according to the source where photons of this state are.
min_photons_filter – Minimum number of photons of the states to generate.
- Returns:
A SourceSampler corresponding to this source
- create_simple_iterator(self: exqalibur.Source, expected_input: exqalibur.FockState, min_photons_filter: SupportsInt = 0) exqalibur.SimpleSourceIterator
- generate_distribution(self: exqalibur.Source, expected_input: exqalibur.FockState, prob_threshold: SupportsFloat = 0.0) exqalibur.SVDistribution
Simulates plugging the photonic source on certain modes and turning it on. Computes the input probability distribution
- Parameters:
expected_input – Expected input BasicState The properties of the source will alter the input state. A perfect source always delivers the expected state as an input. Imperfect ones won’t.
prob_threshold – Probability threshold under which the resulting state is filtered out.
- property is_perfect
- Returns:
True
if the source is perfect (the distribution consists of the expected state with probability one),False
otherwise
- property partially_distinguishable
- Returns:
True
if the source needs to use NoisyStates to describe the distribution,False
otherwise (only FockStates)
SourceSampler
- class exqalibur.SourceSampler
The Sampler class is dedicated to sample according to a source distribution by using a simplified, source-specific structure, making it lighter and faster than generating the distribution.
The Sampler must be created using the
Source.create_sampler
method.>>> import exqalibur as xq >>> source = xq.Source(0.9, 0.03, 0.8) >>> sampler = source.create_sampler(xq.FockState([1, 0, 1]), 1) >>> [print(sample, end = ", ") for sample in sampler.generate_samples(5)] |{_:0},0,{_:0}>, |0,0,{_:0}>, |{_:0},0,{_:0}>, |{_:0},0,{_:1}>, |{_:0}{_:1},0,{_:0}>,
- property expected_input
- Returns:
The target state that will be sampled from.
- generate_samples(self: exqalibur.SourceSampler, n_samples: SupportsInt) list[exqalibur.NoisyFockState]
Generates n_samples NoisyStates according to the source distribution for this sampler expected input.
- Parameters:
n_samples – the number of states to generate
- Returns:
a list of n_samples NoisyStates
- generate_separated_samples(self: exqalibur.SourceSampler, n_samples: SupportsInt) list[exqalibur.BSSamples]
Generates input states from a noisy mixed state, each one corresponding to the result of
NoisyFockState.separate_state
as generated according to the source distribution for this sampler expected input.Uses a simplified procedure to be faster than calling
generate_samples
andseparate_state
.- Parameters:
n_samples – the number of separated states to generate
- Returns:
a list of n_samples BSSamples
- property min_photons_filter
- Returns:
The minimum number of wanted photons. States having less than this number of photons will not be generated.
- property physical_perf
- Returns:
The probability of states with less than
self.min_detected_photons
photons in the original distribution.
- property zpp
- Returns:
The probability of the 0-photon state in the original distribution.