sfc-aqua / quisp

Open source implementation of quantum internet simulation package
BSD 3-Clause "New" or "Revised" License
86 stars 36 forks source link

BSA attempt rate is lower than specified in the simulation setting file (ini file) #562

Open Naphann opened 1 month ago

Naphann commented 1 month ago

When a QNIC has more than one quantum memory, the photons are generated in batch (photon train) and the BSA would send the results back in batch. The rate at which a BSA can detect photons is specified by a parameter photon_detection_per_second in the BellStateAnalyzer.ned file, which in turns, dictates the temporal separation of the photons (wavepacket) in the train.

When the value is set to 1GHz, the actual attempt rate in the simulation is much much lower, (around 250 MHz), and is probably due to the conversion from detection per second parameter to time interval between photon (line 43).

https://github.com/sfc-aqua/quisp/blob/bd4c706fb9bef21f5bcd36f4b45ad0ec84ac849f/quisp/modules/PhysicalConnection/BSA/BSAController.cc#L42-L47

Naphann commented 1 month ago

Upon further testing, the cause is line 43, and the time interval from setting 1GHz is

0.00000025801

instead of the expected value of

0.000000001