Josephson Currents and Spin Transfer Torques in Ballistic SFSFS Nanojunctions

Utilizing a full microscopic Bogoliubov-de Gennes (BdG) approach, we study the equilibrium charge and spin currents in ballistic $SFSFS$ Josephson systems, where $F$ is a uniformly magnetized ferromagnet and $S$ is a conventional $s$-wave superconductor. From the spatially varying spin currents, we also calculate the associated equilibrium spin transfer torques. Through variations in the relative phase differences between the three $S$ regions, and magnetization orientations of the ferromagnets, our study demonstrates tunability and controllability of the spin and charge supercurrents. The spin transfer torques are shown to reveal details of the proximity effects that play a crucial role in these types of hybrid systems. The proposed $SFSFS$ nanostructure is discussed within the context of a superconducting magnetic torque transistor.


I. INTRODUCTION
Proximity effects inherent to superconducting systems with inhomogeneous magnetic order presents a mechanism by which dissipationless current flow and the spin degree-offreedom can both be effectively coupled and controlled. [1][2][3][4][5][6] The important role that proximity effects play in the static and transport properties of ferromagnetic Josephson junctions with s-wave superconductors is now well established. Indeed, the proximity induced damped oscillatory superconducting correlations within the ferromagnet region serves as a channel for interlayer coupling and spin switching 1,2,5,7,[9][10][11] . Proximity induced triplet pairing correlations within the ferromagnetic junction also provides another avenue for spin transport. [12][13][14][15] Interest in Josephson junctions with ferromagnetic layers has grown due to their possibility as serving as elements in next generation superconducting computing and nonvolatile memories, [2][3][4][5] where single flux quantum circuits containing multiple Josephson junction arrangements can improve switching speeds. [16][17][18] To determine whether Josephson structures can serve as viable cryogenic spintronic devices, it is crucial to understand the behavior of the spin currents that can flow in such systems. The spin current flowing into the ferromagnetic regions exerts a torque on the magnetization if the current polarization direction is noncollinear to the local magnetization in the ferromagnet. In other words, the spin angular momentum of the polarized current will be partially transferred to the magnetization in the F region. 19,20 This spin transfer torque (STT) serves as an important mechanism in spintronics devices. [19][20][21] The STT effect can cause magnetization switching for sufficiently large currents without the need for an external field. This switching aspect provides a unique opportunity to create and improve fast-switching magnetic random access memories. [22][23][24][25] The recent experimental pursuits of spin-based memory technologies involving various arrangements of S FS Josephson junctions has rekindled interest in the realm of ferromagnetic Josephson arrays. 7,[26][27][28][29][30][31] When a sequence of S FS junctions are placed in a series configuration, creating a S FS FS type junction shown in Fig. 1, additional possi-bilities emerge for the control of the associated spin and charge supercurrents. 7,26 For example, the triplet components of the supercurrent and total charge transport in diffusive S FS FS structures is closely linked to the relative magnetization orientations, which can directly alter the total charge current flow, causing it to reverse direction in the ferromagnetic layers. 7 The transport of triplet supercurrents through the middle S electrode can be utilized to manipulate the magnetic moment of the F layers in S FS FS hybrids. 26 The spinpolarized supercurrents in these types of systems may also be used to induce a STT acting on the magnetization of a ferromagnet. 9,[32][33][34] At the interfaces between the F and S regions in a ballistic S FS FS Josephson junction, quasiparticles undergo Andreev and conventional reflections. [36][37][38][39] Besides the contribution from the continuum states, the superposition and interference of the corresponding quasiparticle wavefunctions in the F regions result in subgap bound states that contribute to the total current flow between the S banks. By varying the width of the central S layer, d S , modifications to the Andreev bound state spectra can ensue, i.e., by simply decreasing d S , additional overlap can occur between the subgap bound states in the adjacent F regions. [40][41][42] For S FS FS type structures, if the central S layer is sufficiently thin, i.e., d S ξ, the proximity effects within the interacting F regions result in the Cooper pair amplitude and local density of states in each F region being mutually altered. Therefore, magnetization rotation in a single F layer can strongly influence the thermodynamic and quantum transport properties throughout the rest of the system. The coupling between the different regions can then result in the system residing in a ground state corresponding to a phase difference of ∆ϕ = π. 7,8 The appearance of superharmonic Josephson currents (with second and higher harmonics: sin 2ϕ, sin 3ϕ, . . . ) were theoretically predicted to appear in nonequilibrium and point contact Josephson junctions 43 . Shortly thereafter, the higher harmonic supercurrents were experimentally observed in nonequilibrium situations 44 . Also, it was shown theoretically for a uniform S FS junction, that the higher harmonics can be revealed at the 0-π transition point, where the first harmonic is highly suppressed due to the supercurrent flow reversing direction at that point. 4,5 Therefore, the arXiv:1505.05520v1 [cond-mat.supr-con] 20 May 2015 nonvanishing supercurrent at the 0-π transition point observed experimentally in Ref. 45 was soon attributed to the presence of higher harmonics 5,34,46,47 . Subsequent works with ferromagnetic Josephson junctions demonstrated that the higher harmonics can naturally arise when varying the location of domain walls 48 , and in ballistic double magnetic S FFS junctions, provided that the thickness of the magnetic layers are unequal 8 . Recently, evidence of higher harmonics has been experimentally observed in Josephson junctions with spin dependent tunneling barriers. 35 The focus of this paper is to theoretically investigate proximity effects leading to modified superconducting correlations and controlled charge and spin transport in S FS FS ballistic junctions. We will address a variety of relative magnetization orientations, and prescribed superconducting macroscopic phase differences between the S terminals. Utilizing a microscopic Bogoliubov-de Gennes (BdG) approach, we derive the appropriate expressions for the charge and spin currents and the corresponding equilibrium spin transfer torques. The numerical solutions to the BdG equations are employed to study the current phase relations, revealing the emergence of additional harmonics that depend on the tunable magnetization profile and other system parameters. We demonstrate that our proposed S FS FS systems can be considered as a superconducting magnetic torque transistor, where the flow of spin and charge currents can be tuned by the macroscopic phases of the superconducting leads. This, in turn, dictates the torques acting on the exchange fields of the F layers. Remarkably, the superconducting phases (in addition to other system parameters) can effectively switch the torques acting on the magnetizations of the F layers 'on' or 'off'. The directions of the torques and charge currents are shown to not be related by simple functions of the phase differences or exchange fields, similar to what was observed in simpler ferromagnetic Josephson junctions involving equilibrium torques. 9 We also find that when the angle describing the relative in-plane magnetic exchange field orientations is varied, the torque tending to align the two F magnetizations is usually largest for relative magnetization angles other than the expected orthogonal configurations. Moreover, we have found that these sequential nanodevices allow for detecting pure second harmonics in the current phase relations, depending on the system parameters, including the relative magnetization orientations. We present a study of the crossover between the first and second harmonic in the current phase relations and consider experimentally feasible situations to observe them. This crossover is discussed in the context of the appearance of equal spin triplet correlations with m = ±1 spin projections along the spin quantization axis.
The paper is organized as follows. In Sec. II, we outline the theoretical approach used and derivation of various physical quantities investigated, including the supercurrent, magnetization, spin current, and associated torques. We present our results in Sec. III. This section is divided into two-subsections: Subsect. III A presents the current phase relations and the second harmonic supercurrents that can be generated by calibrating the system parameters. Subsect. III B, discusses the associated spin currents and equilibrium spin transfer torques. heterojunction considered in this paper. The system is infinite in the yz plane, and thus the x axis is normal to the plane of the interfaces. The middle S electrode has a thickness d S in the x direction, and is sandwiched between two F layers with unequal thicknesses d F1 and d F2 . The F layers are uniformly magnetized and their exchange fields are denoted by h i (for i = 1, 2). To simplify notation, we have defined the magnetization directions via: h i = |h i |(cos α i , sin α i sin β i , sin α i cos β i ). The S electrodes can take arbitrary phases, described by ϕ L , ϕ M , and ϕ R for the left, middle and right S electrodes, respectively.
Finally, we give concluding remarks in Sec. IV.

