Skip to content

Commit e711a1a

Browse files
authored
Merge pull request #578 from sfc-aqua/fix-generation-rate
Fix Bell pair link generation rate
2 parents 63ff829 + 7d9c19e commit e711a1a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

quisp/modules/PhysicalConnection/BSA/BSAController.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ void BSAController::initialize() {
4040
time_out_count = 0;
4141
time_out_message = new BSMNotificationTimeout("bsm_notification_timeout");
4242
if (is_active) {
43-
time_interval_between_photons = SimTime(1, SIMTIME_S) / SimTime(getParentModule()->getSubmodule("bsa")->par("photon_detection_per_second").intValue(), SIMTIME_S);
43+
long long photon_per_second = getParentModule()->getSubmodule("bsa")->par("photon_detection_per_second").intValue();
44+
long long time_between_photon_in_atto = ((long long)1000000000000000000) / photon_per_second;
45+
time_interval_between_photons = SimTime(time_between_photon_in_atto, SIMTIME_AS);
4446
simtime_t first_notification_timer = SimTime(par("initial_notification_timing_buffer").doubleValue());
4547
right_qnic = getExternalQNICInfoFromPort(1);
4648
offset_time_for_first_photon = calculateOffsetTimeFromDistance();

0 commit comments

Comments
 (0)