{'fraction_non_alphanumeric': 0.039692737430167595, 'fraction_numerical': 0.012737430167597765, 'mean_word_length': 4.503612605687932, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Concentration and purification of entanglement for qubit systems with ancillary cavity fields

We propose schemes for entanglement concentration and purification for qubit systems encoded in flying atomic pairs. We use a cavity-quantum electrodynamics setting as the paradigmatic scenario within which our proposals can be implemented. Maximally entangled pure states of qubits can be produced as a result of our protocols. In particular, the concentration protocol yields Bell states with the largest achievable theoretical probability while the purification scheme produces arbitrarily pure Bell states. The requirements for the implementation of these protocols are modest, within the state of the art, and we address all necessary steps in two specific set-ups based on experimentally mature microwave technology.


I. INTRODUCTION
Besides the attention that modern physics pays to entanglement in virtue of the role it plays in testing fundamental properties of quantum systems, there is an enormous interest in developing strategies and protocols allowing for the manipulation of these intimately quantum mechanical correlations between discrete as well as continuous variable systems. Even though its role in computational processes is not yet fully understood and is the subject of intriguing investigations, it is nowadays recognized that the ability of manipulating entanglement is crucial for many tasks in quantum communication and, in general, quantum information processing (QIP).
Over the past two decades, we have witnessed many proposals for the generation of entangled pairs of quantum systems, in various settings [1]. For instance, it has become a routine procedure in linear optics QIP with discrete variables, in which parametric down conversion is used [2] and in its continuous variable version, where two-mode squeezed states are effortlessly produced by non-degenerate optical parametric amplifiers. In different contexts, entanglement of pairs of atoms [3], trapped ions [4], superconducting devices [5] and atom-photon systems [6] has already been demonstrated.
Regardless of the efficiency with which it can be generated, entanglement is undoubtedly a fragile resource, susceptible to the detrimental effects of communication channels and environmental interactions that result in a degradation of the desired "quality" of the quantum resource. This is particularly true in a scenario of distributed QIP, where the exchange of high-quality entangled states (which should be as pure as possible and carrying a full ebit of quantum correlations) is necessary in order to realize perfectly efficient computational protocols. This has lead to the development of strategies to increase the entanglement and purity of mixed, nonmaximally entangled states [7,8]. So far, experimental realizations of entanglement purification schemes have been limited to linear optics [9,10,11] and trappedions [12]. Though lacking such a demonstration, mi-crowave cavity-quantum electrodynamics (cQED) holds great promise as a medium for QIP. Strong coupling between atoms and field modes allows for the creation [13] and distribution [14] of entanglement, and the performance of quantum logic operations [15]. The new high finesse cavities [16] demonstrated by Kuhr et al. improve the feasibility a system of distributed QIP employing atoms as flying qubits, and cavity field modes as relatively long-lived static qubits. This system would clearly be enhanced by methods for improving degraded entanglement.
Suggestions have been made for cQED purification schemes that recover entanglement only from decoherence due to cavity decay [17], or that rely on repeated interactions of the cavity modes with a single flying atom [18]. Here, we propose schemes for the concentration of pure-state entanglement, and the distillation of pure-state entanglement from Werner states (assuming a sufficiently large fraction of any Bell state) and maximally entangled mixed states (MEMS) [19]. Our protocols rely only on single-atom operations and measurements, and could be performed using current technology.
The paper is organized as follows. In Sec. II we introduce the interaction model used throughout this investigation and describe the protocol for the concentration of entanglement that represents the first part of our study. This probabilistic entanglement concentration is accompanied by a simultaneous interconversion from flying-qubit to stationary-qubit entanglement. We prove that a sufficiently long interaction time allows for the concentration of entanglement to the maximal value of a full ebit with the highest probability being theoretically allowed. The scheme requires resources that can be prepared off-line and is extremely close to ideal efficiency for values of the experimentally relevant parameters attainable with present-day technology. In Sec. III we analyze an entanglement purification protocol that, when operating on mixed Bell-diagonal states, extracts a progressively more entangled and pure two-qubit state. The scheme is probabilistic and requires information gained on the population of the cavity fields. We demonstrate the wide applicability of our scheme by addressing the purification of two interesting classes of mixed states, namely Werner states and maximally entangled mixed states of two qubits. Sec. IV is devoted to the analysis of the feasibility of the schemes we propose in microwave cavity-and circuit-QED set-ups. We highlight how the recent achievements in this field allow for a foreseeable implementation of our proposals. Moreover, we discuss the possibilities offered by superconducting devices integrated in planar resonators as alternative scenarios in which our protocols can be realized. Finally, Sec. V summarizes our results.

II. CONCENTRATION SCHEME
Many problems involving the interaction of spin-like two-level systems with single-mode bosonic systems can be modelled with an effective dipole-coupling formalism in which a spin operator (generally proportional to theσ x Pauli spin operator) is coupled to the electric (or the magnetic) part of an electromagnetic field. This is, evidently, the case for neutral atoms or quantum dots coupled to optical or microwave fields [3,20,21]. On the other hand, this description holds also for a system consisting of a Cooper-pair box (in a superconducting-quantuminterference device (SQUID) configuration and in the charge regime [22]) integrated into a planar stripline resonator [23], a setting we generally refer to as circuit-QED. At the charge degeneracy point, an effective dipole moment operator for the SQUID can be written, whose amplitude is proportional to the excess charge in the SQUID island [23]. In what follows, in order to fix the ideas and introduce the general formalism employed throughout our study, we shall use language and terminology that are typical of cavity-QED, and we refer explicitly to a scheme of Rydberg atoms interacting with microwave cavities. In Sec. IV we extensively assess the details of oimplementation in both cavity-and circuit-QED.
Let us consider a two-level atom with ground and excited states |g and |e , respectively. The corresponding transition frequency is labelled ω o . The atom interacts with the field mode of a cavity of frequency ω f , described by the bosonic annihilation (creation) operatorâ (â † ). Within the dipole-coupling interaction assumed here, the total Hamiltonian of this atom-field system iŝ whereσ + = |e g| andσ − = |g e| are the atomic ladder operators and λ is the coupling strength of the interaction. Employing the rotating wave approximation [24], assuming atom-field resonance (i.e. ω 0 ≃ ω f ) and entering the interaction picture with respect to the free energŷ H 0 = ω oσz + ω oâ †â , the coupling reduces to the standard Jaynes-Cummings model [25] H int = λ σ +â +σ −â † .
The dynamics arising from this Hamiltonian (2) are described by the following time-evolution operator, written in the atomic basis {|e , |g } [26] wheren =â †â is the photon-number operator of the cavity field. Even though this simple interaction model has been extensively studied in recent years, the large variety of effects for which it is responsible and its vast applicability to problems of QIP make it worth our consideration. Here, we give a simple, yet interesting example of its applicability to the problem of entanglement concentration.
Consider a non-maximally entangled pure state of two atoms, labelled 1 and 2: where α is real and β = √ 1 − α 2 . The assumption of this form of the input state does not affect the generality of our approach. (Other input states may be used if converted into the form (4) , which can be achieved by using Ramsey zones to perform single-qubit rotations.) This state can be created using a variant of the scheme suggested in Refs. [27], which is able to establish an arbitrary amount of entanglement in the pure state of two preparatory cavities c1 and c2, i.e. a state of the form cos(πτ )|01 c1,c2 +sin(πτ )|10 c1,c2 . Atoms 1 and 2 are prepared in their ground states, and each is passed through one of the two cavities. By arranging a quarter-Rabi cycle between atom j and the field of cavity cj (j = 1, 2), and using a single Ramsey zone [13] to perform a σ z rotation of angle π on one of the atoms, we will transfer the entanglement from the cavities to the atoms. Alternatively, one can use a single cavity sequentially crossed by atoms 1 and 2 as in Ref. [21]. Of course, the preparation of the input state can be considered as an off-line step that should not be accounted among the requirements of the scheme we address.
We present two versions of our concentration protocol; a symmetric scheme, in which α can take any value in the range [−1, 1], and an asymmetric scheme in which we require α > β.

A. Symmetric Concentration Scheme
We allow qubits 1 and 2 to interact with the field of cavities a and b respectively, which are spatially separated with each prepared in a single-photon state. A sketch of the described setup is presented in Fig. 1. The initial state of the overall system is, therefore, |Ψ o 12 ⊗ |11 ab which evolves according to the global time-propagatorÛ 1a (t 1 ) ⊗Û 2b (t 2 ), whereÛ jµ (t j ) is given by the matrix expression Eq. (3) with the replacement a,â † →â j ,â † j (j = a, b) and atomic label µ = 1, 2. For the sake of simplicity, we set the interaction time t 1 = t 2 = t, which results in the evolved state In this equation, we have introduced the normalized twomode states For the sake of mathematical convenience, we shall consider the case of 0 < α < β. These equations show that the information initially contained in the input two-atom state has been transferred to cavity fields in the subspace {|0 j , |1 j , |2 j } of the relevant infinite-dimensional Hilbert space. To complete the entanglement concentration process, we measure the state of each atom in thê σ z -eigenbasis {|e , |g }. After postselecting the events corresponding to both atoms being found in |e , this operation results in the projection of the cavity fields onto |ψ ee ab with probability If the interaction time was selected such that we produce a two-mode state with a full ebit of entanglement. Therefore, we have probabilistically concentrated the initial flying-qubit entanglement by transferring it to two stationary qubits, here embodied by the cavity field modes. This full ebit can, with unit probability, be transferred to two flying atoms by arranging local interactions with the cavity fields for a time such that the transformations |g, 0 atom,cavity → |g, 0 atom,cavity , |g, 1 atom,cavity → |e, 0 atom,cavity are realized.
Let us now consider whether or not this concentration scheme is ideal. To this end, we use the tool provided by the entanglement of single pair purification (ESPP), E S [28]. This quantity, which is shown to be a measure of entanglement in Ref. [28], is defined as the maximum probability with which a non-maximally entangled qubit pair can be converted to a full-ebit state using local operations and classical communication (LOCC). It is equal to 2|c s | 2 , where c s is the smallest Schmidt coefficient in the state under investigation [28]. The input state (4) has E S = 2α 2 . The optimality of the concentration protocol is evaluated as follows: As ESPP is a good measure FIG. 1: Entanglement concentration scheme. Two cavities act as stationary qubits interacting with flying atomic pairs previously prepared in a non-maximally entangled state. Local cavity-atom interactions followed by atomic-state detection probabilisticly transfer one ebit of entanglement to the cavity field modes. For properly chosen interaction times, the probability of obtaining an ebit is arbitrarily close to the optimal theoretical value.
of entanglement, it cannot increase, on average, under application of LOCC [29]. Therefore, the protocol for entanglement concentration is said to be optimal if it conserves ESPP.
As before the measurement of the atomic pair we have an a priori ensemble of states given by Eqs. (6), each obtained with a precise probability, the object of our interest will be the average entanglement of the ensemble. After measuring the state of the atomic pair, the cavity modes have the average ESPP where p (|ψ ij ) is the probability of projecting the field modes onto the state |ψ ij (i, j = e, g), which has ESPP E S (|ψ ij ).
Let us momentarily impose the following condition on the interaction time It is clear that this will set E S (|ψ eg ) = E S (|ψ ge ) = E S (|ψ gg ) = 0. We now make a simple trigonometric observation: As kπ/ √ 2 and kπ are incommensurable, by letting k grow, the value of sin(kπ/ √ 2) will fluctuate within the range [−1, 1], such that the entire range will eventually be covered. This is shown pictorially by the trigonometric circle in Fig. 2 (a).
Thus, having set the constraint in Eq. (10), we can still find a value for the rescaled interaction time λt such that any additional condition we choose to set on sin(λt) will also be satisfied. The only requirement is having a sufficiently large range of integers k, i.e., a large upper bound on the interaction time t [30]. For instance, if we select sin(λt) = 0, we see that the average ESPP of the cavity modes is zero. If, on the other hand, sin 2 (λt) = α/β, we find that condition (8) is satisfied, so that E S (|ψ ee ) = 1, and E S f = P (|ψ ee ) = 2α 2 . Thus, for general values of t, E S f ≤ 2α 2 , the upper bound being attained when both conditions (8) and (10) are satisfied. In this case, the procedure gives the maximum probability of producing a full-ebit state, and can be said to be optimal. Note that in this case, a single round of the concentration procedure is all that is necessary to (probabilistically) produce a maximally entangled state from any input pair.
As an example, in Fig. 2 we show the case of α = 0.253964, corresponding to α/β = 0.512418 and k free to span the first 50 integers. Panel (a) clearly shows how these fifty values are uniformly distributed over the trigonometric circle. On the other hand, in panel (b) we compare the distribution of | sin(kπ/ √ 2)| with the chosen value for α/β, (which has been extracted from a Gaussian ensemble of values of α lying in the range [0, 1/ √ 2]). The case is rather favorable as, for k = 4, sin(2 √ 2π) = 0.513288 ≈ α/β. Clearly, for other values of α, larger values of k may be required in order for conditions (8) and (10) to simultaneously hold.
However, in practical realizations, the interaction time is limited by the coherence time of the system, which is given by τ cohe = min(τ atom , τ f ield ), where τ cavity (τ atom ) is the cavity field (excited atomic state) lifetime. Our unitary treatment for entanglement concentration has to be consistent with the requirement t < τ cohe . We therefore change our approach by firstly requiring that condition (8) be fulfilled, so that all successful runs produce a Bell state output. Secondly, the probability of success is maximized within some upper bound on λt. probability of concentrating entanglement into a full-ebit state becomes equal to 2α 2 , and so the ESPP of the input state is, therefore conserved. Smaller upper bounds will, in general, reduce P max . Nevertheless, it is important to stress that even at very short interaction times (i.e λt < π, dashed line), there are input states |Ψ o 12 allowing for optimal concentration. The successful implementation of this concentration protocol clearly relies on our previous knowledge of the amplitude α in the initial entangled atomic state |Ψ o 12 in Eq. (4). Here, we want to assess the effect of an uncertainty in the value of α on probability of success of the protocol, i.e., the probability of projecting both ancillary atoms onto their excited state. Our assumption is that α follows a Gaussian distribution centered atᾱ with standard deviation σ. This is perfectly reasonable as it is consistent with the protocol we suggested in order to generate input state (4), where an uncertainty in the velocity of the preparatory atom (usually assumed to follow a Gaussian distribution) may result in some fluctuations in the degree of entanglement between atoms 1 and 2. The quantity of interest is the mean success probability P (|ψ ee ), as given in Eq. (7), averaged over the distribution G(ᾱ, σ) = . A numerical analysis reveals that the values of the rescaled interaction time giving the maximum success probability are unaffected by σ, but the success probability decreases as the uncertainty in α increases, as should be expected. Clearly, the average entanglement of output states will decrease with increasing σ.

B. Asymmetric Concentration Scheme
This protocol is similar to that described above, the difference being that the cavities are prepared in the vac-uum state, which eases the implementation of the protocol. After the atoms, prepared in state (4), interact with the cavities for a time t, the state of the system reads +α cos 2 (λt)|00 ab |ee 12 As opposed to the symmetric scheme, we here require α > β and set sin 2 (λt) = β/α. By projecting both atoms onto their ground states, we obtain, with the maximum allowed probability 2β 2 , a maximally entangled state of the cavity fields. Note that we have imposed only one condition on t; thus the optimal interaction time will always exist within the limit λt < π/2. The required form of the input state can be generated from any input by means of local rotations performed on qubits 1 and 2 at properly set Ramsey zones [3,21].

III. PURIFICATION SCHEME
We now move on to the description of a simple quantum state purification scheme [7,8] that is able to operate on any Bell-diagonal mixed state. A general remark about the tools used in this Section is due. As we mainly deal with bipartite mixed states of two qubits, we shall quantify quantum correlations in terms of the negativity E N [31]. This quantity is strictly related to the positive partial transposition (PPT) criterion for the separability of quantum states [32]. The partially transposed density matrix̺ is obtained from any given bipartite quantum state by transposing the variables of only one of the two subsystems. The PPT criterion then simply reads ̺ ≥ 0, and is necessary and sufficient for the separability of any bipartite two-qubit quantum state. The 'negativity' E N [31], which can be easily determined from the density matrix, is defined as the absolute value of the sum of the negative eigenvalues of̺ and directly quantifies the violation of the PPT criterion. It is monotonically related to the logarithmic negativity, which operatively quantifies an upper bound to the distillable entanglement.
Let us begin our analysis by assuming the special case of A − = B − = 0 so that, imposing normalization, A + = for which E (0) N = 2P − 1. The task of our study is the purification of ρ o by using two replicas of the state and an ancillary system. In our scheme, the replicas of ρ o are encoded in the state of qubits 1 & 2 and 3 & 4, while the ancillary system is embodied by two cavities (labeled a and b) analogous to those considered in the previous Section. In order to illustrate the main features of our protocol, we momentarily assume that the cavities are prepared in an n-photon state, with n ≫ 1. We will relax this assumption later on. The initial state of the system is thus ρ o,12 ⊗ ρ o,34 ⊗ |nn ab nn|.
As shown in Fig. 4, one atom from each pair passes through each cavity (qubits 1 & 3 pass through a while qubits 2 & 4 pass through b) and the interaction time t is selected so that √ nλt = π/2. In order to understand the main features of the scheme we propose, it is enough to consider just the dynamics within cavity a, where, by neglecting the small difference between the effective Rabi frequencies √ nλt and √ n + 1λt, the following transformations occur: |ee 13 |n a → |gg 13 |n + 2 a , |eg 13 |n a → |ge 13 |n a , |gg 13 |n a → |ee 13 |n − 2 a , |ge 13 |n a → |eg 13 |n a .
The cavity fields are now projected onto |nn ab with a success probability [P 2 +(1−P) 2 ]/2. Only those terms in which both atoms passing through each cavity are in different states survive the projective measurements. Thus, if both atom pairs are initially in the same Bell state, the output will be a GHZ-like state of four atoms, while cross terms will be annihilated; (15) The effect of the ancillary systems embodied by the cavity fields is to filter the right form of correlations among the qubit pairs, leaving us with the mixed state If we now rotate atom 1 about its z-axis by angle π, then use a third cavity to perform the same filtering operation on atoms 1 and 2, we will obtain, with probability P 4 2[P 2 +(1−P) 2 ] 2 the pure GHZ-like state This would, however, require a significantly more complicated experimental setup. Instead of this final filtering stage, we can use an iterative procedure to produce maximally entangled states of arbitrary purity. We convert (16) to a mixture of bipartite entangled states by measuring atoms 1 and 2 in the {|± j } (j = 1, 2) basis, where |± j = (1/ √ 2)(|e j ± |g j ), which conditionally produces the outputs The state ρ (1) +,34 is obtained when atoms 1 and 2 are projected onto the same state, and ρ (1) −,34 otherwise. It is possible to interconvert ρ + and ρ − by performing a zrotation of angle π on one of the atoms. This is unnecessary, however, as |Φ − behaves similarly to |Φ + under the transformations described above: When applied, the protocol will annihilate |Φ − |Ψ + terms and preserve |Φ − |Φ + . Likewise, |Ψ − behaves analogously to |Ψ + . Therefore, if P > 1 2 , we can see that we have increased the relative proportion of the state |Φ ± , and hence its purity. Correspondingly, E N has increased from E (0) By iterating this procedure, it is possible to produce a state of arbitrary purity. By using q replicas of ρ o , the purification protocol produces the final state ρ (q) with a success probability (P q + (1 − P) q )/2 q . The evolution of the input state towards a maximally entangled pure state is tracked, in terms of purity and probability of purification, in Fig. 5. Obviously, the probability of success tends rapidly to zero as the number of iterations performed increases to infinity. Although our success probability is less than that of Bennett et al., [7], it matches that of Pan et al. [9].
In the following two Subsections, we provide two examples of applications of the purification protocol we have described so far. The objects of our interest are Werner states and MEMS.

A. Purification of a Werner state
Let us consider the Werner state where Q = (1 − P)/3. Such states are (for general P) mixed, and entangled for P > 1 2 , as witnessed by the negative partial transposition criterion.
In approaching the purification of Eq. (20), some complications arise due to the fact that cross terms between atom pairs in the states |Φ + and |Φ − would not be annihilated. Indeed, after the first round of purification, the output state (conditioned on qubits 1 and 2 being projected onto the same state) reads ρ (1) with B = P 2 + 2PQ + 5Q 2 . This state does not exhibit any great improvement, in terms of purity, with respect to ρ W : Indeed, repeating the procedure using states (20) and (21) as inputs actually causes a decrease in negativity, below that of ρ W .
In order to conduct further purification, we prepare two atom pairs in state (21), and subject each atom to a π 2 rotation around its x-axis. This will effect the transformations |Φ + to |Φ + , |Φ − to |Ψ + , |Ψ + to |Φ − and |Ψ − to |Ψ − . Using these two modified pairs as the inputs for our protocol, we now obtain the output which is purified with respect to ρ W (we can see that it is pure to first order in Q). As before, an arbitrarily pure state can be obtained by iteration, but the cumulative probability of success decreases rapidly with the number of steps.

B. Purification of MEMS
We now approach MEMS as the second non-trivial example of the applicability of our purification protocol. MEMS are states possessing the largest achievable mixedness for a given degree of entanglement E N ≥ 0 [19]. A parameterization of MEMS is critically dependent on the chosen measures of entanglement and purity. If E N is taken to quantify entanglement and the linearized entropy S l = (4/3)(1 − Trρ 2 ) is used as the measure of the purity of a state, MEMS are a singleparameter family of states given by with 0 ≤ g ≤ 1 [19]. MEMS have been theoretically characterized and schemes for their generation in cavity-QED and circuit-QED have been proposed [33]. Based on a "Procrustean" method, they have also been experimentally produced in an all-optical setup [34]. In order to apply the purification protocol, we rewrite ρ mems,12 ⊗ ρ mems,34 in the Bell basis, let it interact with the cavity fields and then exploit the transformations in Eqs. (15)  This state is purified with respect to the original MEMS, and has, for a set value of g, a larger negativity. The quantitative comparison between the purified and input state is shown in Fig. 6, where the states corresponding to eleven discrete values of g ∈ [0, 1] (equally spaced with steps of 0.1) are plotted in the negativity-linear entropy plane. We recall that, by definition, S l = 0 for pure states and S l = 1 for a totally mixed state. Obviously, in agreement with the interpretation of MEMS as boundary states to physically achievable entangled mixed states, the purified states describe a trajectory in the E N − S l plane below the extremal curve traced by ρ mems, 34 .
Evidently, for a set value of g, the corresponding ρ (1) mems,34 has a smaller S l , meaning a larger purity, and a larger value of negativity, than ρ mems .

C. Simplified purification protocol
Producing high photon-number Fock states, upon which the protocol discussed so far is based, is rather difficult. Here, in order to reduce the complexity of implementing the scheme, we briefly discuss a simplified version in which the two cavities are initially prepared in single-photon states. The first pair of atoms interacts with the cavities for a time t chosen so that λt = (m 1 + 1 2 )π, with m 1 an integer. Analogously, the interaction time for the second pair, t ′ , is such that √ 2λt ′ = (m 2 + 1 2 )π. The evolved states involve cavity field modes with up to three photons.
So far, we have overlooked the difficulty of projecting cavity modes onto the single-photon state. In our particular situation, this is reduced to the simpler problem of distinguishing a single-photon state from zero-, twoand three-photon states. In fact, the latter of these can be effectively removed from the mixture by selecting m 2 such that sin √ 2ϑ 2 ≈ 0 (compatible with sin ϑ 2 ≃ 1 for m 2 = 7). In order to accomplish the measurement, we pass an atom in its ground state through the cavity. The interaction time, t ′′ , is selected so that sin λt ′′ √ 2 = 0 and cos (λt ′′ ) ≈ 0. If the cavity was initially in a superposition of zero-, one-and two-photon states, the interaction will produce the transformation (c 0 |0 + c 1 |1 + c 2 |2 )|g →c 0 |0 |g − ic 1 |0 |e + c 2 |2 |g (28) If, on observing the atom, we find it to be in its excited state, we can conclude that the cavity must have been in a single-photon state.

IV. PRACTICAL CONSIDERATIONS
In this Section, we discuss potential experimental settings for the implementation of our entanglement concentration and purification schemes. As already mentioned, we will explicitly address microwave cavity-and circuit-QED set-ups, which are two of the most promising scenarios for quantum information processing and communication, as stated in the Los Alamos roadmap [35].
Microwave cavity-QED uses a mature technology based on the interaction between neutral Rydberg atoms of large dipole moments and high-finesse microwave cavities [3,13,21]. Paradigmatically, we follow the proposal of Kuhr et al. [16], of superconducting cavities sustaining a field mode of frequency ω f /2π = 51 GHz, length L ≃ 27 mm and energy damping time τ f ield ≃ 130 ms. This corresponds to a cavity finesse F = πc τ f ield /L ∼ 5 × 10 9 , where c is the speed of light. As previously mentioned, the coherence time of the overall system depends also on the damping time of the excited state of the flying qubits (each encoded in circular states with principle quantum numbers 50 and 51 of a Rydberg atom), which is comparable to τ f ield . The atomic transition frequency (ω 0 = 51.09 GHz) can be tuned in and out of resonance with the cavity field by means of a d.c. Stark shift induced by a static electric field parallel to the cavity axis (this field also helps preserve the circularity of the atomic states). This technique can be used to control the interaction time between each flying atom and the corresponding cavity field. The interaction time is also dependent on the atomic velocity across the resonator, which is usually in the range of hundreds of m.s −1 , with an experimental accuracy well-within 5−10%. The effect of this uncertain atomic velocity on the concentration protocol is discussed in Section II. The large atomic dipole moment (∼ 10 ea 0 where e is the electron charge and a 0 is the Bohr radius) allows for the achievement of a strong coupling regime characterized by λ = 2π × 50 kHz. This value guarantees the possibility of performing 100 Rabi floppings (i.e. λt ≃ 100π) within τ cohe [16], putting the requirement for a long upper bound on the rescaled interaction time (as stated for the concentration protocol) within the present state of the art. Atomic state detection, necessary for both the concentration and the purification scheme, can be accurately performed with state-selective field-ionization channeltrons (each having a detectionerror between 10 and 13%). With the new generation of high-finesse cavities addressed above, the atomic injection is performed through large apertures, allowing for the screening of the flying qubits from coherencedestroying stray fields at the surface of the cavity mirrors.
In a circuit-QED setup, flying atoms are replaced by static superconducting qubits embodied by SQUIDs working in the charge regime at the degeneracy point (to remove, to first order in the single-Cooper pair charge 2e, the detrimental effect of low-frequency noise induced by background impurities) [22,23]. The qubit is integrated, via conventional optical lithography, in a full-wave, on-chip, coplanar waveguide cavity with resonant frequency ω f ield = 5.7 GHz (the microstrip resonator), located at a voltage antinode of the sustained field mode and capacitively coupled to it. The stripline is a quasiunidimensional structure with a very small transversal dimension that reduces the effective volume of the cavity field and enhances the coupling rate with the qubit. This, together with the effective dipole moment of the SQUID qubit (∼ 2×10 4 ea 0 ) gives rise to the ratio λ/ω f ield ≃ 2%. The energy damping time of the stripline is conservatively assumed to be ∼ 1µs, giving λτ f ield = 100, which would, in principle, allow for a large number of coherent Rabi floppings within the cavity lifetime (experimental evidence puts the qubit damping rate in the range of 2µs), in complete analogy with the cavity-QED setting described above. A detailed derivation of the qubitstripline coupling Hamiltonian and the resulting coupling strength can be found in Paternostro et al. [23].
The transition energy of the superconducting qubit can be adjusted through an external magnetic flux that modulates the Josephson energy of the SQUID [22] in such a way that the qubit can be easily put in the strong resonant or dispersive regime with the field. This tuning ability is the basis of the experimentally demonstrated non-demolition measurement of the qubit state, through spectroscopic resolution of the field's frequency-pulling effect [23]. Therefore, the projection of a qubit required by our schemes can be reliably implemented by using an ancillary cavity field mode, differing in frequency or polarization with respect to the mode singled out for the realization of our protocols, along the lines depicted in [23]. On the other hand, the same technique can be used in order to perform a photon-number-resolving cavity field measurement: The qubit spectrum exhibits a peak that is shifted, with respect to the empty cavity situation, by a quantity depending on the population of the field mode.
The integration of more than a single SQUID qubit in the stripline, in a way that avoids (inductive) crosstalk between the qubits, is achievable, the main difficulty being the necessity of separating each qubit's gate voltage [22] to properly set each working point. As opposed to cavity-QED, however, the entanglement between superconducting qubits in circuit-QED has yet to be experimentally demonstrated, despite promising steps having been performed along these lines [36].
For the sake of completeness, we here mention that a scheme for the preparation of MEMS has been suggested, both in cavity-and circuit-QED, in Ref. [33]. We refer you to these works for an extensive account of the details necessary for this procedure.

V. CONCLUSION
We have presented two schemes for entanglement concentration and purification for qubit systems. Our protocols are explicitly designed in settings involving qubits interacting with ancillary cavity fields, which can be implemented in cavity-and circuit-QED set-ups. Our entanglement concentration scheme conserves ESPP, therefore being optimal, and achieves the maximum theoretical probability of producing a maximally entangled state of two qubits. The state purification protocol can be iterated so as to return a state of arbitrary purity, although the success probability decreases exponentially as perfect purity is approached.
The required resources are modest. We need cavities prepared in zero-and single-photon states, which have been experimentally demonstrated, and the ability to perform single-atom rotations and measurements, which is possible with high accuracy and large detection efficiencies. In addition, we require cavity-field measurements, which can be achieved in an indirect way: We have addressed strategies for this step in both of the proposed experimental scenarios.
The mechanisms that constitute the main sources of imperfection and error have been quantitatively assessed to provide a comprehensive analysis of the protocols at hand. We hope that the evidence for state-of-the-art implementability of our schemes and the astonishing improvements in the control of microwave-based quantum technology will pave the way to the realization of entanglement concentration and purification in cavity-and circuit-QED systems.