-
Notifications
You must be signed in to change notification settings - Fork 0
/
Run_qubit.asv
38 lines (29 loc) · 939 Bytes
/
Run_qubit.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%Transmitivity
eta_List = 10.^(-linspace(0,4,21));
eta_List(1) = 10^(-2);
%Error correction efficiency
f_EC=1.16;
%Depolarization
depol = 0.01;
%Security parameter
epsilon_sec = 1e-8;
%List of Exponent of number of signals sent, i.e. n = 10^(n_signals)
N_list = [6,8,10,12];
%% run the plot
%Store empty matrix of key rates
KeyRate = zeros(N_list,numel(eta_List));
%Choose between unique acceptance and realistic acceptance sets
uniqueAcc = false;
for indexSignal = 1:numel(N_list)
for indexEta = 1:numel(eta_List)
%N signal
n_signals = N_list(indexSignal);
%transmittivity
eta = eta_List(indexEta);
[optdeltacomp_qubit, optkeyratequbit] = QubitBB84_keyrate_EAT (eta, f_EC, depol, n_signals, epsilon_sec);
%store result in matrix. Each row corresponds to one value of
%n_signal
if uniqueAcc
KeyRate(indexSignal,indexEta) = optkeyratequbit;
end
end