sf.utils.ncg¶
-
ncg(sample)[source]¶ Calculates and returns the number of nonzero events
N_cand the collision parameterGof a sample.- Parameters
sample (array[int]) – a photon-number array of shape
`` (temporal_modes,) –
- Returns
the number of nonzero events
N_cand the collision parameterGof a sample- Return type
tuple[float]
code/api/strawberryfields.utils.ncg
Download Python script
Download Notebook
View on GitHub