{'fraction_non_alphanumeric': 0.04000305755853951, 'fraction_numerical': 0.01037021937982521, 'mean_word_length': 4.578169414440023, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Spin-polarized currents and noise in NS junctions with Yu-Shiba-Rusinov impurities

Conventional superconductors disordered by magnetic impurities demonstrate physical properties drastically different from their pristine counterparts. In our previous work [Phys. Rev. B 92, 245430 (2015)] we explored spectral and thermodynamic properties of such systems for two extreme cases: completely random and ferromagnetically aligned impurity magnetic moments. Here we consider transport properties of these systems, and show that they have a potential to be used in superconducting spintronic devices. Each magnetic impurity contributes a Yu-Shiba-Rusinov (YSR) bound state to the spectrum, residing at sub-gap energies. Provided the YSR states form metallic bands, we demonstrate that the tunneling current carried by these states can be highly spin-polarized when the impurities are ferromagnetically ordered. The spin polarization can be switched by simply tuning the bias voltage. Moreover, even when the impurity spins are completely uncorrelated, one can still achieve almost 100% spin polarization of the current, if the tunnel interface is spin-active. We compute electric current and noise, varying parameters of the interface between tunneling and fully transparent regimes, and analyze the relative role of single-particle and Andreev reflection processes.


I. INTRODUCTION
The superconducting condensate in conventional superconductors is formed of spin-singlet Cooper pairs, i.e. correlated pairs of electrons with opposite spins. Therefore, spin-dependent scattering induced by the presence of magnetic impurities or proximity of a ferromagnet can be detrimental for superconductivity. Indeed, it was shown by Abrikosov and Gor'kov 1 that magnetic impurities lower the superconducting transition temperature and can even lead to gapless superconductivity. However, the effect of spin-dependent scattering is not always negative. For example, spin-triplet correlations between equal-spin electrons can be induced in hybrid structures consisting of ferromagnets and conventional superconductors [2][3][4] . This feature makes such systems promising for applications in superconducting spintronic devices [5][6][7] . On the other hand, specially tailored arrangements of magnetic impurities, such as linear chains for example, are able to host the elusive Majorana excitations at their boundaries [8][9][10][11][12][13] .
In the late 1960s it was shown that classical spins in superconductors induce bound states at sub-gap energies [14][15][16] , now termed Yu-Shiba-Rusinov (YSR) states. Experimental control of individual impurities has reached the point when it is possible to access the local properties of the system in vicinity of each impurity 17,18 . For example, in Ref. [17] Ruby et al. studied a superconductor with magnetic adatoms deposited on its surface. They were able to investigate microscopic tunneling processes between an STM tip and a YSR state of a single impurity by varying the distance between the tip and the sample. They observed different transport regimes governed by the relative role of single-particle and Andreev reflection processes. If we imagine a homogeneous distri-bution of such impurities, then the YSR states may overlap and form metallic bands, supporting electric current at sub-gap voltages. It is important to investigate the nature of elementary charge carriers in this case, especially when the impurity subsystem gets correlated (ferromagnetically aligned, for example).
In this work we investigate transport properties of conventional s-wave spin-singlet superconductors with magnetic impurities. Assuming that an electric current is injected in such a system via a normal-metal probe (STM tip, for example), we perform an extensive analysis of both current and noise. Computing the differential Fano factor 19 allows us to decipher the relative role of singleparticle and two-particle (Andreev reflection) processes in the tunneling current. When the impurities are ferromagnetically aligned, the electric current supported by the YSR bands can reach 100% spin polarization in the tunneling limit. At the same time, in the appropriate parameter regime, the current polarization can be switched between spin-up and spin-down by simply tuning the applied bias. Finally, if we allow the tunnel interface to be spin-active [20][21][22] , one can still observe completely spinpolarized current via the YSR bands, even when the magnetic impurities in the superconductor are completely uncorrelated.
The paper is organized as follows. In Sec. II we discuss the theoretical model and introduce the framework used to solve the problem. In Sec. III we present the main results, considering three different cases: (i) tunneling limit (low transparency), (ii) high transparency, and (iii) spin-active interface and the inverse proximity effect. For each case we allow for the magnetic impurity spins to be ferromagnetically ordered or randomly oriented. Finally, in Sec. IV we discuss the obtained results and conclude.

A. Quasiclassical Green's function
We use the quasiclassical theory of superconductivity, which is an extension of Fermi-liquid theory to encompass superconducting 23,24 and superfluid phenomena 25 . It is based on separations of energy and length scales relevant in normal and superfluid phases, namely E F ∆ or λ F ξ 0 . Here, E F and λ F are the Fermi energy and wavelength, while ∆ and ξ 0 = v F /2πk B T c are the order parameter and coherence length in a superconductor (T c is the critical temperature). The central object of the theory is the single-particle Green's function. Starting from the full Gor'kov equations for a mean-field BCS Hamiltonian, and keeping only the coherence length scale variations in the system, we end up with the quasiclassical Eilenberger equation 23 together with the normalization conditioň The quasiclassical Green's functionǧ(ε, p F , r) and the self-energyȟ(ε, p F , r) are, in general, matrices in Keldysh Here, ε is the energy, p F is a point on the Fermi surface, and r is the spatial coordinate. For brevity, we will avoid writing the arguments explicitly, except where it is needed. We introduce two sets of Pauli matrices, τ = (τ 1 ,τ 2 ,τ 3 ) and σ = (σ x , σ y , σ z ), to resolve the matrix structure in Nambu and spin spaces, respectively.

Riccati parametrization
We employ the so-called Riccati parametrization 26-28 , which is a convenient way of solving the Eilenberger equation, Eq. (1). For the retarded and advanced components of the Green's function it reads, where the "tilde"-operation expresses particle-hole conjugation, defined as One should understand ε here as a real quantity for the Keldysh component, and having non-zero positive (negative) imaginary part for the retarded (advanced) one.
The parametrization defined in Eq. (4) automatically satisfies Eq. (2) and transforms Eq. (1) into a set of differential equations for the two coherence functions γ(ε, p F , r) andγ(ε, p F , r), where we have used the following representation of the self-energies in Nambu space, We note that the coherence functions and the selfenergies here still have a 2 × 2 matrix structure in spinspace. The advanced coherence functions are related to the retarded ones via meaning that it is sufficient to solve for retarded quantities only. Finally, since we are interested in transport properties, we also need to know the Keldysh component of the Green's function, which is parametrized by means of the two distribution functions x(ε, p F , r) and x(ε, p F , r) aŝ This leads to the two additional differential equations As was mentioned above, we are going to consider the two extreme configurations of magnetic impurities spins, namely randomly oriented and ferromagnetically aligned. In this case our problem has at most one given spin quantization axis. Based on this, we can write down quite generally the following expression for the coherence functions, This allows to split the problem into two sub-problems for different spin bands. Obviously, for the case of randomly oriented spins, γ ↑ = γ ↓ .

Self energies
In order to solve Eqs. (6) and (10) we also have to formulate self-consistency equations for the self-energies and superconducting order parameter. The self-energy matrixĥ, see Eq. (7), contains both impurity contributions and the order parameter. For our purposes it is enough to consider only retarded and advanced self-energies. We adopt the self-energies obtained in our recent work, see Ref. [29], where we have thoroughly studied thermodynamic properties of the model considered here. For a self-contained presentation, we give a short recap of the basic equations and parameters below.
The order parameter of a spin-singlet s-wave superconductor has the form ∆ R 0 (r) = ∆ 0 (r)iσ y , where Here, λ < 0 is the electron-phonon coupling constant, N F is the normal-state density of states per spin at the Fermi level, and ε c is the high-energy cut-off of the order of the Debye frequency. Magnetic impurities are treated within the non-crossing t-matrix approximation 30 , and the impurity self-energy is given by the single-impurity t-matrix multiplied by the density of impurities n, The matrixt imp satisfieŝ Here,v(p F , p F ) is the matrix element of the impurity potential between the quasi-particle states with momenta p F and p F on the Fermi surface (computed in the normal state of the system). Below we consider only s-wave scattering off impurities, i.e.v(p F , p F ) is independent of momenta. Then, it can be written aŝ where v 0 parameterizes the scalar part, and v S the exchange part of the scattering. For the case of unpolarized magnetic impurities, besides averaging over impurity positions, one also has to average Eq. (14) over the magnetic moment directions, obtaining the self-energŷ For the case of ferromagnetically ordered magnetic impurities we can choose the coordinate system in spin space such as m j ≡ m = (0, 0, 1). Since in this case, apart from the local scattering by the impurities, we also have a background magnetic field in the system, the impurity self-energy consists of two parts 29 where the first term has a form of Zeeman interaction, while the second one is obtained by solving Eq. (14).
We define a set of parameters for our impurity model: the scattering rate Γ = n/πN F , the dimensionless scalar u 0 = πN F v 0 , and the exchange u S = πN F v S parts of the impurity potential. The two additional parameters α and β are needed to describe the spin-polarized case. Coupling via tunneling of itinerant electrons on and off the impurity site is given by α, where the sign of α discriminates between (anti-)ferromagnetic exchange coupling α < 0(> 0), see Ref. [29]. The parameter β ∼ 1 is a dimensionless fitting parameter, related to the geometrical structure factor of the actual impurity distribution in space. For the numerical results presented below we assume that β = 1 and |α| = 0.1. Dependence of the system characteristics on the scalar part of the impurity potential, u 0 , is weak. In Ref. [31] it was demonstrated that for an isotropic order parameter (as we have here) the scalar part only enters the theory through the position of the YSR bound state. Introducing an effective exchange scattering amplitude, {u 0 , u S } → u eff S , this can be completely accounted for. Therefore, we take u 0 = 0 in all our results.

B. Electronic transport
Consider a junction between a superconductor (S) and a normal metal (N), see Fig. 1. The superconductor is situated at z < 0 and the normal metal at z > 0. Assuming a point contact between the two (approximately) transversely invariant N and S regions, we reduce the problem to variations in only one spatial dimension, the longitudinal z-direction.  I. All possible scattering amplitudes at an NSjunction, written for excitations originating in N and S. We define,

Incident from N:
Incident from S:

Interface scattering matrix
Now we will briefly describe the theoretical model of the NS interface. Let us imagine that some of the magnetic impurities, residing in the superconductor, are pinned to the NS surface. In this case tunneling through the interface would become, in general, spin-dependent 32 . This can be simulated using the spin-active interface model [20][21][22] , with a normal-state electron scattering matrix (evaluated at the Fermi energy) of the form where The scattering matrix for holes is related to the electron one through S h =S † e , with the "tilde"-operation defined in Eq. (5). Scattering probabilities D σ and R σ (σ =↑, ↓) satisfy the usual conservation law, D σ + R σ = 1. In this model, besides unequal spin-resolved transmission probabilities, quasiparticles can acquire a spin-dependent phase shift Θ ↑,↓ . The latter property enters via the socalled spin-mixing angle Θ = Θ ↑ − Θ ↓ .
In order to completely determine our model we have to make assumptions about the dependence of tunneling probabilities on the quasiparticle momentum direction p F . We utilize two models, either an angle independent transmission function or an angle dependence derived from a δ-function interface potential 33 Here, θ is the incidence angle, which is the angle between a quasiparticle's momentum and the normal to the NS S N surface, and D 0 is the transmission probability at normal incidence.
The normal state scattering matrix completely determines transport properties of the NS interface in the superconducting state, if we use the quasiclassical boundary conditions 21,22,27,28 . They relate the quasiclassical Green's functions on the incoming quasiparticle trajectories to the outgoing ones. We do not write them here for brevity, but rather suggest the interested reader to look into the original references.

Elementary scattering processes
Transport across the NS junction can be described in terms of a few elementary processes taking place at the interface. Each elementary process is described by the corresponding scattering amplitude. We summarize all possible amplitudes in Table I, and note that they are 2 × 2 matrices in spin space. The amplitudes have a clear physical meaning. For example, r αβ (t αβ ) is the probability amplitude of a β excitation incident from N to be reflected (transmitted) as an α excitation. Here, α and β can be either e or h, referring to electron-like and hole-like quasiparticles, respectively. Another way to understand these amplitudes is by considering the diagram depicted in Fig. 2. Each amplitude corresponds to an infinite series of Feynman paths a quasiparticle can take in order to get from the initial incident trajectory to the final outgoing one, with possibly undergoing a particlehole conversion (Andreev reflection). Similarly to the advanced and retarded propagators we had above, we can introduce advanced scattering amplitudes, related to the retarded ones via where Hermitian conjugation operates only in spin space. The amplitudes in Table I obey a number of relations, and, in particular, they satisfy the following relation 34 , which is a manifestation of current conservation across the interface. Here we have defined the scattering probabilities, which are related to the corresponding amplitudes as On the lhs of Eq. (22), the first term describes normal reflection of an incident (from N) electron-like quasiparticle, while the second one refers to reflection with a e → h branch conversion. The third and fourth terms are the corresponding transmission processes, which have additional prefactors though. The latter can be understood heuristically as the probabilities of staying an electronlike, (1 − |γ R σ | 2 ), or a hole-like, (1 − |γ R σ | 2 ), quasiparticle in S after being transmitted across the interface, without eventually getting branch-converted. All these terms can be easily identified with those obtained by Blonder, Tinkham and Klapwijk 33 using an alternative wavefunction matching approach.
It is instructive to look at the energy dependence of the four scattering probabilities discussed above. In Fig. 3 we plot them for spin-up quasiparticles in the case of ferromagnetically aligned impurity spins and various transparencies of the NS interface, which in this case is not spin-active. Corresponding plots for spin-down quasiparticles are obtained by mirroring each plot in Fig. 3 with respect to ε = 0, and are therefore not shown here. If impurity spins are oriented randomly, the extra sub-gap structure, related to the band of YSR states, would be present symmetrically at both positive and negative energies. For a completely transparent interface (D = 1), see Fig. 3(a), at sub-gap energies the only allowed process is Andreev reflection, except for energies corresponding to the YSR band. In the latter case, there is also a small fraction of direct single-particle tunneling, however Andreev reflection dominates. For energies larger than the superconducting gap, the single-particle processes become dominant very quickly, as the energy is increased. When the interface transparency decreases, the two other processes come into play, namely normal reflection and transmission with a branch conversion (e → h or h → e). They both require non-zero normal-state reflection, R > 0, at the interface, see Table I and Fig. 2. All probabilities, except for normal reflection R ee,↑ , decrease when D decreases, but with a different rate. Indeed, by looking at the definition of scattering amplitudes in Table I, one can see that Andreev reflection probability decreases faster than the others, R he,↑ ∝ D 2 . It means that in the tunneling limit, D 1, the dominant transfer process is single-particle tunneling, see Fig. 3(d).

Charge and spin currents
Let us now discuss the technical details of calculating spin and charge currents in our setup. The general expression for the electric current (injected in the z-direction) reads where v F z = v F cos θ is the z-component of Fermi velocity (incidence angle θ is the polar angle of a coordinate system with the z-axis normal to the interface), e is the electron charge, and A c is the contact area. Here the Keldysh component of the Green's function, g K (ε, p F ), is computed at the interface, z = 0. Trace is taken over both Nambu and spin spaces. As discussed above, in our problem we can introduce spin-resolved quantities, which allow us to define both charge and spin currents in a usual way, For the case of randomly oriented impurity spins, if the interface scattering is spin-independent (Θ = 0 and D ↑ = D ↓ ), we have I ↑ = I ↓ , and consequently I s = 0. If we assume the normal side of the interface to be disorder-free, all incoming coherence functions from N vanish (because there is no order parameter in bulk N). Then we can write down the incoming Keldysh Green's function computed at the interface in N, z = 0 + (see Fig. 2), aŝ while the outgoing one has the form Here, x N andx N are the distribution functions of the incoming electron-like and hole-like quasiparticles, while X N andX N are their outgoing counterparts. The latter can be written in terms of the former as 27 where x S andx S are the distribution functions for quasiparticles incident from S. We assume that the incoming distribution functions take their bulk values, so that where V is the bias, k B is the Boltzmann constant, and the "tilded" counterparts are found via Eq. (5). Plugging equations (26)-(28) into Eq. (24) we obtain where we have defined The form of spin-resolved currents might look confusing at first glance, seemingly mixing the spin channels. However, one has to remember that working in a 4×4 Nambuspin space introduces some redundancy in the formalism by dealing with both particles and holes of two spin flavors. A hole quasiparticle carries positive charge and propagates in the opposite direction to an electron quasiparticle. Therefore, one can intuitively understand the hole-related part of the spin-resolved current in Eq. (31). Another way to look at Eqs. (30)-(31) is to get rid of the hole-related terms by working in the excitation picture. In order to do it, one has to perform a transformation ε → −ε for "tilded" terms in Eq. (31), in which case they simply double the particle terms. Let us demonstrate how it works in a simple case of a s-wave spin-singlet superconductor placed in a Zeeman exchange field H. In this case, the density of quasiparticle states in the bulk has the form, where µ B is the Bohr magneton and g ≈ 2 is the g-factor.
Then, if we assume that D 1, corresponding to the tunneling limit, as studied by Merservey and Tedrow 35,36 , we can write down, for example, j ↑ to linear order in D as follows, where f F (ε) = [1 + exp (ε/k B T )] −1 is the Fermi distribution function. The second term on the rhs of Eq. (33) corresponds to the hole ("tilded") terms in Eq. (31). If we transform ε → −ε in this term, and use the fact that N ↓ (−ε) = N ↑ ( ) and f F (−ε) = 1 − f F (ε), we simply get the first term on the rhs of Eq. (33). This simple example demonstrates that the concept of a hole is convenient for doing calculations, but it does not alter the usual logic of charge and spin currents known for normal (non-superconducting) systems.
Finally, in order to quantify the degree of spin polarization of the electric current, we define the following quantity, where G c(s) = dI c(s) /dV is the differential charge (spin) conductance. When P = 1 (P = −1) the current is carried only by spin-up (spin-down) quasiparticles.

Current noise and differential Fano factor
In this section we briefly describe how to calculate the current noise and define the differential Fano factor. The noise is expressed via a current-current correlation function, and our derivation closely follows Ref. [34]. The final expression consists of two terms: one coming from products of Keldysh Green's functions, and another one originating from products of retarded-advanced Green's functions (the cross-terms vanish). It can be written as where trace is taken over spin space. Expression for S K and S R−A can be found in Appendix A. When we know how to compute both the electric current and noise, we can define the differential Fano factor, We note that F can be measured directly, see for example Ref. [37], or obtained from a S(V ) measurement.

III. RESULTS
In this section we present the results of our numerical calculations for the three different cases mentioned above. We start by discussing transport across an NS junction in the tunneling regime. Next, we consider how transport characteristics of the junction evolve as transparency is increased. Finally, allowing the NS interface to be spinactive, we investigate the role of inverse proximity effect on transport. The temperature is T = 0.01Tc0, where Tc0 is the clean-limit critical temperature of the superconductor (at Γ = 0).

A. Tunneling regime
In the tunneling regime, D 1, currents across the NS interface due to the applied bias are small. This allows us to neglect changes in the superconducting order parameter and consider it spatially constant. Then, the incoming coherence functions (γ X ,γ X , X = R, A) are given by their bulk values, and we can easily compute transport characteristics of the system, without a need to resort to full self-consistent calculations of spatially varying self-energies. Note that the bulk self-energies are still computed self-consistently as in Ref. 29.

Conductance
We begin our discussion by considering differential conductance for the case of randomly oriented impurity mag-FIG. 5. Charge (a) and spin (b) differential conductance as a function of bias. Panel (c) represents their ratio P [see Eq. (34)], providing information on the spin-polarization of current. Impurity spins are assumed ferromagnetically aligned. Black full lines correspond to α > 0 and red dashed ones to α < 0. The system parameters are uS = 5 and Γ/2πkBTc0 = 0.005. The interface parameters and temperature are the same as in Fig. 4. netic moments. Figure 4(a) shows how the tunneling conductance is affected by the increase of impurity potential strength, u S , while Fig. 4(b) demonstrates its evolution with impurity density, Γ. The potential amplitude sets the position of YSR bands inside the gap, while the impurity density sets their width. It is well-known that the tunneling conductance is intimately related to the local density of states in the system, which allows for the YSR band spectroscopy 17,38,39 , see Ref. [29]. Increasing the density of impurities, brings more YSR states below the gap, which eventually cover the whole sub-gap region. This demonstrates the pair-breaking effect of magnetic impurities and the onset of so-called gapless superconductivity, as was shown by Abrikosov and Gor'kov 1 in the Born limit.
Let us consider now the case of ferromagnetically ordered magnetic impurities. Then, the YSR bands become spin-polarized, and the basic response to varying impurity potential strength or density is the same as discussed above. There is an extra ingredient though, which is the effective Zeeman shift of the spin-resolved differential conductances, induced by the collective magnetic field of the impurities, see Eq. (17) and Ref. [29]. We focus instead on the fact that one can observe spin currents in this case. In Figs. 5(a),(b) we show charge and spin differential conductances as a function of bias, respectively. In order to quantify the spin-polarization of current, we combine these two quantities by plotting their ratio P instead, see Eq. (34) and Fig. 5(c). One can observe that, for a given choice of system parameters, the current is nearly completely carried by single-spin quasiparticles (P ∼ 90%) for the bias window probing the YSR band. Polarization of the YSR band increases upon decreasing transparency (P > 99% for D 10 −3 ). Another important feature is that the relative shift of spin-resolved conductances, induced by the collective magnetic field of the impurities, enables a very high degree of current spin- polarization for the bias window close to the Zeeman-split gap edges. In particular, for the case of ferromagnetic exchange between the impurity spins and the itinerant electrons (α < 0), there is a possibility to choose the electric current spin-polarization by simply tuning the bias around eV /∆ 0 (Γ = 0) 1, see red dashed line in Fig. 5(c). This feature makes such systems potentially suitable for on-demand production of quasiparticles with specific spin projection.

Differential Fano factor
So far, we have discussed only the spin polarization of electric current. In the tunneling regime, one can get an insight into the nature of elementary charge carriers and their statistics by looking at current fluctuations 19 . Namely, let us consider the differential Fano factor, as a measure of the carrier effective charge (in units of e). In the normal (non-superconducting) state we have F = 1, indicating that the electric current is transfered by quasiparticles with the effective charge equal to e, see Ref. [19]. In superconductors, besides the single-particle tunneling, we also have Andreev reflection processes 40 , which imply a transfer of charge equal 2e. So, the value of F helps to decipher the relative role of single-particle and Andreev refection processes in the tunneling current.
In Fig. 6 we plot the differential Fano factor for our setup. We observe that for all voltages above the gap F = 1, indicating the dominant role of single-particle tunneling. At voltages below the gap we have F = 2 for all energies except for those corresponding to the YSR impurity band, where we recover F ≈ 1 again. This demonstrates, as expected, that Andreev reflection is the dominant mechanism of sub-gap electric transport (Cooper pair tunneling), if there are no single-particle states in this bias window. However, a sub-gap metallic impurity band (YSR band in our case), if present, predominantly supports single-particle tunneling.

B. Metallic contact: high transparency
In this section we investigate what happens to transport characteristics of the NS junction if we go beyond the tunneling limit. It is important to remind that we in this section assume a point contact between the superconductor and the normal-metal probe. It means that the contact area is much smaller than the superconducting coherence length, A c ξ 2 0 . This circumstance allows us to assume the order parameter to be approximately spatially independent 41,42 .

Conductance and differential noise
If we look at the (charge) conductance and differential noise, see Fig. 7, we observe that there is no big difference between the cases of randomly oriented and ferromagnetically aligned impurity spins. The biggest noticeable difference is the Zeeman splitting in the latter case. For a completely transparent interface, D = 1, the sub-gap differential conductance is equal to twice the normal-state value, except for the bias window which covers the YSR impurity bands, see Figs. 3(a)-(b). In the latter case, the probability of Andreev reflection slightly reduces, but it still remains the dominant mechanism of sub-gap transport, compared to single-particle tunneling. Decreasing the interface transparency, one observes a decrease of the sub-gap conductance, eventually recovering the tunneling regime discussed in the previous section. However, if we allow the transmission coefficient across the junction to be spin-dependent (spin-filtering effect), D ↑ = D ↓ , the conductance spectra look different, see Fig. 7(c). The change is caused by the fact that Andreev reflection in a spin-singlet superconductor requires quasiparticles of both spin flavors to have non-zero tunneling probability. In the extreme case, when one of the probablities vanishes, this process is forbidden.
Let us now discuss the current noise, see Figs. 7(d)-(f). There are several sources of noise in a NS junction. Apart from the usual thermal Nyquist-Johnson noise (can be ignored at low temperatures), there is the shot noise, caused by fractional probabilities of single-particle tunneling and two-particle Andreev reflection. The latter feature makes the noise reach its maximal value at the interface transparency D max 0.75 (D max 0.25 above the gap), different from the normal-state value D max,N = 0.5 19 , see Figs. 7(d)-(e). As we tune the spinresolved transmission coefficients, weakening of Andreev reflection makes the differential noise acquire its maximum at transparencies approaching the normal-state value, see Fig. 7(f).

C. Inverse proximity effect
In the two previous sections we ignored the inverse proximity effect, i.e. a reduction of the superconducting order parameter in the vicinity of the NS interface. In this section we discuss the impact of this effect on transport characteristics of the junction. In contrast to the previous sections, here we also consider an interplay between spin-activity of the interface, see Eqs. (18)- (20), and YSR impurity bands. Spin-active interfaces are known to host surface Andreev bound states (ABS) if Θ = 0 21,22,43 . These states appear below the gap at energies ε ABS ↑,↓ ≈ ±∆ cos(Θ/2), where upper (lower) sign corresponds to spin-up (spin-down) quasiparticles.
In Fig. 8(a) we plot the spatial profile of the order parameter for different values of the interface transparency. As expected, the order parameter reduction is higher for larger transparencies. If, on the other hand, the interface is completely insulating but Θ = 0, one can observe the order parameter weakening due to formation of the ABS, see Fig. 8(b).
Let us now come back to the case of an NS junction with magnetic impurities and illustrate the interplay of inverse proximity effect and the YSR impurity bands. In  Fig. 9 we plot the local density of states in the superconductor as a function of energy and distance from the interface, see also Fig. 2. As can be seen from Fig. 9(a), when Θ = 0 there are no ABS at the NS surface and the YSR bands are unaffected by the inverse proximity effect. On the other hand, when Θ = 0 the interfaceinduced ABS tend to repel and broaden (smear out) the YSR impurity bands. Indeed, in Fig. 9(b) one can see that the ABS appears close to the gap edge and it repels the YSR bands away (towards negative energies) by smearing them out at the same time. The local density of states approaches its bulk form as we move away from the interface. Finally, when the ABS appears in between of the two YSR bands, the latter get repelled in opposite directions, see Fig. 9(c).
So far we have discussed the impact of ABS on the YSR impurity bands. However, the shape of ABS gets modified as well by the presence of both impurities and non-zero interface transparency. The broadening of lowenergy ABS due to impurities is known to range from ∝ √ ∆Γ in the Born limit, to ∝ √ ∆Γe −Γ/∆0 in the unitary limit 21,44 . Finite interface transparency also contributes to the ABS broadening as ∝ D∆ 22 .
We have to note that the results plotted in Fig. 9 were obtained for spin-up quasiparticles, assuming that the magnetic impurities have randomly oriented spins. The corresponding plots for spin-down case look exactly the same, but mirrored with respect to ε = 0. For the case of spin-polarized impurities no new features appear. The YSR bands get spin-polarized and shifted by the collective Zeeman field of the impurities.

Transport
Let us now consider how the interplay between the YSR impurity bands and ABS manifests itself in electric transport. In order to demonstrate it, we consider two regimes: (1) when broadening of the ABS is governed by magnetic impurities, and (2) when it is dominated by the interface transparency. For simplicity we assume that impurities in the bulk of the superconductor have randomly oriented magnetic moments. In case (1), when the ABS width is controlled by magnetic impurities, we can still observe both the YSR impurity bands and the ABS, see Fig. 10(a). At the same time, one has to remember that the ABS are spin-polarized and, as was discussed in the previous section, they repel the YSR bands for two spin-channels in the opposite direction, see Fig. 9(b). It is remarkable that in this case, even though there are no spin currents possible in the bulk (impurity spins are oriented randomly), close to the NS surface one can observe a non-zero spin conductance, see Fig. 10(b). Moreover, as can be seen from Fig. 10(e), the sub-gap spin currents are highly polarized, with P 100% when D 1. Due to low transparency of the interface, sub-gap currents are mostly carried by single-particle excitations via the ABS and YSR bands (and Cooper pairs in between them), see solid line in Fig. 10(f), and possess negligible noise, see Fig. 10(c).
For case (2), when broadening of the ABS is governed by the interface transparency, tails of the ABS completely mask the YSR impurity bands, see Fig. 10(d), but the sub-gap structure can still be seen in the spin conductance, see Fig. 10(b). Increased transparency favors Andreev reflection and drastically changes the statistics of sub-gap current carriers in the system, see Fig. 10(f). Indeed, above the gap we still observe F ≈ 1 (except for the BCS coherence peak at the gap edge), characteristic of single-particle excitations, but the sub-gap transport is governed by two-particle (Andreev) processes, in contrast to the tunneling case considered above, and F ≈ 2. At voltages probing the ABS, the differential noise is much reduced compared to the charge conductance because the ABS are resonances. On resonance, letting Γ → 0, fluc-tuations vanish 34 and F → 0, which is a fingerprint of resonant Andreev reflection. The enhanced role of twoparticle Andreev processes substantially reduces the spinpolarization of transferred current, see Fig. 10(e).
Finally, we point out that the non-zero spin conductance at the interface leads to spin imbalance, an unequal population of quasiparticle branches with opposite spin projections. For randomly oriented impurity spins, spin imbalance at subgap voltages induced by spin-polarized ABS was studied by two of us in a recent publication 45 .

IV. DISCUSSION AND CONCLUSIONS
Before summarizing the main findings, let us briefly comment on the applicability of our model. In all the calculations, we have assumed that the YSR states of neighboring impurities have enough wavefunction overlap to form extended metallic impurity bands. The necessary condition for this to happen is the Mott criterion 46,47 n 1/3 min ξ 0 = 0.2, which estimates the minimal impurity density necessary for the delocalization transition. In terms of the parameters of our model we obtain Γ min /2πk B T c0 = 0.5(k B T c /E F ) 2 T c /T c0 (T c0 is the bulk critical temperature of the superconductor in absence of impurities), meaning that this condition is satisfied for all the values of Γ used in our calculations since k B T c E F . In conclusion, we have studied charge and spin transport in NS junctions with a finite density of magnetic impurities. The latter were described within the noncrossing t-matrix approach. Considering the two extreme cases -completely unpolarized and polarized im-purities -we have investigated both electric current and noise across the NS surface. The results of our calculations indicate that adding magnetic impurities to conventional s-wave spin-singlet superconductors can substantially extend functionalities of superconducting hybrid devices. We find that in the case when magnetic impurities are ferromagnetically ordered, one can achieve spin-polarizations of the tunneling currents reaching P 100%. Moreover, for a suitable choice of system parameters, the sign of spin-polarization can be chosen by simply tuning the applied bias. We also demonstrate that even when magnetic impurities are completely unpolarized, one can still inject almost entirely spin-polarized currents across the NS junction. In order to achieve that, we propose to engineer spin-active interfaces between the superconductor and the normal-metal probe. The latter is not just a theoretical model, but was successfully realized in practice by several experimental groups 43,48 . All these features make impurity engineering in superconductors a promising route towards hybrid superconducting spintronic applications. Finally, by analyzing the noise properties of the tunneling currents, we were able to decipher the relative role of single-particle excitations and Cooper pairs, which can be tuned by changing the NS interface transparency. In the tunneling limit, the currents are predominantly carried by single-particle excitations, while Cooper pairs dominate electric transport at high tranparencies.
where {a, b} = ab + ba is a regular anti-commutator. On the other hand, the Keldysh component is given by S K = s 1 + s 2 + s 3 + s 4 + s 5 + s 6 +s 1 +s 2 +s 3 +s 4 .
(A2) The terms constituting S K above can be written as s 1 = 1 + r R he , r A he − r R ee , r A ee − r R ee r A he , r R he r A ee + r R he r A he r R he r A he + r R ee r A ee r R ee r A ee x 2 N , (A3) Note that the "tilded" terms are obtained by simply using Eq. (5). Finally, these formulas reduce to the ones obtained in Ref. [34], if there is no spin dependence in the problem.