Skip to content

Commit 674ec94

Browse files
author
Axel Dahlberg
committed
Started adding estimation of success probability
1 parent 9d59473 commit 674ec94

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

qlinklayer/feu.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,24 @@ def _compute_total_detection_probability_of_node(self, node):
170170
def _compute_conditional_detection_probabilities(self, alpha):
171171
"""
172172
Computes the probabilites p_uu, p_ud, pdu, pdd as given in eq (10) in https://arxiv.org/src/1712.07567v2/anc/SupplementaryInformation.pdf
173+
Note that this assumed low detection efficiencies
173174
:return:
174175
"""
175176

176177
p_det_A, p_det_B = self._compute_total_detection_probabilities()
177178
p_dc = self.mhp_service.conn.midpoint.pdark
178179

179180
# TODO I don't think this is correct
180-
p_uu = alpha**2 * ((1 - p_dc)**2 * (p_det_A + p_det_B) / 2 + 2 * (1 - p_dc) * p_dc * (1-p_det_A) * (1-p_det_B))
181-
p_ud = alpha * (1-alpha)((1-p_dc)**2 * p_det_A)
181+
prob_click_given_two_photons = ((1 - p_dc)**2 * (p_det_A*(1-p_det_B) + p_det_B*(1-p_det_A) + p_det_A*p_det_B) +
182+
2 * p_dc * (1-p_dc) * (1-p_det_A) * (1-p_det_B))
183+
p_uu = alpha**2 * prob_click_given_two_photons
184+
185+
prob_click_given_photon_A = (1-p_dc)**2*p_det_A + 2*p_dc*(1-p_dc)*(1-p_det_A)
186+
prob_click_given_photon_B = (1-p_dc)**2*p_det_B + 2*p_dc*(1-p_dc)*(1-p_det_B)
187+
p_ud = alpha * (1-alpha) * prob_click_given_photon_A
188+
p_du = alpha * (1-alpha) * prob_click_given_photon_B
189+
190+
prob_click_given_no_photons =
182191

183192
# TODO NOT FINISHED!!!
184193

0 commit comments

Comments
 (0)