II. THEORETICAL METHOD
We begin our methodology by introducing the Bogoliubovde Gennes (BdG) formalism. 49 The BdG approach is a convenient microscopic quantum mechanical technique that allows a complete investigation into the fundamental characteristics of the superconductivity of ballistic superconducting heterojunctions. The microscopic BdG formalism can easily accommodate a broad range of magnetic exchange field strengths and profiles, including the half-metallic limit where the magnitude of the exchange field and the Fermi energy, ε F , are the same 50 . A schematic of the multilayer configuration that we study is depicted in Fig. 1. For this quasi one-dimensional system, physical quantities are invariant with respect to the yz plane, while the x-direction captures the essential physical characteristics of the system. The corresponding spindependent BdG equations are thus expressed as, where Ψ n (x) ≡ (u n↑ (x), u n↓ (x), v n↑ (x), v n↓ (x)) T , and u nσ and v nσ are the quasiparticle and quasihole amplitudes. The pair potential ∆(x), which effectively scatters electrons into holes (and vice versa) is nonzero only in the superconducting electrode regions. We furthermore assume that ∆(x) is piecewise constant in the S regions, with each S region possessing the same magnitude but possibly different phase. Thus, within the external S electrodes, ∆(x) takes the form ∆ 0 e iϕ L in the left, ∆ 0 e iϕ M in the middle, and ∆ 0 e iϕ R in the right S electrode. The combinations of phase differences involving ϕ L , ϕ M , and ϕ R results in additional possibilities for supercurrent flow compared to conventional Josephson junctions comprised of two superconducting banks. The single particle Hamiltonian H 0 (x) is defined as, where ε ⊥ = 1 2m (k 2 y + k 2 z ) is the quasiparticle energy for motion in the invariant yz plane (see Fig. 1), and the spin-independent scattering potential is denoted by U(x). We represent the magnetism of the F layers by a Stoner effective exchange energy h(x) which will in general have components in all (x, y, z) directions. Additional technical details on solving the BdG equations for this type of quasi one-dimensional setup is given in the Appendix.
Various other types of "inverse" proximity effects [51][52][53] can also occur in the vicinity of the F/S contacts, whereby ferromagnetic order propagates from one F layer to the other (creating a mutual torque) via the central S layer. Therefore it is of interest to determine not only the spatial profile of the magnetization m(x) within the F regions, but also within the central S layer, where the induced magnetization can also screen 54 the magnetization of the adjacent ferromagnet. The complete spatial profiles of the magnetization are determined using the expressions: 55 where µ B is the Bohr magneton, and f n the Fermi function. The Josephson effect leads to many possibilities for charge supercurrent transport in S FS FS junctions. This experimentally accessible phenomenon is now well understood, with the primary driving mechanism being the difference between the macroscopic phases of two S banks, separated by a weak link. 49,56,57 When there are three coupled S banks, the situation becomes more complicated, and the dissipationless charge current depends on various combinations of the phase differences in addition to the other geometric and material properties of the system. When computing the supercurrent flowing in the x direction, we express the Josephson current in terms of the quasiparticle amplitudes: 48,49 Similarly, following the approach outlined in the Appendix, we can also write the spin current S σ with spin σ flowing along the x direction in terms of the quasiparticle amplitudes: where the sums for the currents above are in principle taken over all quasiparticle states.

