{'fraction_non_alphanumeric': 0.03579671998380239, 'fraction_numerical': 0.011621785786596476, 'mean_word_length': 4.202443648620181, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Finite-key analysis of the six-state protocol with photon-number-resolution detectors

The six-state protocol is a discrete-variable protocol for quantum key distribution, that permits to tolerate a noisier channel than the BB84 protocol. In this work we provide a lower bound on the maximum achievable key rate of a practical implementation of the entanglement-based version of the six-state protocol. Regarding the experimental set-up we consider that the source is untrusted and the photon-number statistics is measured using photon-number-resolving detectors. We provide the formula for the key rate for a finite initial number of resources. As an illustration of the considered formalism, we calculate the key rate for the setting where the source produces entangled photon pairs via parametric down-conversion and the losses in the channel depend on the distance. As a result we find that the finite-key corrections for the considered scenario are not negligible and they should be considered in any practical analysis.


I. INTRODUCTION
Quantum Key Distribution (QKD) was proposed for the first time in 1984 by Bennett and Brassard [4](BB84 protocol) and it is a method for permitting two parties, usually called Alice and Bob, to share a secret bit-string that might be used as a key for cryptographic applications. The most prominent application is encryption with the one-time pad [25], where Alice sums bitwise the message and the key for obtaining the cypher-text. The cypher-text is then sent to Bob, who recovers the original text by using the knowledge of the key. Note that the encrypted text is sent publicly on the channel and therefore it is readable by any eavesdropper who is tapping the channel. The security of this scheme relies on the fact, that from the eavesdropper's point of view the distribution of all possible cypher-texts is uniform [24]. This last requirement implies that the key is chosen at random using a uniform distribution on the set of all possible keys. This is the point where QKD enters the game. In fact, using the laws of quantum mechanics, it is possible to create a bit-string with the guarantee that it is (almost) random from an eavesdropper's point of view [21]. In this paper we consider the entanglement-based version of the six-state protocol [3,5,7,10]. It has been realized that, due to the use of a tomographic measurement, the six-state protocol is more robust against channel imperfections than the BB84 protocol. The six-state protocol was implemented experimentally, e.g. by Kwiat's group [13]. However, in the meantime the security analysis of this protocol has become more and more complete. In 2001, H.K. Lo [14] proved security of the protocol against the most general type of attacks and some years later R. Renner et al. [9,12,19] proved the security of the six-state protocol using information-theoretical arguments. Finite-key effects were considered for the first time by V. Scarani and R. Renner [22,23] and by T. Meyer et al. [16]. It turns out that there is an initial regime where BB84 is advantageous over the six-state protocol and then there exists a second regime where the six-state protocol leads to higher secret key rates. The reason is the sifting procedure. More precisely, in the standard six-state protocol all measurement bases are chosen with the same probability and as a consequence, 2 3 of the measurement outcomes are discarded due to this sifting. In the standard BB84 protocol the fraction of discarded outcomes is 1 2 . However, in the year 2005, it was proven by H.K. Lo and M. Ardehali [15] that it is possible to choose one basis with high probability and the other two (one for the BB84) with a negligible probability without jeopardizing the security of the protocol. In the asymptotic case, using this biased scheme, the sifting ratio approaches one and therefore the six-state protocol permits to give a higher secret key rate. However, when finite-key corrections are considered, for small block sizes it is not possible to choose with an arbitrary large bias the measurement basis and therefore the sifting advantage of the BB84 protocol leads to higher key rates. Note that recent papers considering the finite-key analysis studying the six-state protocol [1,6,22,23] do not consider a realistic implementation with imperfections in the source, the channel and the detectors. The security proof becomes more involved due to the fact that a realistic source does have multi-photon pulses, which need special care. A common receipt is given by the squashing model [2], which permits to analyze the security of multi-photon sources using single photons and a special post-processing of the outcomes. However, it was proven that an active measurement set-up for the six-state protocol does not permit to use the squashing model [2]. A squashing model for the passive measurement set-up exists [2], but up to now only in the case of perfect detectors. However, another technique permitting to overcome the need of squashing model has been developed by T. Moroder et al. [17]. The main observation is, that if we had perfect photon-number-resolution detectors (PNRD), then we would be able to avoid the problem of multi-photon pulses by post-selecting only singlephoton pulses. In their paper the authors developed an experimentally feasible technique permitting to acquire the statistics of a PNRD. In this paper we want to extend their analysis considering finite-key corrections. In order to state clearly our result, we will consider an ideal set-up, where we perform a Quantum Non-Demolition (QND) measurement permitting to detect error-free the number of photons present in an incoming pulse. We will use a standard measurement set-up, which has detectors with finite efficiency. Note that, although the set-up we consider may be idealized, it permits to provide a lower bound for the performance of the six-state protocol in presence of a realistic scenario. Finally, we will consider a specific example, i.e. we will calculate the secret key rate in the finite case for a spontaneous parametric down-conversion of type-II (SPDC) source.
The paper is organized as follows. In section II we describe the set-up followed by a presentation of the QKD protocol. In section III we present the security analysis and the formula for the secret key rate. In section IV we calculate the optimal secret key rate for a SPDC source. Finally, in section V we conclude this analysis.

II. THE ENTANGLED VERSION OF THE SIX-STATE PROTOCOL
In the first part of this section we present the set-up used by Alice and Bob. The second part considers an outline of the QKD protocol. • Source. An arbitrary source is placed in the middle of Alice and Bob. The source sends an n-photon pulse to Alice and an m-photon pulse to Bob.
• Quantum Channel. We consider that the channel is lossy but otherwise error-free. We suppose that the signals are encoded in the source, such that they do not experience any decoherence in the channel.
• Classical Channel. The classical channel is authenticated.
• Alice's (Bob's) laboratory. We assume that the laboratories are trusted. Alice (Bob) performs a QND measurement for measuring the number of photons contained in the incoming pulse. The POVM of the QND measurement is composed of two elements {|1 1| , 1l − |1 1|}, where {|n } is the Fock-basis. After the QND measurement, the pulse passes a standard QKD-measurement set-up, where one measurement basis is chosen at random out of the X-, Y -and Z-direction. Note that regarding the detectors, we assume that they have finite efficiency η D and negligible background noise. Moreover, we consider a misalignment [17,21] in the detectors. Each time that a single photon arrives at the detection device, it is measured correctly with probability 1 − η M .
B. QKD protocol 1. Entanglement generation and distribution. A source generates entangled pairs which are distributed through the quantum channel to Alice and Bob.
2. Measurement. Alice and Bob choose at random and independently the measurement basis and to perform the measurement on the incoming pulse. We consider a biased choice of the bases, i.e., the basis Z is chosen with probability p Z ≥ 1 3 and the other two bases are chosen with the same probability p X = p Y . The result of the measurements is recorded in a vector of the form indicates that the detector for the classical value i on Alice side did not experience a click, otherwise b A i = 1. The entry p A contains the result of the QND measurement, in particular p A = 1 when a 1-photon pulse is measured and p A = 0 otherwise. The last entry contains a label for the measurement basis. The first entry t A is a tag permitting to distinguish the measurements, e.g., the time of occurrence of the measurement.
3. Vacuum sifting. During this sifting we remove the non-measurement results. This step is performed locally and without communication between Alice and Bob. Let i=A,B. When p i = 1, it is still possible that b i 0 +b i 1 = 0, i.e., none of the detectors has clicked. This can happen due to the finite efficiency of the detectors. We can eliminate these events safely, incorporating the efficiency of the detectors in the efficiency of the channel. During this step Alice (Bob) calculate the value of 4. Pulse sifting. We use the output of the QND measurement for conditioning the type of bits used for the key. Alice and Bob communicate via the classical channel the value of p A and p B for each measurement and discard all measurements with p A × p B = 1 [17]. Note that this post-processing is possible only due to the fact, that the QND measurement is perfect and that we are considering entanglement-based QKD. If one of the two assumptions above is dropped, then security loopholes will arise [21].
5. Bases sifting. Alice and Bob exchange information regarding the measurement bases and discard the outcomes coming from different bases.
6. Parameter estimation. Alice and Bob take a random sample from each basis and use this sample for estimating the Quantum Bit Error Rate (QBER) for each basis. We denote with e X,mX the fraction of erroneous bits in the sample of length m X . We choose [6] where N is the number of bits after the pulse sifting. The QBERs along the Y and Z bases are defined analogously. Note that the worst-case QBER can be estimated with the fluctuations due to the finiteness of the sample. 7. Error correction. During this step Alice and Bob apply a one-way error correction protocol and correct their strings. As result they will exchange leak EC bits on the channel.
8. Error verification. In realistic implementations it is possible that at the end of the error correction protocol, Alice and Bob do not have perfectly correlated bits. In order to acquire confidence regarding the remaining errors, they apply a two-universal hash function on their strings and they communicate the result of the function on the channel. This step costs log 2 ( 2 εEC ) bits. If the resulting hash tag is the same, then the two strings are the same with probability 1 − ε EC . If the hashing produces a different outcome, Alice and Bob may perform more error correction followed by another error verification.
9. Privacy amplification. Alice and Bob apply a two-universal hash function in order to shrink their string.
The resulting string is called the key.
In the next section we will discuss a bound on the achievable key length ℓ as a function of a security parameter ε.

