Source

>>> import perceval as pcvl
>>> source = pcvl.Source(brightness=0.3, purity=0.95)
>>> pcvl.pdisplay(source.probability_distribution())

state

probability

|0>

7/10

|1>

0.285

|2>

0.015

class perceval.components.source.Source(brightness=1, purity=1, purity_model='random', indistinguishability=1, indistinguishability_model='homv', context=None)

Definition of a single photon source. The default source is a perfect source (emits exactly 1 indistinguishable photon each period).

Parameters
  • brightness (float) – the brightness of the source defined as the percentage of unique photon generation

  • purity (float) – the ratio of time when photon is emitted alone

  • purity_model (str) – “random” if additional photons are distinguishable, “indistinguishable” otherwise

  • indistinguishability (float) – indistinguishability parameter as defined by indistinguishability_model

  • indistinguishability_model (str) – “homv” defines indistinguishability as HOM visibility, “linear” defines indistinguishability as ratio of indistinguishable photons

  • context (Optional[Dict]) – gives a local context for source specific features, like “discernability_tag”

probability_distribution()
Return type

SVDistribution

Returns

SVDistribution on 1 mode associated to the source