III. RESULTS AND DISCUSSIONS
We focus here on the low temperature regime, with T/T c = 0.001, where T c is the critical temperature of the corresponding bulk S material. For simplicity we set ϕ L = 0, ϕ M = ϕ/2, and ϕ R = ϕ, for the phases of the left, middle, and right S terminals, respectively. Thus, a phase difference of ϕ/2 is maintained across each S electrode. The spatial variables are normalized in terms of the Fermi wavevector, including the BCS zero-temperature coherence length, ξ 0 , set to k F ξ 0 = 100, and the dimensionless position X, written as X = k F x. For each physical quantity studied, a broad range of central S widths will be considered. We assume that the ferromagnets are similar materials with identical exchange field strengths, i.e., To create favorable conditions for equal-spin triplet generation, 8 the F 1 and F 2 regions have highly asymmetric widths, with d F1 = 0.1ξ 0 , and d F2 = 3.8ξ 0 , so that d F1 d F2 .

A. Josephson Charge Supercurrent
We begin with a discussion of the supercurrent charge transport by solving the microscopic BdG equations (Eq. (1)) over a broad range of energies and then summing the corresponding quasiparticle amplitudes and energies according to the expression given by Eq. (6). The charge current also can be obtained by minimizing the free energy with respect to the appropriate superconducting phase differences. 49 Our microscopic method fully accounts for bound states that may be generated from quasiparticle trajectories with large momenta corresponding to in-plane energies comparable to ε F (shown to be important for S NS junctions 58 ). The charge supercurrent is normalized by J 0 = nev F , where v F is the Fermi velocity, e the electron charge, and n is the number density. We focus our attention on supercurrents flowing through the ferromagnets, recalling that each of the three S regions act as effective sources or sinks in the current. The pair potential ∆(x) of course vanishes in the intrinsically nonsuperconducting F regions.
To begin, in Fig. 2 the supercurrent is shown as a function of the phase difference, ∆ϕ, for a wide range of central S electrode widths, d S . The central S electrode acts as an external current source, and hence the spatial behavior of the current is piecewise constant in each F region. Thus, each panel corresponds to the current in a particular ferromagnet (as labeled). The relative magnetic exchange fields are orthogonal, with h 1 directed along y and h 2 along z (see Fig. 1). Two limiting cases are shown: In the first case, the width of the central S layer is zero (d S = 0), and in the second case, a large central layer (d S = 5ξ 0 ) is considered. When there is no middle S layer, the current phase relation (CPR) is π-periodic, with behavior consistent with a ballistic S FFS asymmetric double magnetic structure 8 . For d S = 5ξ 0 , the large S width effectively decouples the two ferromagnets, creating two isolated S FS junctions with phase differences ϕ/2. Thus, in this case one junction consists of a thin uniform F 1 region sandwiched by two superconductors, and its CPR reflects the overall behavior and direction reversal that is expected in narrow ferromagnetic S FS Josephson junctions. 4 The other decoupled S FS junction containing F 2 (of width d F2 = 3.8ξ 0 ) has a substantially diminished current due to its much greater width. Note that there are negligible triplet correlations present when d S is large due to an effectively uniform magnetization in each F layer. For intermediate S layers, the CPR evolves from its form in one of these limiting cases, to a richer more complex one due to the emergence of additional harmonics. This is due in part to the greater amount of triplet correlations that are present when the F layers possess orthogonal magnetization configurations. The appearance of additional harmonics in the current phase relation has been discussed in the diffusive and clean regimes for simpler ferromagnetic Josephson junction structures. 5,34,46,47 Note that in Fig. 2(a), the phase corresponding to the first peak in the current phase relation, denoted by the critical phase, ϕ * , has ϕ * ≈ 60 o for d S = 0, and then gets smaller for d S ξ 0 , before increasing nearly linearly with d S . This is contrast to what is observed in Fig. 2(b), where ϕ * increases monotonically with d S . Figure 3 shows the CPRs at various magnetization directions β 1 . The magnetization in F 2 is fixed along the z direction. The width of the central S layer is now set at d S = ξ 0 , and as stated earlier, its phase has the value ϕ/2 to ensure that adjacent superconductors maintain the same phase difference. Examining panel (a), we see that when the relative magnetizations are parallel (β 1 = 0 • ) or antiparallel (β 1 = 180 • ), the current exhibits a nearly sinusoidal CPR. For intermediate β 1 leading to noncollinear magnetizations, higher order harmonics appear in the Josephson current. Figure 3(b) reveals that in the wider F 2 region, collinear orientations result in regular sawtooth-like patterns in the charge current as ∆ϕ varies. The current in the larger magnet flows in opposite directions depending on whether the relative magnetizations are parallel or antiparallel, in contrast to the narrow F 1 segment reported in (a). Similarly to what is observed in the narrow F 1 region, we also find more complicated higher order harmonics in describing the current for misaligned relative magnetizations. In the broader context of layered F/S structures, including ferromagnetic Josephson junctions and spin valves, misalignment of adjacent F layer magnetizations will typically generate equal-spin pairing that is greatest in the orthogonal configuration [59][60][61][62] . To investigate the supercurrent transport properties when proximity-induced triplet pair correlations are present in S FS FS type structures, it is instructive to investigate the sensitivity of J x to relative magnetizations orientation. Therefore in Fig. 4, the Josephson current and triplet correlations are shown in the two ferromagnets as a function of exchange field orientation, β 1 . As β 1 sweeps between the parallel (β 1 = 0 • ) and antiparallel (β 1 = 180 • ) states, adjacent S electrodes are, as before, maintained at constant phase difference ϕ/2. Multiple middle S terminal thicknesses are considered (see legend), with the d S = 0 curve shown for comparison purposes. As shown in Fig. 4(a) and (b), when magnetic coupling is significant (for d S 2ξ 0 ) the supercurrent is nonmonotonic and can be highly sensitive to the relative direction of the magnetic moments in the F layers. When the magnets have collinear magnetizations, the Josephson current in F 1 is often weaker for the parallel configuration compared to the antiparallel configuration, except when there is no central superconductor, or when it is very wide. The orthogonal state (β 1 = 90 • ) however results in the maximal current flow. Increments in the central electrode thickness can drastically modify the supercurrent signature. Eventually for large enough d S , the magnetic coupling is diminished, and variations in β 2 can no longer affect the current flow. The corresponding decoupled S FS junctions then have uniform current flow, that is larger in the narrow F 1 region (panel (a)), and in F 2 (panel(b)), becomes negligible due to the larger width.
The emergence of additional harmonics in the current phase relations is often correlated with the generation of triplet correlations that are odd in time 14 or frequency. As we saw previously in Fig. 3, varying the phase difference ∆ϕ, revealed the emergence of additional harmonics as the relative exchange fields went from the parallel (β 2 = 0 o ) to orthogonal (β 2 = 90 o ) magnetic configuration. To further explore the evolution of triplet pairing correlations with magnetic orientations, in (c) and (d) the spatially averaged triplet amplitudes | f 0,avg | (with spin projection m = 0), and | f 1,avg | (with spin projection m = ±1) are shown as functions of β 1 . These quantities are calculated using the expressions: 14 The summations are in principle over all states. A representative value oft = 6 is used for the scaled relative time, wheret ≡ ω D t. The quantization axis in the regions of interest is aligned along the z-direction, however it is straightforward to align it along a different axis that may coincide with the local magnetization direction. 11 Comparing Figs. 4(c) and (d), it is evident that the behavior of the triplet amplitudes as a function of β 1 is anticorrelated, with the average | f 0 | smallest when | f 1 | peaks at β 1 = 90 • . Increasing the S width is shown to reduce the f 0 amplitudes gradually, however the equal-spin component f 1 drops much more abruptly to negligible values once d S exceeds ξ 0 . Although not shown, the singlet correlations within S (for all S widths) were found to not exhibit significant sensitivity to changes in β 1 . This is clearly in sharp contrast to what is observed for both triplet components. Having discussed now some salient features of the charge currents, we now turn our attention to spin transport and the corresponding equilibrium spin transfer torques within the junction region.