III. FINITE SECRET KEY RATE
The secret key rate is the relevant figure of merit for describing the performance of a QKD protocol. First of all, we are going to state the definition of security.
Definition III.1. [18,20] Let ρ KE be the classical-quantum-state describing the classical key K of length ℓ, distilled at the end of a QKD protocol, correlated with the quantum states of the eavesdropper ρ E . The state ρ KE is said to be ε-secure if where ρ E ′ is the quantum state of an eavesdropper not correlated with the key.
The definition states that from the eavesdropper's (Eve) point of view the classical key K is indistinguishable from a random and uniform key with probability 1 − ǫ. Note that the used definition of security is composable, i.e. if we have two protocols characterized by two different probabilities of failure, then, after a concatenation of these protocols, the probability of failure of the global protocol will be bounded by the sum of the single probabilities of failure.
In the following we derive a formula for the ε-secure key length ℓ. We consider that Eve has complete control over the quantum channel and the source. Moreover, we consider the uncalibrated scenario [21], where the finite efficiency of the detectors are also attributed to Eve. Let p 11 be the probability that Alice and Bob receive a single photon. Then, starting with N source initial pulses, the steps 1 − 4 of the QKD protocol (see Fig. 1) decrease the number of signals to N source p 11 . Afterwards, the bases-sifting and the PE lead to N source p 11 p 2 Z − p 2 X resulting bits. For PE 3p 2 X signals are used to estimate the QBER. The fluctuations due to finite statistics have been analyzed in [6,8,22,23] . Note that differently to [6] we do not consider one symmetrized QBER. Instead we treat the QBER for each direction separately.
For the error correction protocol the total number of bits exchanged during the procedure is an upper bound on the information leaked to the eavesdropper about the final key. For the simulations, we will use [8,23] leak EC := f EC nh(e), where f EC ≥ 1 depends on the used EC protocol, h(e) is the binary Shannon entropy, i.e., h(e) = −e log e − (1 − e) log (1 − e) and e is the QBER. This definition comes from the fact that nh(e) represents the asymptotic number of bits used by a perfect error correction protocol. The coefficient f EC represents a deviation of the real protocol from the asymptotic one.
Regarding privacy amplification many bounds on the achievable secret key length are placed at the disposal in the literature [1,6,22,23]. Note that the bounds given in [1,6] are tighter than the bound given in [22,23] . However, they require that the channel is symmetric. Although it is possible to transform any channel in a symmetric one, we consider the bound provided in [22,23] to take the analysis simple and more general.
The following result summarizes the preceding considerations and provides a formula for the achievable secret key length. It is important to emphasize, that the following theorem holds only due to our special set-up with the QND measurement and the particular post-processing, which selects only the pulses containing one photon.
Theorem III.2 ( [22,23]). Let N source being the number of measurements performed by Alice and Bob. Let p 11 be the fraction of attempts resulting in a single-photon pulse entering Alice's and Bob's laboratories. The number of bits allocated for extracting a key is n := N source p 11 (p 2 Z − p 2 X ). If Alice and Bob distill a key of length ℓ ≤ max ε,εPE,εPA,pX ,p11 then it is ε-secure, with 0 ≤ ε + ε EC + ε PA + ε PE ≤ ε. The quantity S ζ (X|E) is given by [21][22][23] S ζ (X|E) : The entropy S ζ (X|E) is calculated with the QBER inferred during the parameter estimation protocol (see Eq. (2)). We would like to point out that the theorem above is a standard theorem, the unique difference is that we are not using all signals for extracting the key but only the signals coming as single-photon pulse.
The asymptotic formula for the secret key rate can be recovered as a special case of the theorem above for n → ∞ and ε → 0.

