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
Truereturn not only runtime but also the number of non-zero detector eventsN_cand the collision parameterG
- Returns
the simulation time of a sample in seconds; if
return_ncgalso returnsN_candG- Return type
float
code/api/strawberryfields.utils.gbs_sample_runtime
Download Python script
Download Notebook
View on GitHub