{'fraction_non_alphanumeric': 0.038761851645287226, 'fraction_numerical': 0.011393514460999123, 'mean_word_length': 4.5846496106785315, 'pattern_counts': {'":': 0, '<': 0, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Generalized boundary conditions for the circuit theory of mesoscopic transport

The circuit theory of mesoscopic transport provides a unified framework to describe spin-dependent or superconductivity-related phenomena. We extend this theory to hybrid systems of normal metals, ferromagnets and superconductors. Our main result is an expression for the current through an arbitrary contact between two general isotropic"nodes", which is suitable to describe the presence of superconducting and ferromagnetic elements in the system, as well as magnetically active interfaces/contacts. In certain cases (weak ferromagnet and magnetic tunnel junction) we derive transparent and simple results for the matrix current.


I. INTRODUCTION
Spin-transport in hybrid ferromagnet (F)-normal metal (N) systems has been object of extensive investigation since the discovery of the giant magnetoresistance (GMR) effect. 1 Magneto-electronic multiterminal systems lead to novel applications, e. g. magneto recording heads or magnetic-field based sensor devices. Future prospectives of non-volatile electronics motivate also many fundamental and applied research. Transistorlike effects were found in a ferromagnet-normal metal three-terminal device, that depend on the relative orientation of the magnetization of the ferromagnets. 2,3 The dependence of transport properties with the relative angle between the magnetization directions of the ferromagnets, was addressed experimentally 4 as well as theoretically 5 in the past. These days non-collinear spin transport attracts an increased attention due to the recent interest on the spin-current induced magnetization torques. [6][7][8] A ferromagnetic single-electron transistor in a three terminal configuration has been realized and studied theoretically. 9,10 If a normal metal (N) is attached to a superconductor (S), quasiparticles of different spins are coupled via Andreev reflection on the normal side of the NS interface. 11 A strongly modified density of states (DOS) in the normal metal caused by induced superconducting correlations was found. 12 This is so-called superconducting proximity effect. In contrast with normal metals, in a ferromagnet (F) the presence of a strong exchange field leads to big differences between the two spin bands. The question of the coexistence of ferromagnetism and superconductivity has been extensively investigated in the last decades. The effect of spin splitting on the superconducting proximity effect was already investigated long time ago 13 . New experimental developments on proximity effect in ballistic ferromagnetic layers have been recently reported 14 and theoretically confirmed. 15 Results obtained in ferromagnet-superconductor nanocontacts have been explained in terms of bias dependent transparency of the FS interface. 16,17 Diffusive heterostructures of ferromagnets and superconductors showed unexpected large values of the conductance of the ferromagnetic part. [18][19][20][21] Strong mutual influence between the superconductor and the ferromagnet and long range proximity effects have been proposed to explain these results. 22,23 Effects related to the interplay between spin accumulation and Andreev reflection has been also investigated. 24 On the other hand, the prediction of an exotic superconducting state formed in a superconductor by the presence of an exchange field h, was independently reported by Larkin-Ovchinnikov and Fulde-Ferrel, some years ago. 25 Experimental confirmation of these effect in bulk superconductors is still needed. Many investigations have focused on the study of thermodynamic properties of FS multilayers. [26][27][28][29] Non-equilibrium Keldysh Green's functions in the quasiclassical approximation, have been extensively used in the past to describe non-equilibrium superconductivity. 30,31 This quasiclassical theory of superconductivity is based on semiclassical transport equations for quasiparticles. Generally to solve these transport equations is technically difficult, however the final results are relative simple and clear. The so-called "circuit theory of Andreev reflection" 32 , was conceived as a generalization of the Kirchhoff's theory of electronic circuits, to simplify these equations into a handful of accessible rules. The circuit theory of mesoscopic transport was recently extended to describe transport in noncollinear magnetic structures 33 . Interesting phenomena like spin precession effects on the induced spin accumulation have been found 34 . An important concept in the theory of non-collinear spin transport is the so-called mixing conductance G ↑↓33 which is closely related to the spin-current induced magnetization torques 35 and the Gilbert damping in thin ferromagnetic films. 36 Moreover a three terminal spin-transistor device has been proposed in the framework of the circuit theory. 33,35 The main advantage of the circuit theory description is that it provides a simple approach based on spin-charge current conservation to calculate the transport properties of (multi-terminal) mesoscopic hybrid systems. This is achieved by mapping the concrete geometry onto a topologically equivalent circuit, represented by finite el-ements. We note that this very same description allows to calculate a variety of transport properties, such as current statistics 37,38 , weak localization corrections 37 or transmission eigenvalues 39 . Consequently, it is worthwhile to extend this general framework to the all possible combinations of heterostructures.
So far, the developed circuit theory is suitable to describe electron and spin transport in multiterminal hybrid ferromagnet-normal metal FN or superconductornormal metal SN systems. Obviously, an extension of the circuit theory to hybrid systems combining ferromagnets, normal metals and superconductors is necessary. This is done in the present paper. We derive a general expression for an arbitrary contact, which, however, turns out to be a little bit unhandy. To obtain manageable expressions we present also approximate results for two special cases. Below we list all our results: • The general matrix current Eq. (14) through an arbitrary spin-dependent connector. It requires the knowledge of the full scattering matrix (or transmission matrix) as consequence of the nonseparable Spin-and Nambu structures. This inhibits the transformation into the normal eigenmodes of the scattering problem. Eq. (14) is therefore mostly of numerical interest.
• The matrix current Eq.(19) for a weakly spindependent contact. Here an expansion in terms of normal eigenmodes is possible. Eq. (19) is a spindependent correction to the matrix current from Ref. ( 32).
• If the spin-dependent contact is a tunnel barrier, the tunneling matrix current Eq. (21a) takes a particular simple and transparent expression. The properties of the contact can be expressed in terms of the spin conductances G ↑(↓) and the (complex) mixing conductance G ↑↓33 .
The paper is organized as follows. In section II we illustrate some basic aspects of the circuit theory. In Section III we present the microscopic description of a contact region or connector in the circuit theory. In section IV we calculate the matrix current through a general connector between two metallic regions (nodes) of the circuit. The nodes can be of N-, F-or S-type and the contact is assumed to have a arbitrary magnetic structure (e. g. magnetic tunnels junctions, magnetic interfaces). This expression constitutes the generalized matrix current for the circuit theory. In section V we make use of a perturbation expansion in the spin structure to obtain simplified expressions for two cases. Details of the pertubation expansion are presented in the Appendix. In Section VI we present our conclusions.

II. CIRCUIT THEORY
In the circuit theory the system is split up into reservoirs (voltage sources), connectors (contacts,interfaces) and nodes (low resistance islands/wires) in analogy to classical electric circuits. Both reservoirs and nodes are characterized by 16N ch × 16N ch Green's functionsǦ, which are matrices in Keldysh⊗Nambu⊗Spin⊗Channels space, where N ch are the number of propagating modes. These Green's functions play the role of generalized potentials of the circuit theory. The Green's functions in the reservoirs and nodes are assumed to be isotropic in momentum space. This requires that sufficient elastic scattering is present both in reservoirs and nodes, due to the presence of random scatterers and irregularities in the shape. This justifies the use of the diffusion approximation to describe transport. This assumption is reasonable since hybrid (multi-terminal) devices are quite dirty systems. In general for the stationary case,Ǧ depends on space coordinates and energy where [.., ..] and {.., ..} denotes commutator and anticommutator respectively. Semiclassical and diffusive approximations allow to obtain Green's function which depends only in one spatial coordinateǦ( r, ε). 40 On the nodes the Green's functions are also assumed to be spatially homogeneous, depending only on energyǦ(ε). This requires that the resistance of the node is much smaller than the contacts resistances connecting different nodes, which implies also that the current through the device is controlled by the contacts resistances. Regions with spatially dependent Green's functions (e.g. diffusive wires) are modelled by an appropriate discretization. For example, a quasi one-dimensional diffusive wire can be represented by a series of tunnel junctions and nodes. Internal dynamics along the wire (finite energy transport, spin-flip, etc.) is included in this description as a leakage current from the node. 32 In analogy to Ohm's law in classical electric circuits (I = V /R), in the present circuit theory it is essential to obtain the "spin-charge" matrix current that flows between two nodes (or between a reservoir and a node) through a contact/connector. This matrix current depends on the properties of the connector (analog to the resistance R) and on the Green's functions at both side of the connector (analog to the voltage drop through the connector V ). In general the matrix currentǏ(z, ε) is defined in Keldysh⊗Nambu⊗Spin⊗Channels space aš where r ≡ ( ρ, z), z being along the transport direction and ρ being perpendicular to the transport direction. The electric current I e is defined in terms of the matrix currentǏ(z, ε) as whereˆ σ,τ are Pauli matrices in spin and Nambu space. G( r, r ′ ; ε) can be expanded in transverse modes in the following way 41 Here n (m) label the propagating modes, σ, σ ′ = ±1 are the direction of propagation, s, s′ ≡ {↑, ↓} are spin indices, k s n is the longitudinal momentum and χ s n (ρ) is the transverse wave function. By using this representation, the current can be written likě Here υ n(m) /m is the velocity in mode n(m) with spin s(s ′ ). The transverse wave functions χ s n (ρ, z) are eigenfunctions of the Spin operator S =hσ z /2 and are normalized in a way that the carry unity flux current. In this case the current reduces tǒ Note that the currentǏ s,s (z, ε) in Eq. (5) is a matrix diagonal in spin space. In the case of a ferromagnetic material Eq. (5) is valid if the magnetization of the ferromagnetic material is parallel to the spin quantization axis. In the case of non-collinear transport where there are two different magnetizations defined in the system M 1 and M 2 , Eq. (5) has to be properly transformed into the basis of the spin quantization axiš U being the spin rotation matrix that transforms M 1 (2) into the spin quantization axis. Note that in this case the transformed matrixǏ s,s ′ can have general spin structure.

III. ARBITRARY CONNECTOR
The contacts or connectors between the reservoirs and nodes are described in terms of the scattering formalism by a transfer matrixM . The goal is to express the matrix current given by Eq.(4) in terms of isotropic quasiclassical Green's functionsǦ 1(2) at both sides of the contact and transmission/reflection coefficients that characterize the scattering in the contact region.M is in general a 16N ch × 16N ch matrix in Keldysh⊗Nambu⊗Spin⊗Channels space. Particularlȳ M is proportional to the unit matrix in Keldysh space and diagonal in Nambu space. This is denoted by (¯).
An important assumption of this theory is the isotropization assumption. The ballistic Green's functiong defined at both sides of the contact region becomes isotropic in momentum space, when departing from the contact region. Such isotropization happens in a region of the order of the elastic mean free path l mfp but much smaller than the spin diffusion length l sf = √ D τ sf and the coherence length of a superconductor ξ ∆ = D/∆. In the isotropization zone the dominant contribution to the self-energy is the elastic scattering, which implies sufficient disorder (or chaotic scattering) in this region. The self-energy is thenΣ being the isotropic quasiclassical Green's function for the left (1) and for the right (2) side of the contact region, which is proportional to the unit matrix in Channels space and τ imp is the impurity scattering time. In order to assure that theǦ s, s ′ nσ,mσ ′ (z, z ′ ) does not diverge at z(z ′ ) → 0, we have to impose the following conditions 32 Σ z =σ δ σσ ′ being the z-Pauli matrix in the direction of propagation "sub-space" {σσ ′ } of the Channels space. An important consequence of this approach is that after the isotropization zone, the ballistic Green's functioň g s, s ′ nσ,mσ ′ (z, z) equals the isotropic quasiclassical Green's functionǦ 1 (2) .

IV. GENERALIZED MATRIX CURRENT
In previous work, 32M andǦ 1(2) commute because no spin structure was considered. Now due to their general spin structure,M andǦ do not commute. We multiply Eq. (8) and Eq. (10) byM from the left and byM † from the right. Adding both resulting equations, using Eq.(7) and using the normalization conditionǦ 2 =1, 40 we get the following expression forg 1 Note that in Eq.(12) all the structure in channels is contained inM . From Eq.(5), the matrix currentǏ is be expressed in terms ofg 1(2) as 32 Note that the Green's functionǦ s, s ′ nσ,nσ ′ is assumed to be spatially homogeneous, depending only on energyǦ(ε). In this case that current does also not depend on position. By using the cyclic property of the trace, we find finally for the matrix currentǏ(ε) Eq. (14) is the most general expression for the currentǏ in terms of isotropic quasiclassical Green's functionsǦ 1 (2) at both sides of the contact and transmission/reflection coefficients of the contact region. Once such expression of I(ε) is obtained, we can apply the generalized Kirchhoff's rules, imposing that the sum of all matrix currents into a node is zero. This completely determines all properties of our circuit. Eq.(14) therefore completes our task to find the generalized boundary condition for the circuit theory. However, in this form a concrete implementation requires the knowledge of the full transfer matrix (or equivalently of the scattering matrix). Usually this information is not available for realistic interfaces and one tries to reduce Eq. (14) to simple expressions by some reasonable assumptions. In the next section we will do this for two special cases. Note, that for a spin-independent interface, Eq. (14) can be expressed by the transmission eigenvalues only, which is a formidable simplification. This transformation is not possible anymore for the spin-dependent contact.

V. TWO SPECIAL CASES
We want to obtain more transparent and clear analytical expressions of Eq. (14). The price to pay for that is loss of generality, since we have to make certain assumptions about the contact. The main difficulty lies in the inversion of the matrix1 +Ǧ 1M †Ǧ 2M in Channel-Spin space. Let us assume that the transfer matrixM can be split in the following form whereM 0 is a transfer matrix with structure in channel space only and proportional to the unit matrix in spin space, while δM ≡M 0 δX includes non-trivial structure in spin space. Note that the matricesM 0 ,Ǧ 1(2) commute with each other, whereas in general δX does not commute withM 0 andǦ 1 (2) . Assuming that δX ≪ 1, we can perform a perturbation expansion of 1 +Ǧ 1M †Ǧ 2M −1 in the parameter δX (see Appendix). The matrixM ≡ M s;s ′ nσ,mσ ′ can now be diagonalized in the basis of eigenmodes N (N ) : M s;s ′ nσ,mσ ′ → M s;s ′ N σ,N σ ′ . To 0th orderM ≡M 0 commutes withǦ 1 (2) . In this case Eq. (14) reduces tǒ The hermitian conjugate matrixQ 0 (Q † 0 ≡Q 0 ), reads in Channel space 42Q being A real and B complex N ch × N ch matrices.
The eigenvalues ofQ 0 , appear in inverse pairs q N , q −1 N , and are related with the transmission coefficients T N in the following way 42 By performing the trace over directions of the mode indices σ(σ ′ ), the expression for the 0th order current reduces tǒ Eq. (18)  Now we concentrate in the first order termǏ (1) (ε), given by Eq.(A4c) of the Appendix, δX ≡ δX A being anti-symmetric with respect to time-reversal transformation. In particular δX A is anti-symmetric with respect to transformation over spin space and symmetric with respect to transformation over directional space. In this case δX A describes the case of a weak ferromagnetic contact δX A ∼ Mˆ στ 3 . The unity vector M is in the direction of the magnetization, andˆ σ,τ are Pauli matrices in spin and Nambu space, respectively. On the other hand, the δX S may describe spin-flip processes due to spin-orbit interaction at the contact. At first order in δX the contribution given by δX S vanishes. In general, to threat spin-flip at the contact, we need to go to higher orders in δX δX 2 , δX 3 , .. . From Eq.(A30), Eq.(A31) and Eq.(A32) (see Appendix),Ǐ 1 can be written asǏ (1) Eq. (19) is the spin-dependent correction to the matrix current given in Eq. (18). This result constitutes an important step in the applicability of the circuit theory for F|N|S systems, because it provides of a simple prescription to describe magnetically active interfaces/contacts.

B. CASE II: TUNNELING BARRIERS
For the case when the contact are tunneling barriers (T N ≪ 1), is possible to neglect the term T N ( Ǧ 1 ,Ǧ 2 − 2) in the denominators in Eq. (18) and Eq. (19). Keeping terms of order T N , t † 2 δt 2 /T N , t † 2 δt 2 and r † 1 δr 1 , we can write the total matrix currentǏ(ε) in a very transparent way likě where G Q ≡ e 2 /2πh being the conductance quantum and where the explicit form of δX = δX Mˆ στ 3 is used. For a weak ferromagnetic contact, the elements δt (δr) introduced in Eqs. (A18a)-(A18d) in the Appendix can be expressed in terms of spin dependent amplitudes likê From these it easy to see that Now we see that G T is the usual conductance of the contact G T = G ↑ T + G ↓ T /2, and G MR = G ↑ T − G ↓ T /2 accounts for the different conductances for different spin directions, leading to a spin polarized current through the junction.
On the other hand, for the case T N = 0 (the case of a ferromagnetic insulator contact), Eq.(21a) is not zero and reduces toǏ where G φ depends only on reflection amplitudes at the normal metal side . (27) The physical meaning of this term in this particular case, can be now understood as follows: electrons with different spin directions pick up different phases when reflecting at the ferromagnetic insulator. During this process, ferromagnetic correlations are induced in the normal metal node. In this particular case, the coefficient G φ is related to the mixing conductance introduced in 33 via G φ = ImG ↑↓ . Eq.(21a) has been recently used as boundary condition current for the circuit theory applied in a MI|N|S structure, being MI a magnetic insulator and under conditions of superconducting proximity effect. In Ref. ( 43) we shown that in this case, the effect of the conductance G φ can be seen as an induced magnetic field which give rise to spin-splitting of the induced "BCS like" density of statesh ≡ G φ δ/2G Q , being δ the average level spacing in the normal node. In particular,we also show that for a system composed by two coupled MI|N|F trilayer structures the absolute spin-valve effect can be achieved for a finite range of voltages. 43

VI. CONCLUSIONS
The circuit theory of mesoscopic transport is a systematic way to describe transport in multiterminal hybrid structures in which general rules analog to the Kirchhoff's rules of classical circuits are used to solve the circuit and compute the transport properties of the system under study. One of these rules imposes that the sum of all "matrix current" into a node must be zero. That is why, the expression of the "spin-charge" matrix current that flows between two nodes (or between a reservoir and a node) through a contact/connector is as essential for the the circuit theory, as the Ohm's law is for classical electric circuits. In this paper we have generalized the expression of such matrix currents for the case of multiterminal systems that included ferromagnetic and superconducting reservoirs connected through magnetically active contacts to one or several normal nodes.
We have derived the most general expression for this matrix current Eq. (14) in terms of of isotropic quasiclassical Green's functionsǦ 1(2) at both sides of the contact which describe the adjacent reservoirs/nodes and transmission/reflection coefficients that characterize the scattering in the contact region. This expressions should be numerically implemented in order to solve any general arrangement of reservoirs, contact and nodes.
Moreover, we have perform a perturbation expansion in the spin asymmetry of the transfer matrix δX associated to the contact region in order to gain more knowledge and obtain more transparent expressions. We found the expression for the matrix current that describes a weak ferromagnetic contact to first order in δX (Eq.(19)). In order to describe spin-flip processes at the contacts we need to go to higher orders in the asymmetry δX. For the case of a tunnel barrier, the tunneling current takes a very simple and clear form (Eq.(21a)). This expression is characterized by three conductance parameters G T ,G MR and G φ , which can be expressed in terms of the spin conductances G ↑(↓) and the (complex) mixing conductance G ↑↓ .
We thank discussions with Ya. M. Blanter, A. Brataas, and Gerrit E. W. Bauer. This work was financially supported by the Stichting voor Fundamenteel Onderzoek der Materie (FOM).

APPENDIX A: PERTURBATION EXPANSION
We perform a perturbation expansion of 1 +Ǧ 1M †Ǧ 2M −1 in terms of the parameter δX as Nevertheless the transfer matrixM obeys a multiplicative composite rule, whereas the scattering matrix obeys a more complicated composition rule. 42,44 .
By writing in analogous way the other term in Eq.(14) 1 −Ǧ 1M †Ǧ 2M and after some algebra, we obtain the following expression for the matrix currentǏ to first order in δXǏ wherě A general property of the transfer matrix is the flux conservation which can be expressed as Substituting Eq. (15) in Eq.(A5) we get The matrixM 0 should also obey flux conservation so we found the following equation for δX δX †Σz +Σ z δX + δX †Σz δX = 0.
To first order in δX we have From Eq.(A9) we obtain for the elements of δX We see that δX + + and δX − − are pure complex elements and δX + − and δX − + are complex conjugate.
The matrixM 0 is symmetric under time-reversal transformation, which involves both transformation in Spin and Channels space, under the following prescription beingΣ x the x-Pauli matrix in directional space and σ y the y-Pauli matrix in Spin space. As a result, the components ofM 0 fulfill the following relations In general δX can be split in symmetric and antisymmetric parts with respect to time-reversal Time-reversal transformation over Spin gives always an anti-symmetric contribution δX = σ y δX * σ y = − δX, will be symmetric (anti-symmetric) with respect to transformation in directional space δX . Taking into account the structure of δX given by the condition δX † = −Σ z δX Σ z , δX we find for δX In this case δX + + = −δX − − and δX A is in directional Space On the other hand for δX S , δX Now δX + + = −δX − − , and δX + − must to be zero. As a result δX S is in directional Space For the matrix δM =M 0 δX we have where σ ≡ {+, −}. Analogy toM , the matrixS can be writtenS whereS 0 corresponds to the spin-independent part and δS accounts for the spin structure ofS. Now we assume that δS is a small deviation with respect toS 0 (δS ≪S 0 ). In this case the elements ofS are r s s The quantities t 1(2) r 1 (2) are spin-independent transmission(reflection) amplitudes, whereas δt s s So we see that the elements of δX can be expressed in terms of the transmission and reflection amplitudes δt (δr). Note that in Eq.(A20a)-Eq.(A20d) we explicitly include the spin indices s, s′ of the elements δX and δt (δr) to emphasize that both δX and δt (δr), contain information about the spin structure of the contact region. Now we consider the case of δX A which corresponds to a weak ferromagnetic contact δX A ∼ Mˆ στ 3 .