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 eventsN_c
and the collision parameterG
- Returns
the simulation time of a sample in seconds; if
return_ncg
also returnsN_c
andG
- Return type
float
code/api/strawberryfields.utils.gbs_sample_runtime
Download Python script
Download Notebook
View on GitHub