sf.utils.gbs_sample_runtime

gbs_sample_runtime(sample, c=4.413680781758957e-17, return_ncg=False)[source]

Simulation time of a GBS sample (cf. L.S. Madsen et al., “Quantum computational advantage with a programmable photonic processor”, Nature (2022)”)

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

  • c (float) – a supercomputer benchmark parameter (see reference above)

  • return_ncg (bool) – if True return not only runtime but also the number of non-zero detector events N_c and the collision parameter G

Returns

the simulation time of a sample in seconds; if return_ncg also returns N_c and G

Return type

float