IV. CASE STUDY: SPDC SOURCE
In this section we will calculate the achievable secret key length for a pumped type-II down-conversion source [11]. The produced state by this source can be written as where p n := (n + 1)λ n (1 + λ) n+2 , and The state above is written along one fixed direction, e.g. the Z-direction. The meaning of the notation |l H , l V A is that on Alice side, a pulse with l H + l V photons is coming and l H (l V ) have horizontal (vertical) polarization. The quantity 2λ represents the mean photon pair number per pulse. In the following we calculate the quantities that enter the formula of the secret key rate (Eq. (5)). First of all, we express the probability that Alice and Bob receive only one photon. Then we calculate the QBER produced by the incoming pulse and finally, we find the optimal mean photon pair number per pulse, i.e. the one which maximize the secret key rate.

A. Calculation of p11
We denote with η A the total transmittivity of Alice's set-up. It is given by η A := η D η C (L/2), where η D is the efficiency of Alice's detectors and L is the distance between Alice and Bob. We consider a lossy, but otherwise perfect channel with attenuation coefficient α = 0.17 dB/km, such that the transmission probability of a photon is given by η C (L) := 10 − αL 10 . Analogously we define the total efficiency on Bob's set-up, denoted by η B . When an n-photon pulse is produced, during its travel on the channel and during the detection, some photons could be absorbed. The following formula gives the probability that an n-photon pulse becomes a 1-photon pulse, The factor n 2 is a combinatorial factor coming from our ignorance which photon was absorbed. The total probability that both, Alice and Bob, receive one photon is given by

