Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
mu1, mu2, mu3 = .0007, .1, .4 #intensities alice can choose from
p3,p2 = .6, .2
p1 = 1-p2-p3 #probabability of choosing each intensity
intensities = ([mu1,mu2,mu3], [p1,p2,p3])
N = int(1e9) #number of iterations simulator runs for
pza = .5 #probability of alice choosing Z basis (should always be .5 for this protocol)
bases = ([0,1], [pza, 1-pza])
alpha = .15 #transmittance of channels
length = 1 #length of channels
tAB = 10 ** -((alpha*length)/10)
eta_det = .1 #detector effeciency
t_bob = .1 #transmittance of bobs devices
eta_bob = t_bob*eta_det #overall efeciency of bobs apparatus
noise = .05 #additional noise in channel (to simulate an attack)
Y0 = 1e-5 #dark count rate
eta = tAB*eta_bob #overall effeciency
e0 = .5 #error rate for dark count
edetect = 1e-3 #probability a photon hits the wrong detector (due to misalignment e.g.)
pdouble = 1e-3 #probablity of a double click
bob_params = [Y0, eta, e0, edetect, pdouble, noise]
pzb = .5 #probablity of bob chossing Z basis (should always be .5 for this protocol)
bob_bases = [[0,1],[pzb, 1-pzb]]