sf.utils.ncg

ncg(sample)[source]

Calculates and returns the number of nonzero events N_c and the collision parameter G of a sample.

Parameters
  • sample (array[int]) – a photon-number array of shape

  • `` (temporal_modes,) –

Returns

the number of nonzero events N_c and the collision parameter G of a sample

Return type

tuple[float]