B. Spin currents and spin transfer torques
Spin-polarized transport quantities are of paramount importance when studying S FS FS type junctions as potential components in spintronics devices. The spin current S is a local quantity responsible for the change in magnetizations due to the flowing of spin-polarized currents. The main contributor to the equilibrium spin current and corresponding spintransfer torque τ is the spin-resolved Andreev bound states 33 , which play the main role in torque sensitivity to variations in ∆ϕ and β 1 . Thus, the STT can be a useful probe of the spin degree of freedom in S /F proximity elements. The current that is generated from the macroscopic phase differences in the S electrodes can become spin-polarized 9,32,34,63 when entering one of the ferromagnet regions. A portion of this spin current can then interact with the other ferromagnet and be absorbed by the local magnetization due to the spin-exchange interactions. 64 Since we are considering ferromagnets with in-plane magnetic exchange fields, the only spin current that can flow is the out-of-plane component S x . This is consistent with the fact that only τ x can exist in equilibrium when spin currents do not enter or leave the superconducting electrodes. 9 As shown in the Appendix, the method used here to determine τ involves simply calculating the magnetic moment throughout the entire system and then using, where the magnetization components are given in Eqs.
The net flux of spin current ∆S x through a certain region bound by points x 1 and x 2 is therefore: In other words, the change in spin current at the interface boundaries (x = x 1 and x = x 2 ) is equivalent to the net torque acting within those boundaries. Either approach, using Eq. (10), or Eq. (11), is sufficient to calculate τ , as they both yield precisely the same result. In the results that follow, we calculate the torques using Eq. (10), thus avoiding the numerical derivatives that arise when using Eq. (11). We first present in Fig. 5(a) the x-component of the local spin current, S x , normalized by S 0 ≡ −µ B N F ε F /k F , where N F is the density of states at the Fermi energy. We numerically calculate S x by summing the quasiparticle amplitudes and energies using Eq. (7). Several different phase differences are studied as shown in the legend, and the exchange interactions are orthogonal: h 1 = (0, h y1 , 0), and h 2 = (0, 0, h z2 ). The central S layers is one ξ 0 wide. The spin current reveals precise spatial behavior of the junction interlayer magnetic coupling, and from Eq. (11), one can deduce the corresponding local behavior of τ x . In F 2 , the oscillating spin currents each have a phase and magnitude that can change, depending on ∆ϕ. Once the spin current enters the S region (bound by the dashed vertical lines), it immediately becomes conserved, whereby there is no transfer of spin angular momentum. Since ∂S x /∂x = 0, we have τ x = 0 in that region. Within F 1 , the narrow width limits the extent at which S x can vary, and consequently it undergoes a nearly monotonic decline, before vanishing within the superconductor. Since S x = 0 in the outer S electrodes, the difference ∆S x over either ferromagnet is determined by the value of S x within the central S . Thus, despite drastically different local behavior of S x in each F region, the net flux of spin current through either F 1 or F 2 differs only in sign. One can then see that by examining the value of the conserved S x in the central S region, the flux ∆S x through e.g., F 1 is largest when ∆ϕ = 180 • , and smallest when ∆ϕ = 120 • . This observation is consistent with (b), where the total torque (normalized by τ 0 ≡ −µ B N F ε F ) is shown as a function of ∆ϕ. We calculate τ x,tot over the F 1 region using Eq. (12), although the result for F 2 is trivially obtained, since within each of the three s-wave S electrodes, there can be no flux of spin current. This requires τ x,tot in F 1 to be the exact opposite in F 2 . As seen in (b), the net torque can be quite sensitive to the phase difference ∆ϕ, which when tuned appropriately, can flip direction or vanish altogether. For comparison, the d S = 0 case is included, which has symmetric behavior about ∆ϕ = 180 • . For most S layer widths considered, τ x,tot vanishes at ∆ϕ ≈ 90 o , and ∆ϕ ≈ 270 o before reversing direction.
Since the middle S terminal has ϕ M = ϕ/2, the central S electrode tends to asymmetrically distort the supercurrent about ∆ϕ R = 180 • . Comparing Fig. 2(a) with Fig. 5(b), it is evident that the charge supercurrent J x is not simply correlated with the flux of spin current (or equivalently τ x,tot ), consistent with previous work 9 . The coupling between ferromagnets is clearly stronger the thinner the S electrodes, where τ x,tot is larger and tends to change less over a broader range of ∆ϕ, reflecting a tendency for the magnetization to remain fixed in place despite supercurrent variations. Eventually however, for sufficient increments in ∆ϕ, the net torque will abruptly reverse direction. The proposed S FS FS system can be considered as a type of superconducting magnetic torque transistor, where the flow of spin and charge currents are tuned by ∆ϕ. This, in turn, dictates the torques acting on the exchange fields present in the F layers. By minimizing the free energy, 9 it was shown that changes in the supercurrent with respect to relative magnetization orientation results in a torque that changes with ∆ϕ, and vice versa. To underscore the sensitivity of the net torque to the phase and relative magnetic orientations, Fig. 5(c) illustrates τ x,tot as a function ∆ϕ for a few orientation angles, β 1 . When m and h are collinear, i.e., the two exchange field alignments in the ferromagnets are parallel (β 1 = 0 • ) or antiparallel (β 2 = 180 • ) to one another, m×h = 0, and hence the net torque is zero (see Eq. (10)). The previous β 2 = 90 • case in (b) is also shown here. For noncollinear magnetizations, a "static" torque even exists in the absence of a supercurrent (∆ϕ = 0). In this case, the effectively inhomogeneous magnetization generates a spin current imbalance and torque that tends to align the magnetizations. When the magnetizations are misaligned, the supercurrent can change both the direction and amplitude of the torque 26 . In many cases, this effect can be attributed to the torque that the equal-spin triplet component of the supercurrent (possessing net spin along the spin quantization axis) exerts on the magnetization and tends to rotate it. As we clearly see from the results presented in Fig. 5(c), for thin central superconductors with d S ξ 0 , this effect can be quite sensitive to the multiple superconducting phase differences.
To investigate further the behavior of the local spin transport, and total torque when varying the ferromagnet orientation angle β 1 , the spatial behavior of spin current throughout the system is shown in Fig. 6(a). The angle β 1 describes the rotation of the in-plane magnetic exchange in F 1 : h 1 = h(0, sin β 1 , cos β 1 ). The magnetic exchange field direction in F 2 does not vary and is directed along z: h 2 = (0, 0, h). Control of the free-layer magnetization by an external magnetic field has experimentally been demonstrated in S /F spin valves 65 . The rotation angle can also be manipulated by STT switching. 24,25 We see that in the S region, S x is constant for all angles β 1 , consistent with the spin-torque conservation law [Eq. (11)] which states that any spatial variations of the spin current must generate a torque. The torque thus vanishes in the S region, as it should. The F 2 region again exhibits a spatially modulating spin current whose behavior is highly sensitive to the particular orientation angle β 1 . The most rapid changes in the oscillating S x tends to occur within this ferromagnet near the interface with a superconductor. We also see that the spin current at the interfaces between the ferromagnets and the central S where the total torque τ x,tot is shown as a function of orientation angle β 1 for several S widths. We see that τ x,tot vanishes entirely when the two ferromagnets have collinear magnetizations, corresponding to parallel (β 1 = 0 • ) or antiparallel (β 1 = 180 • ) configurations. The total torque also has the expected behavior when there is no middle S terminal (d S = 0), peaking when β 1 ≈ 90 • , corresponding to the situation where the torque has the greatest tendency to align the magnetic moments. Including a central S layer is seen to introduce a nontrivial oscillatory behavior in τ x,tot that can cause it to vanish (or change direction) multiple times when spanning the full β 1 range. In effect, the angle β 1 that was previously responsible for the largest total torque (when d S = 0) is now the angle at which there is negligible total torque within the F layers.
Increasing the S thickness of course reduces the ferromagnetic coupling and hence reduces the magnitude of the mutual torques. The misalignment angle where the maximum torque is exerted, β * 1 , clearly shifts from near the orthogonal configu- To examine the previous behavior of the total STT from a different perspective, it is beneficial to recall the simple expression, Eq. (10), which shows that for a given exchange field, the torque arises entirely from the magnetization, m(x). Thus, it is insightful to study the details of m(x), which gives a measure of the spin polarization in the system responsible for generating the local spin currents. The out-of-plane torque is due to both in-plane components of the magnetization: , which clearly vanishes outside of the ferromagnet regions where h i = 0. The exchange field in the F 1 region varies in the yz plane, while in F 2 , the only nonzero component to the exchange field is h z , so that we have simply, τ x (x) = −(2/µ B )h z (x)m y (x). Thus for a mutual torque to exist in the ferromagnets, a ypolarized magnetization in F 1 must propagate through the central S electrode and into the F 2 layer, generating a spinimbalance. In Fig. 7(a-c), we illustrate the total magnetization, m y,tot , in each region as a function of ∆ϕ. Here we define the quantity m y,tot as the y-component of the magnetization spatially integrated over each of the three junction regions of interest, and normalized by m 0 ≡ −µ B N F . Using this normalization, the bulk value of the magnetization is equivalent to the exchange field value of h/ε F = 0.1. The thicknesses of the F 1 , F 2 , and S layers are given by d F1 /ξ 0 = 0.1, d F2 /ξ 0 = 3.8, and d S /ξ 0 = 1, respectively. It is evident that for a wide range of ∆ϕ, a net magnetization exists in each junction region, other than when β 1 corresponds to relative collinear magnetizations (h 1 directed along z). In panel (a), m y,tot is approximately constant for each β 1 , and the overlapping curves at β 1 = 30 • , 150 • reflect the symmetry about β 1 = 90 • , where the net magnetization is greatest. Also, the net magnetization in F 1 is positive for the range of β 1 shown, since the magnetic exchange interaction in the y direction is h 1,y = h sin β 1 . Due to proximity effects, there is an intrinsic net magnetization in the superconductor that is present even in the absence of current flow. As shown in panel (b), the total induced magnetization in the superconductor is finite at ∆ϕ = 0 • and vanishes at ∆ϕ ≈ 180 • , where it switches direction. Finally, in Fig. 7(c) the contribution from the magnetization to the total torque observed in Fig. 5 is evident, where the total magnetization in the wider F 2 region exhibits the same dependence on ∆ϕ as τ x,tot , differing only in sign.