B. Calculation of the QBER
In the six-state protocol measurements are performed along three orthogonal directions in the Bloch sphere, and, as explained above, three QBERs are involved. The Hamiltonian of the parametric down-conversion process is invariant under rotations from the X-to Y-, Y-to Z-and Z-to X-basis. Therefore, the state in Eq. (7) remains invariant in form under these transformations and hence the QBER is the same in all directions, i.e., there is only one QBER to consider, e.g., for the Z-direction. There are two contributions to the QBER. The first one comes from the misalignment and the second one is due to the fact, that the entering state is not maximally entangled. Let e n be the QBER generated by |φ n when misalignment is not considered. Then the total QBER is given by where e M := 2η M (1 − η M ) and η M is the misalignment-error probability. The first term of e P DC accounts for the fact, that even if the incoming state did not produce a QBER, due to the misalignment there would be an error. The second contribution comes from the error generated by the incoming photons. Note that terms of the form e M e n are not considered, because the simultaneous appearance of these two errors will produce correlated outcomes. The quantity e n can be calculated with the help of Eq. (9). This state is the superposition of n + 1 states. The first and the last term in the summation, with m = 0 or m = n will produce a correlated outcome. On the contrary the remaining n − 1 elements in the summation will produce an error with probability 1 2 . Therefore we get e n = (n + 1) − 2 2(n + 1) From the formula above it is possible to verify that e 1 = 0, which is consistent with the fact that |φ 1 is a maximally entangled state. The common free parameter in the QBER e P DC and in p 11 is the mean number of photons per pulse 2λ. Therefore, in the following we will calculate the optimal λ permitting to maximize the secret key rate. As shown in Fig. 2, in order to have a low QBER e P DC it is necessary to have λ small. For short distances, e.g. L = 20km it is possible to choose λ < 20 and at the same time be able to extract a key. The reason is that the multi-photon pulses arrives to Alice and Bob without an appreciable degradation and therefore, we are able to filter those contribution to the QBER during the pulse sifting. However, the situation changes when the distance between Alice and Bob increases. We see that the mean number of photons per pulse has to be much smaller than 1 in order to decrease the multi-photon contribution to the QBER. From Fig. 2 we see that for L ≥ 100km we have to choose λ < 1 in order to have a QBER smaller than the maximal QBER tolerated by the six-state protocol.

