Permalink
Cannot retrieve contributors at this time
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?
Q-Sim/config.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
27 lines (22 sloc)
1.05 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]] |