IV. CONCLUSIONS
In conclusion, we have presented a detailed microscopic study of the charge and spin supercurrents that can exist in S FS FS types of Josephson junction hybrids. The local magnetization profiles were then calculated and employed for determining the equilibrium spin transfer torques. We also studied the associated spin-triplet correlations that arise in these hybrids. This was accomplished by solving the BdG equations over a broad range of geometrical and material parameters. Our investigations revealed how to manipulate and generate supercurrents with higher order harmonics by varying the macroscopic phases in the superconducting electrodes, or the relative exchange field orientations. Utilizing the spin conservation law, we calculated the spin transfer torque in these systems, revealing a number of experimentally viable ways in which the magnetization can be controlled in a prescribed fashion. Our results demonstrate that, depending on the parameters considered, these types of ballistic systems can support supercurrents that can be tuned to contain primarily the first or second harmonics in the current-phase relations. We studied the π-2π harmonic crossovers and determined the experimentally desirable conditions in which to reveal the second harmonic supercurrents in these systems. We also showed that the equilibrium spin transfer torques can be well controlled by simply modulating the macroscopic phases of the three S electrodes in addition to the other system parameters such as the sizes of the ferromagnets and central superconductor electrodes, or the relative magnetization alignments.
These findings are suggestive of a phase-tunable superconducting transistor based on STT switching. ACKNOWLEDGMENTS K.H. is supported in part by ONR and by a grant of supercomputer resources provided by the DOD HPCMP. M.A. would like to thank A. Zyuzin for helpful discussions. The numerical procedure used in calculating the spin and charge currents involves first expanding 50 the quasiparticle amplitudes in terms of a complete set of N basis functions: where we define ψ n (x) = (u n↑ (x), u n↓ (x), v n↑ (x), v n↓ (x)), and ψ q = (û q↑ ,û q↓ ,v q↑ ,v q↓ ). The wavevector k q = qπ/d is discretized in terms of the system width d, taken to be large enough so that the results become independent of d. The next step involves Fourier transforming the real-space BdG equations (Eq. (1)), resulting in the following set of coupled equations in momentum space: Here we have definedû σ = (û 1σ ,û 2σ , . . . ,û Nσ ),v σ = (v 1σ ,v 2σ , . . . ,v Nσ ), and the matrix elements, dx h i (x) sin(k q x) sin(k q x), i = x, y, z. (A5) Our numerical procedure for calculating the supercurrent involves assuming a constant amplitude and phase for the pair potential in each S layer, thus providing the physically necessary source or sink of current, via the external electrodes. We then expand the pair potential via Eq. (A4). Similarly the exchange field and free particle Hamiltonian are expanded using Eq. (A5) and Eq. (A3) respectively. We then find the quasiparticle energies and amplitudes by diagonalizing the resultant momentum-space matrix (Eq. (A2)). Once the momentumspace wavefunctions and energies are found, they are transformed back into real-space via Eq. (A1), and the currents and magnetic moments are calculated as described in Sec. II. As mentioned above, the current source arises from the non self-consistent region where we take ∆(x) to be a piecewise constant with prescribed macroscopic phases in the S electrodes. The widths of the two outer S terminals are sufficiently large (d S ξ 0 ) so that the system boundaries have a negligible influence on the results. By taking the divergence of the current in Eq. (6) and using the BdG equations (Eq. (1)), we find, where the terms in the summation constitute the usual selfconsistency equation 49 for ∆(x). Thus, only when selfconsistency in ∆(x) is achieved, does the right hand side of Eq. (A6) vanish, and current is conserved. If the selfconsistency condition is not strictly satisfied, the terms on the right act effectively as sources of current, except of course within the ferromagnet regions, where ∆(x) = 0.