C. Asymptotic secret key rate
The secret key rate in the asymptotic case characterizes the maximal achievable secret key rate in case of perfect error correction, no uncertainty in the estimation of the QBER and perfect security (ǫ = 0). The formula is given by In Fig. 3 the secret key rate is shown as a function of the distance for two different experimental set-ups. A comparison between an idealized scenario (η D = 1, η M = 0) and a more realistic one (η D = 0.1, η M = 0.03) shows that the secret key rate decreases of at least 2 orders of magnitude. Regarding the optimal mean of photon-number per pulse, as shown in Fig. 4, the difference is of the order of 1. The optimized function is non-linear and the used optimization algorithm may only permit to find a local optimum.
Finally, we would like to point out, that a similar analysis of the asymptotic case was performed by Moroder et al. [17] with a source placed in an asymmetric position, i.e., closer to Bob than to Alice.

D. Finite-key analysis
In a practical execution of a QKD protocol, the initial number of resources is always finite, therefore we need to take into account corrections to the asymptotic secret key rate. The formula for the secret key rate is The calculations are done in such a way, that we optimize over all free parameters: the mean number of photons per pulse (λ), the probability to measure along the Z basis (p Z ), the failure probability for the parameter estimation (ε PE ), for privacy amplification (ε PA ) and the smoothing parameter (ε). For extracting a key it is necessary to have a block bigger than a specific length. As shown in Fig. 5, even for short distances the source has to emit at least 10 5 pulses with in mean λ ≈ 0.1 photons per pulse for extracting a key of 1 bit. However, if we consider detector inefficiencies and misalignment errors, the requirements will become much more stringent. In particular, we need at least 10 9 pulses for extracting a key.
The second quantity we want to analyze is the secret key rate (Eq. (5)). As shown in Fig. 6, for a perfect set-up (η D = 1, η M = 0) the finite secret key rate differs significantly from the asymptotic secret key rate. In particular, for all distances considered in Fig. 6, the secret key rate differs of at least 10% (N source = 10 10 , L = 20 km) from the asymptotic key rate. However, for more realistic initial number of pulses, the difference is bigger, e.g for L = 100 km and N source = 10 8 , the difference between the asymptotic secret key rate and the one with finite-key corrections is of one order of magnitude. In case of imperfections we will have similar plots but with a worse secret key rate. However, the qualitative behavior of the plot remains similar to Fig. 6.

V. CONCLUSION
In this paper we did a step towards the analysis of a realistic implementation of the entanglement-based version of the six-state protocol. We considered that the standard QKD measurement is preceded by a QND measurement permitting to know the number of photons entering in the source. This special set-up with a post-processing which considers only signals coming from a single-photon source permits to evaluate secret key rates for the six-state protocol. We studied the case of an arbitrary large number of initial pulses as well as of a finite key. As result we found that in realistic implementations with finite-efficiency detectors and misalignment, the minimal number of pulses for being able to extract a key is around 10 9 pulses at the distance of a few kilometers. Note that this is a very stringent requirement. In fact, considering an ordinary source, which emits pulses at the rate of 10 MHz, at the distance of 20 km between Alice and Bob, the time needed for extracting a key of 1 bit will be of the order of 100 seconds. Using the asymptotic key formula, in the same time, it could be possible to obtain a key of length 10 6 bits, which would be unfortunately completely insecure. Therefore, we emphasize once again that finite-key corrections are necessary for a realistic and correct security analysis.
Regarding future work, we underline that more realistic experimental imperfections should be taken into account in order to characterize the performance of the six-state protocol. In a future work, we want to consider the encoding of the quantum bits on the quantum channel and to study the effects of decoherence. This is a problematic issue which limits practical implementations of the six-state protocol and needs a careful analysis.