# Spin Controlled Coexistence of $0$ and $\pi$ States in $SFSFS$ Josephson
Junctions

Mohammad Alidoust<EMAIL_ADDRESS>Department of Physics, Faculty of
Sciences, University of Isfahan, Hezar Jerib Avenue, Isfahan 81746-73441, Iran
Klaus Halterman<EMAIL_ADDRESS>Michelson Lab, Physics Division,
Naval Air Warfare Center, China Lake, California 93555, USA

###### Abstract

Using the Keldysh-Usadel formalism, we theoretically study the $0$-$\pi$
transition profiles and current-phase relations of magnetic $SFSFS$ and
$SFSFFS$ Josephson nanojunctions in the diffusive regime. By allowing the
magnetizations of the ferromagnetic layers to take arbitrary orientations, the
strength and direction of the charge supercurrent flowing through the
ferromagnetic regions can be controlled via the magnetization rotation in one
of the ferromagnetic layers. Depending on the junction parameters, we find
opposite current flow in the ferromagnetic layers, revealing that remarkably
such configurations possess well-controlled $0$\- and $\pi$-states
simultaneously, creating a three-terminal $0$-$\pi$ spin switch. We
demonstrate that the spin-controlled $0$-$\pi$ profiles trace back to the
proximity induced odd-frequency superconducting correlations generated by the
ferromagnetic layers. It is also shown that the spin-switching effect can be
more pronounced in $SFSFFS$ structures. The current-phase relations reveal the
important role of the middle $S$ electrode, where the spin controlled
supercurrent depends crucially on its thickness and phase differences with the
outer $S$ terminals.

###### pacs:

74.50.+r, 74.45.+c, 74.25.Ha, 74.78.Na

##  I Introduction

It has been over a decade since hybrid structures of ferromagnets and
superconductors began to attract considerable interest from a fundamental
physics perspective as well as from the viewpoint of practical devices.
eschrigh1 ; efetov1 ; giaz1 ; giaz2 ; giaz3 ; alidoust3  The singlet Cooper
pair amplitudes oscillate and simultaneously decay in the vicinity of the
ferromagnet ($F$)-superconductor ($S$) interface.demler ; halt  This decaying
oscillatory behavior leads to interesting and intriguing phenomena such as
$0$-$\pi$ transitions which can take place by varying the system temperature,
Thouless energy, exchange field, degree of magnetization inhomogeneity, or
inelastic impurities. buzdin1 ; buzdin2 ; bergeret1 ; golubov1 ; eschrigh1 ;
ryaz0 ; Birge ; nazarov  These $\pi$-junctions have shown promise as building
blocks for quantum computing,makhlin  thus resulting in extensive studies of
these systems in the clean, diffusive, and nonequilibrium regimes. Bobkov ;
brataas1 ; Barash ; Cottet ; Crouzy ; Fominov ; Radovic1 ; Sellier ; Pugach2 ;
Jin ; eschrigh3

In a uniform $F$ layer that is proximity coupled to a singlet superconductor,
the pair wavefunction is composed of an odd-frequency triplet component in
addition to the usual even-frequency singlet component.bergeret1 ; bergeret2 ;
Asano1 ; Asano2  The only triplet correlations that can exist in this case are
those with zero total spin projection $m=0$ on the spin quantization axis.
Both the singlet superconducting correlations and this type of odd-frequency
triplet correlations oscillate and sharply decay inside the $F$ layer.
bergeret1 ; bergeret2 ; halterman1 ; efetov1  However, if the magnetization of
an $F$ layer possesses an inhomogeneous texture, another triplet component can
arise which has non-zero ($m=\pm 1$) spin projection along the spin
quantization axis.bergeret1 ; efetov1 ; Lofwander1 ; Lofwander2 ; Kontos ;
Sosnin  These triplet correlations are shown to penetrate deep into a
diffusive $F$ medium with a penetration length the same as conventional
singlet correlations in a normal metal.rob5 ; Asano2

The existence of such triplet correlations have also been observed in
experiments, including the measurement of a triplet supercurrent flowing
through Holmium hybrid structures.rob1 ; rob2 ; rob3 ; rob4 ; rob5  Shortly
thereafter, theoretical works explained these findings rob2 ; rob3 ; rob4  in
terms of spin triplet proximity effects, extending previous studies involving
inhomogeneous magnetization patterns rob5 ; alidoust1 . Triplet correlations
can also be generated in half-metallic systems due to spin-active
interfaces.Keizer ; Lofwander1 ; halterman2 ; brataas1 ; eschrigh3  Recently
it has been predicted theoretically that these types of triplet correlations
can arise in ballistic bilayers of ferromagnets with different thicknesses
attached to $s$-wave superconductors.Trifunovic ; Trifunovic2 ; Hikino ;
Houzet2  Such spin superconducting correlations are therefore of interest
because they might play important an important role in dissipationless
spintronic devices.Hikino ; eschrigh1 ; efetov1 ; alidoust3

Recently, a new class of Josephson junctions have been experimentally realized
in systems consisting of an $IsF$ section ($I$: insulator layer, $sF$: a
stacked layer that shows superconducting ($s$) and ferromagnetic properties)
sandwiched between two $S$ terminals.ryaz1 ; ryaz2 ; ryaz3 ; ryaz4  It was
shown that the system can operate as a series of $SIs$ and $sFS$ junctions
whose properties can be controlled by the thickness of middle $s$ layer. This
type of system was also recently studied theoretically,Kupriyanov1  and two
operating modes were found depending on the critical thickness of the $s$
layer, equal to $\pi\xi_{S}/2$, where $\xi_{S}$ is the superconducting
coherence length. Also motivated by the experiments above, a theoretical work
investigated the tunability of the magnetic moment due to the triplet
correlations by varying the superconducting phase difference of the outer $S$
banks in symmetric layered $SFSFS$, and $SFFSFFS$ structures.pugach1

If the superconductivity in the middle $S$ layer of a $SFSFS$ nanojunction is
not externally controlled, a self-consistent approachkh  is needed to properly
determine the magnitude and phase of the superconducting pair correlations
Kupriyanov1 . This situation can be realized by constructing a stack of three
layers ($FsF$) where the middle $s$ layer exhibits superconducting properties
below a critical temperature while the other layers are insensitive to
temperature. Therefore, by sandwiching the $FsF$ sample between two $S$ banks
and cooling the system temperature below the critical temperature, proximity
induced modifications arise in the central layer.ryaz1 ; ryaz2 ; ryaz3 ; ryaz4
This class of configurations and approach used is in contrast to a setup where
the macroscopic phase in the middle $S$ layer is assumed to be controlled
externally. pugach1  Three-terminal Josephson junctions have been
experimentally realized in the search for Majorana Fermions,arxiv_snsns  in
Superconductor/Semiconductor heterostructures. major1 ; major2 ; major3 ;
major4  In this work, we also assume that supercurrents are generated via
three external superconducting terminals. This is clarified in Fig. 1, where
we illustrate our setup for $F$ layers that are sandwiched between the
superconducting leads. We moreover assume that the system has no symmetry in
configuration space along the $x$-axis, thus requiring full numerical methods
to precisely determine the supercurrent transport characteristics.

We consider both $SFSFS$ and $SFSFFS$ type junctions in the diffusive regime.
We demonstrate that the transport of supercurrent in each $F$ region can be
easily controlled by the relative magnetization orientation of one of the $F$
layers. We show that this valve effect follows in part from the triplet
components involved in supercurrent transport arising from the superconducting
phase gradients present among the $S$ terminals. Throughout our calculations
we have assumed that the macroscopic phase of the three superconducting
terminals can be externally varied, and hence the charge current is not
necessarily conserved within the $S$ regions. In the $F$ regions, the charge
current is constant, but the spin-current is in general not conserved due to
the exchange interaction. We employ the Keldysh-Usadel quasiclassical method
in the diffusive limit to study these multilayer systems. We then decompose
the total supercurrent into both its even- and odd-frequency components, and
investigate their spatial profiles as a function of various values of
magnetization orientations and phase differences. We demonstrate that the
total charge supercurrent in one $F$ can change sign by means of magnetization
rotation in one of the other $F$ layers, while the total charge supercurrent
does not undergo a reversal in the rotated $F$ layers (or vice a versa). This
behavior of the current indicates that it is possible to arrange a sequence of
controllable $0$ and $\pi$ Josephson junctions in a three terminal $SFSFS$
spin switch. By studying the current components as a function of position, we
are able to pinpoint the origin of the spin-controlled supercurrent. Typically
in the middle $S$ region, the singlet contribution to the supercurrent follows
a nearly linear spatial variation, while the nonvanishing odd-frequency
triplet components do not decay in space.

We are able to extract from our numerical results analytical expressions for
the current-phase relations, thus simplifying the overall physical picture.
The numerical solutions showed that all components of the supercurrent are
described by a simple sinusoidal relation that depends on the differences of
the phases, $\theta_{L},\theta_{R}$, and $\theta_{M}$, corresponding to the
left, right, and middle $S$ regions respectively (see Fig. 1). We found that
an additional term arises in the current-phase relations besides the regular
sinusoidal terms, which for sufficiently thick middle $S$ electrodes is
responsible for spin-controlled transport through the junction. Although this
additional term is present for all $d_{S}$, its signatures are more prominent
when quasiparticle tunneling between outer $S$ electrodes is suppressed,
corresponding to the regime of large $d_{S}$. Therefore, depending on the
superconducting phase differences involving $\theta_{L},\theta_{R}$, and
$\theta_{M}$, a relatively thick middle $S$ electrode can limit the spin-
controlled features described above.

The paper is organized as follows. In Sec. II we discuss the method employed,
details of our assumptions, and technical points used in our calculations. In
Sec. III we discuss our results, analyze them and suggest possible
applications of our findings. We finally summarize and give the concluding
remarks in Sec. IV.

Figure 1:  (Color online) Schematic of the two types of Josephson junctions
considered: i) $SFSFS$ and ii) $SFSFFS$. We assume the $SF$ interfaces are
located in the $zy$ plane while the $x$ axis is along the direction of
Josephson current flow. The length of the middle superconductor $S$ and
ferromagnets $F$ are $d_{S}$, $d_{F1}$, $d_{F2}$, and $d_{F3}$, respectively.
Throughout the paper, we denote the ferromagnetic regions by $F_{1}$, $F_{2}$,
and $F_{3}$ as labeled. The exchange field of the magnetic layers is assumed
to have arbitrary orientation,
$\vec{h}=(h_{x},h_{y},h_{z})=h_{0}(\cos\gamma\sin\beta,\sin\gamma\sin\beta,\cos\beta)$,
in which $h_{0}$ is the amplitude of the exchange field. To analyze the system
properties without loss of generality, all magnetizations are considered to
reside in the $zy$ plane where $\gamma=0$, and consequently the magnetization
orientations can be described solely by $\beta$. We therefore define
$\beta_{1,2,3}$ for each magnetic layer.

##  II Theory and Methods

In this section, we outline the assumptions present and the theoretical
approach used to study $SFSFS$ and $SFSFFS$ type systems. The Keldysh-Usadel
technique employs the total Green’s function with three blocks labeled
Retarded ($R$), Advanced ($A$), and Keldysh ($K$). Using the labeled blocks,
the total Green’s function is represented bybergeret1 ;

$\hat{G}(\vec{r},\varepsilon,T)=\left(\begin{array}[]{cc}G^{A}&G^{K}\\\
\mathbf{0}&G^{R}\end{array}\right),\;G^{R}=\left(\begin{array}[]{cc}g^{R}&f^{R}\\\
-\tilde{f}^{R}&-\tilde{g}^{R}\end{array}\right).$ (1)

The propagators are position, $\vec{r}$, and temperature, $T$, dependent. The
quasiparticles’ energy is denoted by $\varepsilon$ and is measured from Fermi
level. In the equilibrium steady state, the advanced and Keldysh blocks can be
related via $G^{A}=-(\hat{\rho}_{3}G^{R}\hat{\rho}_{3})^{{\dagger}}$ and
$G^{K}=\tanh(\beta\varepsilon)(G^{R}-G^{A})$ in which $\hat{\rho}_{3}$ is the
third component of Pauli matrices
$\vec{\hat{\rho}}=(\hat{\rho}_{1},\hat{\rho}_{2},\hat{\rho}_{3})$ (see
Appendix) and $\beta=k_{B}T/2$, with $k_{B}$ the Boltzmann constant. In the
absence of a ferromagnetic exchange field, the total Green’s function reduces
to a $4\times 4$ propagator.bergeret1 ; efetov1  However, in the presence of a
general exchange field term, the total Green’s function becomes a $8\times 8$
matrix.rob2  In the regime in which proximity effects are small, we may expand
the Green’s function around the bulk solutionbergeret1
$\hat{G}_{0}=\text{diag}(1,-1)$, i.e. $\hat{G}\approx\hat{G}_{0}+\hat{f}$. In
this approximation we arrive at; Lofwander2 ; linder1 ; alidoust4

$\displaystyle\hat{G}^{A}=\begin{pmatrix}-1&0&-f^{R}_{\upuparrows}(-\varepsilon)&f^{R}_{-}(-\varepsilon)\\\
0&-1&f^{R}_{+}(-\varepsilon)&-f^{R}_{\downdownarrows}(-\varepsilon)\\\
[f^{R}_{\upuparrows}(\varepsilon)]^{\ast}&-[f^{R}_{-}(\varepsilon)]^{\ast}&1&0\\\
-[f^{R}_{+}(\varepsilon)]^{\ast}&[f^{R}_{\downdownarrows}(\varepsilon)]^{\ast}&0&1\\\
\end{pmatrix},$ (2)

in which the asterisk denotes complex conjugation. The arrays with
$\upuparrows$, and $\downdownarrows$ correspond to the spin-one (equal-spin)
components while those with $\pm$ represent the superconducting correlations
with zero spin (opposite-spin pairing).Lofwander2 ; efetov2

The general form of Usadel equation Usadel  (which can be derived from the
Eilenberger equation Eilenberger ) in the presence of an exchange field with
components $\vec{h}=(h_{x},h_{y},h_{z})$ in the ferromagnetic layers, and a
gap energy $\Delta$ associated with the $s$-wave superconducting region, can
be compactly expressed bymorten ,

$\displaystyle
D[\hat{\partial},\hat{G}[\hat{\partial},\hat{G}]]+i[\varepsilon\hat{\rho}_{3}-\hat{\Delta}+\text{diag}[\vec{h}\cdot\vec{\tau},(\vec{h}\cdot\vec{\tau})^{T}],\hat{G}]=0,$
(3)

where $T$ denotes transpose, $\hat{\rho}_{3}$ and $\vec{\tau}$ are $4\times 4$
and $2\times 2$ Pauli matrices, respectively. The matrices are defined in the
Nambu and spin spaces which are given in Appendix. Here $D$ is diffusive
constant of the highly impure medium and the brackets imply commuter
algebra.morten  The gradient operator is written shorthand as
$\hat{\partial}$, such that
$\hat{\partial}=(\partial_{x},\partial_{y},\partial_{z})$, which for our one
dimensional system reduces simply to $\partial_{x}$. Here $\hat{\Delta}$ is a
$4\times 4$ matrix that is defined as follows:morten

$\hat{\Delta}=\left(\begin{array}[]{cccc}0&0&0&\Delta\\\ 0&0&-\Delta&0\\\
0&\Delta^{\ast}&0&0\\\ -\Delta^{\ast}&0&0&0\end{array}\right).$ (4)

In the ferromagnet regions, the superconducting gap energy $\Delta$ in Eq.
(3), should be equal to zero while in the diffusive nonmagnetic
superconducting layers, the exchange energy $\vec{h}$ is set equal to zero.
The proximity effect that governs the interaction between the differing media
is accounted for by the appropriate boundary conditions at the junctions and
interfaces. To accurately model realistic barrier regions, we use Kupriyanov-
Lukichev boundary conditions at both $SF$ interfaces near the end of the
sample;cite:zaitsev

$\zeta(\hat{G}\hat{\partial}\hat{G})\cdot\vec{n}=[\hat{G}_{\text{BCS}}(\theta_{L,R}),\hat{G}],$
(5)

where $\vec{n}$ is a unit vector normal to the interface. The leakage of
correlations are governed by the parameter $\zeta$, which depends on the
resistance of the interface and the diffusive normal region.linder1 ;
alidoust3 ; alidoust4  The bulk solution,
$\hat{G}_{\text{BCS}}(\theta_{L,R})$, for an $s$-wave superconductor is;morten

$\displaystyle\hat{G}^{R}_{\text{BCS}}(\theta_{L,R})=$
$\displaystyle\left[\begin{array}[]{cc}\mathbf{1}\cosh(\vartheta_{L,R}(\varepsilon))&i\tau_{2}\sinh(\vartheta_{L,R}(\varepsilon))e^{i\theta_{L,R}}\\\
i\tau_{2}\sinh(\vartheta_{L,R}(\varepsilon))e^{-i\theta_{L,R}}&-\mathbf{1}\cosh(\vartheta_{L,R}(\varepsilon))\\\
\end{array}\right],$ (8)
$\vartheta_{L,R}(\varepsilon)=\text{arctanh}(\frac{\mid\Delta_{L,R}\mid}{\varepsilon}).$

We write $\Delta_{L,R}$ for the superconducting gap in the leftmost ($L$) and
rightmost ($R$) bulk superconductors. On the other hand, we assume that the
other interfaces are fully transparent (no insulating layer) for both
composite $SFS$ Josephson junction configurations.

The Usadel equation in the general form given above, involving the magnetic
exchange field with arbitrary orientation, leads to $8$ coupled complex
partial differential equations, even in the low proximity limit where the
equations can be linearized. It should be reiterated in passing that the
interaction between inhomogeneous ferromagnets and $s$-wave superconductors
leads to triplet correlations with nonzero projection along the spin
quantization axis.bergeret1  Therefore, we may assume that the Green’s
function describing such systems can be considered as a summation of singlet
($\mathbb{S}$) and triplet ($\vec{\mathbb{T}}$) components (spin
parameterization).bergeret1 ; Lofwander2  We thus write Lofwander2 ; efetov2 :

$\displaystyle\hat{f}(\varepsilon)=i(\mathbb{S}(\varepsilon)+\vec{\mathbb{T}}(\varepsilon).\vec{\tau})\tau_{y},$
(9)

where $\vec{\tau}=(\tau_{x},\tau_{y},\tau_{z})$ is a vector comprised of Pauli
matrices. If we now substitute this decomposition of the anomalous Green’s
function into the Usadel equation Eq. (3), we end up with the following
coupled set of differential equations:

$\displaystyle
D\left\\{\mp\partial_{x}^{2}\mathbb{T}_{x}(-\varepsilon)+i\partial_{x}^{2}\mathbb{T}_{y}(-\varepsilon)\right\\}+i\left\\{-2\varepsilon(\mp\mathbb{T}_{x}(-\varepsilon)+i\mathbb{T}_{y}(-\varepsilon))\mp
2\mathbb{S}(-\varepsilon)(h_{x}\mp ih_{y})\right\\}=0,$ (10) $\displaystyle
D\left\\{\mp\partial_{x}^{2}\mathbb{S}(-\varepsilon)+\partial_{x}^{2}\mathbb{T}_{z}(-\varepsilon)\right\\}+i\left\\{\mp
2\mathbb{T}_{x}(-\varepsilon)h_{x}\mp
2\mathbb{T}_{y}(-\varepsilon)h_{y}-2(\mp\mathbb{S}(-\varepsilon)+\mathbb{T}_{z}(-\varepsilon))(\varepsilon\pm
h_{z})\right\\}=\pm 2i\Delta_{M}e^{i\theta_{M}},$ (11) $\displaystyle
D\left\\{\mp\partial_{x}^{2}\mathbb{T}_{x}^{\ast}(\varepsilon)-i\partial_{x}^{2}\mathbb{T}_{y}^{\ast}(\varepsilon)\right\\}+i\left\\{\pm
2(h_{x}\pm
ih_{y})\mathbb{S}^{\ast}(\varepsilon)-2\varepsilon(\mp\mathbb{T}_{x}^{\ast}(\varepsilon)-i\mathbb{T}_{y}^{\ast}(\varepsilon))\right\\}=0,$
(12) $\displaystyle
D\left\\{\mp\partial_{x}^{2}\mathbb{S}^{\ast}(\varepsilon)+\partial_{x}^{2}\mathbb{T}_{z}^{\ast}(\varepsilon)\right\\}+i\left\\{2(-\varepsilon\pm
h_{z})(\mp\mathbb{S}^{\ast}(\varepsilon)+\mathbb{T}_{z}^{\ast}(\varepsilon))\pm
2h_{x}\mathbb{T}_{x}^{\ast}(\varepsilon)\pm
2h_{y}\mathbb{T}_{y}^{\ast}(\varepsilon)\right\\}=\mp
2i\Delta_{M}e^{-i\theta_{M}}.$ (13)

Since we need to solve the Usadel equations in the central $S$ layer, we
denote the superconducting gap in this region by $\Delta_{M}$, with
macroscopic phase $\theta_{M}$. If the decomposition in Eq. (9) is substituted
into the Kupriyanov-Lukichev boundary conditions (Eq. (5)), the following
differential equations must be satisfied at the left $SF$ interface:alidoust4

$\displaystyle(\zeta\partial_{x}-c^{\ast}(\varepsilon))(\mp\mathbb{T}_{x}(-\varepsilon)+i\mathbb{T}_{y}(-\varepsilon))=0,$
(14)
$\displaystyle(\zeta\partial_{x}-c^{\ast}(\varepsilon))(\mp\mathbb{S}(-\varepsilon)+\mathbb{T}_{z}(-\varepsilon))=\mp
s^{\ast}(\varepsilon),$ (15)
$\displaystyle(\zeta\partial_{x}-c^{\ast}(\varepsilon))(\mp\mathbb{T}_{x}^{\ast}(\varepsilon)-i\mathbb{T}_{y}^{\ast}(\varepsilon))=0,$
(16)
$\displaystyle(\zeta\partial_{x}-c^{\ast}(\varepsilon))(\mp\mathbb{S}^{\ast}(\varepsilon)+\mathbb{T}_{z}^{\ast}(\varepsilon))=\pm
s^{\ast}(\varepsilon).$ (17)

Here we define the following expressions for $s(\varepsilon)$ and
$c(\varepsilon)$,bergeret1 ; buzdin1 ; morten

$\displaystyle
s(\varepsilon)=\frac{-\Delta\text{sgn}(\varepsilon)\Theta(\varepsilon^{2}-\Delta^{2})}{\sqrt{\varepsilon^{2}-\Delta^{2}}}+\frac{i\Delta\Theta(\Delta^{2}-\varepsilon^{2})}{\sqrt{\Delta^{2}-\varepsilon^{2}}},$
(18) $\displaystyle
c(\varepsilon)=\frac{\mid\varepsilon\mid\Theta(\varepsilon^{2}-\Delta^{2})}{\sqrt{\varepsilon^{2}-\Delta^{2}}}-\frac{i\varepsilon\Theta(\Delta^{2}-\varepsilon^{2})}{\sqrt{\Delta^{2}-\varepsilon^{2}}},$
(19)

in which $\Theta(x)$ represents a step-function. Likewise, performing the same
decomposition for the right $FS$ interface and assuming that both outer
superconducting terminals have equal superconducting gaps
$\Delta_{L}=\Delta_{R}=\Delta$, the Kupriyanov-Lukichev boundary conditions
become:alidoust4

$\displaystyle(\zeta\partial_{x}+c^{\ast}(\varepsilon))(\mp\mathbb{T}_{x}(-\varepsilon)+i\mathbb{T}_{y}(-\varepsilon))=0,$
(20)
$\displaystyle(\zeta\partial_{x}+c^{\ast}(\varepsilon))(\mp\mathbb{S}(-\varepsilon)+\mathbb{T}_{z}(-\varepsilon))=\pm
s^{\ast}(\varepsilon),$ (21)
$\displaystyle(\zeta\partial_{x}+c^{\ast}(\varepsilon))(\mp\mathbb{T}_{x}^{\ast}(\varepsilon)-i\mathbb{T}_{y}^{\ast}(\varepsilon))=0,$
(22)
$\displaystyle(\zeta\partial_{x}+c^{\ast}(\varepsilon))(\mp\mathbb{S}^{\ast}(\varepsilon)+\mathbb{T}_{z}^{\ast}(\varepsilon))=\mp
s^{\ast}(\varepsilon).$ (23)

To investigate the system, the transformed coupled differential equations and
associated boundary conditions must be solved using geometrical and material
parameters that are experimentally appropriate. Unfortunately, this
complicated system of coupled differential equations can be simplified and
decoupled for only a limited range of parameters and configurations. When such
simplifications are possible, the equations have the advantage that sometimes
they can lead to analytical results. However, for our complicated multilayer
configurations, numerical methods are the most efficient and sometimes the
only possible routes to investigate the relevant transport properties.

One of the most important physical quantities related to transport is the
supercurrent that is generated from the macroscopic phase differences between
superconducting terminals separated by a ferromagnet.

Figure 2:  (Color online) Total critical supercurrent ($I_{tot}$), singlet
($I_{S0}$), and odd-frequency ($I_{Sy}$, $I_{Sz}$) components of the Josephson
$SFSFS$ structure. The current and the average of its components are shown as
a function of exchange field orientation, $\beta_{2}$ (see Fig. 1). The
averages are taken over the labeled magnetic regions. In the top row we assume
$d_{F1}=d_{F2}=0.4\xi_{S}$, and $d_{S}=0.2\xi_{S}$. While in the bottom row
$d_{F1}=0.4\xi_{S}$, $d_{F2}=0.7\xi_{S}$, and the thickness of middle
superconducting lead is kept unchanged. We set the superconducting phase of
the left, and middle superconductors to be $\theta_{L}=\theta_{M}=0$ and
$\theta_{R}=\pi/2$ (corresponding to the maximum supercurrent in this case,
see text), respectively.

To determine the charge supercurrent, we consider the general expression for
the charge current density in the steady state. This involves the Keldysh
component of total Green’s function via,morten ; bergeret1 ; efetov2

$J_{x}\text{(}x\text{)}=J_{0}\int
d\varepsilon\text{Tr}\\{\hat{\rho}_{3}(\hat{G}[\hat{\partial},\hat{G}])^{K}\\}.$
(24)

Here $J_{0}$ is a normalization constant equal to $eN_{0}D/8$ in which $e$ is
the electron charge and $N_{0}$ is the density of states of a normal metal at
the Fermi surface. To derive a tractable expression for the charge
supercurrent density, the Advanced and Keldysh blocks of the Green’s function
are obtained from the previously mentioned relations above that relate the
$A$, $R$, and $K$ blocks stemming from Eq. (9). We assume that the current is
flowing along the $x$ axis, normal to the interfaces located in the $yz$ plane
(see Fig. 1). After some lengthy calculations, we arrive at the current
density:

$\displaystyle J(x)=J_{0}\int_{-\infty}^{\infty}d\varepsilon\left\\{\right.$
$\displaystyle\left.\mathbb{S}(\varepsilon)\partial_{x}\mathbb{S}^{\ast}(-\varepsilon)-\mathbb{S}(-\varepsilon)\partial_{x}\mathbb{S}^{\ast}(\varepsilon)+\mathbb{S}(\varepsilon)^{\ast}\partial_{x}\mathbb{S}(-\varepsilon)-\right.$
$\displaystyle\left.\mathbb{S}(-\varepsilon)^{\ast}\partial_{x}\mathbb{S}(\varepsilon)-\partial_{x}\mathbb{T}_{x}(-\varepsilon)\mathbb{T}_{x}^{\ast}(\varepsilon)+\partial_{x}\mathbb{T}_{x}(\varepsilon)\mathbb{T}_{x}^{\ast}(-\varepsilon)-\right.$
$\displaystyle\left.\partial_{x}\mathbb{T}_{x}^{\ast}(-\varepsilon)\mathbb{T}_{x}(\varepsilon)+\partial_{x}\mathbb{T}_{x}^{\ast}(\varepsilon)\mathbb{T}_{x}(-\varepsilon)-\partial_{x}\mathbb{T}_{y}(-\varepsilon)\mathbb{T}_{y}^{\ast}(\varepsilon)+\right.$
$\displaystyle\left.\partial_{x}\mathbb{T}_{y}(\varepsilon)\mathbb{T}_{y}^{\ast}(-\varepsilon)-\partial_{x}\mathbb{T}_{y}^{\ast}(-\varepsilon)\mathbb{T}_{y}(\varepsilon)+\partial_{x}\mathbb{T}_{y}^{\ast}(\varepsilon)\mathbb{T}_{y}(-\varepsilon)-\right.$
$\displaystyle\left.\partial_{x}\mathbb{T}_{z}(-\varepsilon)\mathbb{T}_{z}^{\ast}(\varepsilon)+\partial_{x}\mathbb{T}_{z}(\varepsilon)\mathbb{T}_{z}^{\ast}(-\varepsilon)-\partial_{x}\mathbb{T}_{z}^{\ast}(-\varepsilon)\mathbb{T}_{z}(\varepsilon)+\right.$
$\displaystyle\left.\partial_{x}\mathbb{T}_{z}^{\ast}(\varepsilon)\mathbb{T}_{z}(-\varepsilon)\right\\}\tanh(\varepsilon\beta/2).$
(25)

As can be seen, the integration covers the entire quasiparticle energy
spectrum. To obtain the charge supercurrent, it is necessary to integrate the
current density along $y$ over the junction width $W$. Since we assume that
our system is translationally invariant along the $y$ direction, the current
density must of course also be $y$-independent. It is convenient then in the
results that follow, to normalize the supercurrent, $I(x)$, by $I_{0}\equiv
WJ_{0}$. Having now outlined our general method and numerical approach, we
proceed to present our numerical results and study the supercurrent for
particular cases of $SFSFS$ and $SFSFFS$ Josephson junctions.

##  III Results

In presenting our numerical results, we decompose the general charge
supercurrent density [Eq. (II)] into each of its four components. The
associated supercurrent subsequently has the components,

$\displaystyle
I_{S0}(x)=I_{0}\int_{-\infty}^{\infty}d\varepsilon\left\\{\mathbb{S}(\varepsilon)\partial_{x}\mathbb{S}^{\ast}(-\varepsilon)-\mathbb{S}(-\varepsilon)\partial_{x}\mathbb{S}^{\ast}(\varepsilon)+\right.$
$\displaystyle\left.\mathbb{S}^{\ast}(\varepsilon)\partial_{x}\mathbb{S}(-\varepsilon)-\mathbb{S}^{\ast}(-\varepsilon)\partial_{x}\mathbb{S}(\varepsilon)\right\\}\tanh(\varepsilon\beta/2),$
(26) $\displaystyle
I_{Sx}(x)=I_{0}\int_{-\infty}^{\infty}d\varepsilon\left\\{-\partial_{x}\mathbb{T}_{x}(-\varepsilon)\mathbb{T}_{x}^{\ast}(\varepsilon)+\partial_{x}\mathbb{T}_{x}(\varepsilon)\mathbb{T}_{x}^{\ast}(-\varepsilon)\right.$
$\displaystyle\left.-\partial_{x}\mathbb{T}_{x}^{\ast}(-\varepsilon)\mathbb{T}_{x}(\varepsilon)+\partial_{x}\mathbb{T}_{x}^{\ast}(\varepsilon)\mathbb{T}_{x}(-\varepsilon)\right\\}\tanh(\varepsilon\beta/2),$
(27) $\displaystyle
I_{Sy}(x)=I_{0}\int_{-\infty}^{\infty}d\varepsilon\left\\{-\partial_{x}\mathbb{T}_{y}(-\varepsilon)\mathbb{T}_{y}^{\ast}(\varepsilon)+\partial_{x}\mathbb{T}_{y}(\varepsilon)\mathbb{T}_{y}^{\ast}(-\varepsilon)\right.$
$\displaystyle\left.-\partial_{x}\mathbb{T}_{y}^{\ast}(-\varepsilon)\mathbb{T}_{y}(\varepsilon)+\partial_{x}\mathbb{T}_{y}^{\ast}(\varepsilon)\mathbb{T}_{y}(-\varepsilon)\right\\}\tanh(\varepsilon\beta/2),$
(28) $\displaystyle
I_{Sz}(x)=I_{0}\int_{-\infty}^{\infty}d\varepsilon\left\\{\partial_{x}\mathbb{T}_{z}(-\varepsilon)\mathbb{T}_{z}^{\ast}(\varepsilon)+\partial_{x}\mathbb{T}_{z}(\varepsilon)\mathbb{T}_{z}^{\ast}(-\varepsilon)\right.$
$\displaystyle\left.-\partial_{x}\mathbb{T}_{z}^{\ast}(-\varepsilon)\mathbb{T}_{z}(\varepsilon)+\partial_{x}\mathbb{T}_{z}^{\ast}(\varepsilon)\mathbb{T}_{z}(-\varepsilon)\right\\}\tanh(\varepsilon\beta/2).$
(29)

The total charge current, $I_{tot}(x)$, is thus the sum,

$I_{tot}(x)=I_{S0}(x)+I_{Sx}(x)+I_{Sy}(x)+I_{Sz}(x),$ (30)

where $I_{S0}$ denotes the singlet supercurrent component. We take the axis of
spin quantization to lie along the $z$ direction throughout the whole system,
and thus the components $I_{Sx}$, $I_{Sy}$, represent the equal-spin triplet
components with total spin projection of $m=\pm 1$ on the axis of spin
quantization, while $I_{Sz}$, corresponds to opposite spin triplets with
$m=0$, and a total spin projection of zero.bergeret1 ; eschrigh3 ; efetov1 ;
efetov2 ; linder1  The decomposition of the supercurrent into the singlet and
triplet components can also serve to identify the long range contributions to
the supercurrent.eschrigh3 ; efetov2 ; linder1 ; alidoust4

To begin, we first consider the simpler $SFSFS$ junction (Fig. 1, part $i)$).
We assume the far left $SF$ interface is located at $x=0$ and all interfaces
reside in the $yz$ plane. The thickness of $F_{1}$, $F_{2}$, and the middle
superconducting lead are denoted by $d_{F1}$, $d_{F2}$, and $d_{S}$,
respectively. Our theoretical framework permits each $F$ layer to possess a
general exchange field with arbitrary orientation,
$\vec{h}_{1,2}=h_{0}(\cos\gamma_{1,2}\sin\beta_{1,2},\sin\gamma_{1,2}\sin\beta_{1,2},\cos\beta_{1,2})$.
To study concrete examples, we consider systems with in-plane magnetization
orientations where $\gamma_{1,2}=0$, and thus rotation occurs in the $yz$
plane. This also implies that $\beta_{1}$ and $\beta_{2}$ fully characterize
the magnetization orientations of $F_{1}$ and $F_{2}$, respectively, as
illustrated in Fig. 1. The magnetization orientation of $F_{1}$ is assumed
fixed in the $z$ direction ($\beta_{1}=0$), while the magnetization in $F_{2}$
rotates with angle $\beta_{2}$. We assume that the proximity effects related
to the flow of spin-polarized supercurrent into the ferromagnetic regions has
a negligible effect on their respective magnetizations.pugach1  This
assumption is frequently used in most of the theoretical works on the
ferromagnetic multilayer Josephson configurations.buzdin1 ; bergeret1  As
mentioned above, we also assume the macroscopic phases of the three
superconducting leads (left, middle, and right), $\theta_{L}$, $\theta_{M}$,
$\theta_{R}$, are controlled externally.pugach1  Throughout our calculations,
we consider a low temperature of $T=0.05T_{c}$, and a ferromagnetic strength
given by the exchange field magnitude $|\vec{h}_{1,2}|=h_{0}=10\Delta_{0}$.
Here $T_{c}$ is the superconducting critical temperature and $\Delta_{0}$ is
the superconducting gap at zero temperature, also we set $k_{B}=\hbar=1$. In
this paper, all energies are normalized by $\Delta_{0}$ while lengths are
normalized by $\xi_{S}$, the superconducting coherence length. Since we have
considered the low proximity tunneling limit in the diffusive regime, the
interface transparencies affect the strength of the leakage of superconducting
proximity correlations. In our actual calculations we have set $\zeta=4$ which
is consistent with the low proximity limit.

Figure 3:  (Color online) The Josephson current and its components (singlet
($I_{S0}$) and odd-frequency triplet ($I_{Sy,z}$)) vs position in an $SFSFS$
junction for four values of the superconducting phase in the right terminal:
$\theta_{R}=$ $\pi/8$, $\pi/4$, $3\pi/8$, $\pi/2$. We set $d_{F1}=0.4\xi_{S}$,
$d_{F2}=0.7\xi_{S}$, $d_{S}=0.2\xi_{S}$, and $\theta_{L}=\theta_{M}=0$. The
top row represents results where $\beta_{2}=\pi/8$ while the bottom row shows
results for $\beta_{2}=7\pi/8$. Throughout the paper we assume the exchange
field direction in $F_{1}$ is oriented in the $z$ direction, so that
$\beta_{1}=0$. Different magnetic and superconducting regions are separated by
vertical lines and marked by $F_{1}$, $F_{2}$, and $S$.

We first discuss the current phase relations, which are important for
determining the experimentally relevant critical current, and the fundamental
nature of resistanceless transport through junctions. When permissible, exact
analytical current phase relationships can reveal more about the fundamental
physics involved, and the important role of phase-coherent transport in
Josephson junctions for practical device development. Also, since we have
considered the low proximity limit in the diffusive regime, higher order
harmonics are washed out. buzdin1  As mentioned in passing, exact analytical
expressions are generally impossible in the types of systems considered here
due to the complicated complex partial differential equations involved.
Nonetheless, we were still able to extract simple current-phase relations from
the full numerical results. We found that if the thickness of the middle
superconductor is sufficiently thin, the coupling between the two outer
superconductors results in supercurrent flow in the magnetic regions that
obeys sinusoidal current-phase relations involving combinations of the three
superconducting phases. Our numerical investigations have found that for our
regimes of interest, the current phase relation in $F_{1}$ region obeys;

$I_{L}=I_{1}\sin\varphi_{LR}+I_{2}\sin\varphi_{LM}+I_{3}\sin\varphi_{RM}\sin\varphi_{LM},$
(31)

where $\varphi_{LR}=\theta_{L}-\theta_{R}$,
$\varphi_{LM}=\theta_{L}-\theta_{M}$, and
$\varphi_{RM}=\theta_{R}-\theta_{M}$. Here $I_{1,2,3}$ are constants which in
general depend on geometry ($d_{F1}$, $d_{F2}$, $d_{S}$), temperature $T$,
exchange fields $\vec{h}_{1,2}$, and interface transparencies $\zeta$. In
determining the current-phase relation above, several systematic
investigations were numerically performed involving the macroscopic phases in
each of the three terminals. Of the three phases, $\theta_{R}$, $\theta_{L}$,
and $\theta_{M}$, the supercurrent is calculated by varying one phase, e.g.,
$\theta_{R}$, while the other two are kept fixed. This process is repeated for
several differing fixed phases (say, $\theta_{L}$ and $\theta_{M}$). This
procedure also reveals the precise form of the coefficients $I_{1,2,3}$, which
generally vary as the system parameters change. Below we present concrete
examples that illustrate the relevant terms in the current-phase relation of
Eq. (31). Unless otherwise noted, we set $\theta_{L}=\theta_{M}=0$ and
numerically vary $\theta_{R}$. The precise nature of supercurrent transport in
our three-terminal spin switch hinges crucially on not only the phase of the
central $S$ layer, but also its width. The geometrical effects of the central
$S$ layer can be seen in the limit of large $d_{S}$ ($d_{S}\gg\xi_{S}$) where
we find $I_{L}=0$. This can be understood by noting that since
$\varphi_{LM}=0$, we have $I_{L}=I_{1}\sin\varphi_{LR}$. Consequently for
large $d_{S}$, the tunneling of quasiparticles through the middle $S$ region
is highly suppressed, giving $I_{1}=0\Rightarrow I_{L}=0$. For middle layers
that are moderately thick (on the order of a few $\xi_{S}$), the last term in
Eq. (31) implies (for $\varphi_{LM},\varphi_{RM}\neq 0$) the two outer
superconducting terminals are not entirely isolated from one another however.
The effects of this coupling-term will be discussed in more detail below.
Although we consider three superconducting terminals in serial, our findings
are consistent with Ref. alidoust2,  where a cross diffusive ferromagnetic
four-terminal Josephson transistor is studied. We have found that the
sinusoidal relations are generally valid for the supercurrent when the
relative magnetizations of the $F$ layers are non-collinear. The relations
(Eq. (31)) can thus be considered guides in determining phase differences that
lead to optimal current flow. One such possibility involves the choice of
$\theta_{R}=\pi/2$, which according to the sinusoidal relations, corresponds
to maximum supercurrent flow, or equivalently the critical current, for the
case when $\theta_{L}=\theta_{M}=0$, and where the middle $S$ is sufficiently
thin ($I_{1}\neq 0$, see Fig. 2). In other words, the critical current in a
moderately thin middle $S$ electrode and fixed $\theta_{L}=\theta_{M}=0$
occurs at $\theta_{R}=\pi/2$. We discuss below the benefits of situations
where $\theta_{L}\neq\theta_{M}$.

Figure 2 exhibits the total Josephson current and its spatially averaged
components through both ferromagnetic regions of the $SFSFS$ system (Fig. 1
$i)$), versus magnetization orientation of $F_{2}$ layer. We assume the
magnetization orientation of $F_{1}$ is fixed along the $z$ axis (spin
quantization axis) while the exchange field in $F_{2}$ makes an angle
$\beta_{2}$ with the $z$ axis in the $yz$ plane. This leads to vanishing
$\mathbb{T}_{x}$, and $\mathbb{T}_{y}$ components of the Green’s function in
$F_{1}$. As discussed earlier, the macroscopic phase of the left and middle
superconducting leads are $\theta_{L}=\theta_{M}=0$ while $\theta_{R}=\pi/2$.
The top row of the figure corresponds to equal-thickness magnets, with
$d_{F1}=d_{F2}=0.4\xi_{S}$, whereas the bottom row is for the same parameter
set except now $d_{F1}=0.4\xi_{S}$ and $d_{F2}=0.7\xi_{S}$. In both cases, we
consider a rather thin $S$ lead namely, $d_{S}=0.2\xi_{S}$. As can be seen,
the total current in both $F_{1}$ and $F_{2}$ depends on the magnetization
rotation of $F_{2}$. In the top row, the supercurrent in both $F_{1}$ and
$F_{2}$ behave similarly. The current is positive when the relative
magnetizations are in the parallel state ($\beta_{2}=0$), and then the current
changes direction in the $F_{1}$ layer after $\beta_{2}=\pi/2$, corresponding
to perpendicular relative magnetization directions, and transition to a $\pi$
state. Turning now to the individual components of the supercurrent, we see
from the top panel of Fig. 2 that the singlet contribution, $I_{S0}$, follows
some similar trends as the total current, but with different magnitudes. The
average behavior of $I_{S0}$ over the $F$ regions are shown to both vanish at
the same $\beta_{2}$, indicating that the singlet part of the total
supercurrent changes sign within the magnets. The possible spin-polarization
effects due to the magnetization misalignment of the two $F$ layers is
revealed in the odd-frequency triplet contributions, $I_{Sy}$, and $I_{Sz}$.
The plots clearly demonstrate that the spin-1 projection of the triplet
current, $I_{Sy}$, peaks in $F_{2}$ when the relative magnetizations are
nearly orthogonal ($\beta_{2}\approx\pi/2$), corresponding to nearly complete
magnetization alignment along $y$. The $I_{Sy}$ component meanwhile vanishes
in $F_{1}$ as expected since the magnetization is aligned with the $z$
quantization axis. The odd-frequency component, $I_{Sz}$, is typically finite
in both magnets, possessing its largest value when their relative
magnetizations are aligned along $z$. There is no average current flow when
the relative magnetizations are approximately orthogonal ($\beta_{2}=\pi/2$).
Therefore, the device may also be viewed as a charge supercurrent switch
controlled by magnetization orientation.

The bottom set of panels demonstrate that for differing $F$ layer thicknesses
the magnetization rotation can render one part of the system to be in a
$0$-state and the other to be in the $\pi$ state. This suggests a $0$-$\pi$
spin switch that can arise by simply rotating the magnetization orientation in
one of the ferromagnetic layers. Since $h_{x}=h_{y}=0$ in $F_{1}$, we have the
$\mathbb{T}_{x}$ and $\mathbb{T}_{y}$ contributions to the supercurrent
vanishing (see Eq. (II)). This is consequently also observed in the averaged
equal-spin triplet current, $I_{Sy}(x)$. Note that we do not consider
magnetizations out of plane, and therefore $I_{Sx}(x)$ necessarily vanishes
throughout the system. To pinpoint the precise behavior of the total
supercurrent and its spatially averaged triplet components, it is insightful
to study their explicit spatial dependence.

In Fig. 3, we therefore illustrate the total charge supercurrent and its
components as a function of position inside the three-terminal junction. Two
representative angles $\beta_{2}=$ $\pi/8$ and $7\pi/8$ are chosen, and four
different phases of the right superconductor, $\theta_{R}$, are considered:
$\pi/8$, $\pi/4$, $3\pi/8$, and $\pi/2$. The total current is piecewise
constant in each non-superconducting region, reflecting local charge
conservation. The central $S$ region, however, acts as an external source of
Cooper pairs, and thus the charge current in that region will acquire a
position-dependence profile. This can be verified by considering the second
set of panels from the left in Fig. 3, which depict the singlet contribution,
$I_{S0}(x)$, as a function of position. The outer $s$-wave superconducting
leads combined with the inhomogeneous magnetization provided by the two $F$
layers, induces odd-frequency triplet correlations that naturally are
location-dependent as well. This is observed in the other remaining panels.
The middle $S$ layer is void of any equal-spin, odd-frequency triplet
correlations ($I_{Sy}$), but is populated with triplet $I_{Sz}$
superconducting correlations that clearly depend on $\beta_{2}$ and
$\theta_{R}$. Examining the panels of Fig. 3, it is seen that the odd-
frequency triplet component with nonzero spin projection, $I_{Sy}(x)$,
vanishes in $S$. This is in contrast to the $I_{Sz}(x)$ contribution, which is
constant inside the middle $S$ terminal and equal to its value at the $S/F$
interface. Thus within the middle $S$ lead, the nondecaying odd-frequency
triplet component, $I_{Sz}$, and the singlet component, $I_{S0}$, have a
direct influence on supercurrent control. For this reason, within the $F_{1}$
region, the net supercurrent flow is seen to be due to the competition solely
between $I_{S0}$ and $I_{Sz}$ (since $I_{Sy}$ vanishes there), and which
sometimes are oppositely directed. Magnetization rotation in $F_{2}$ can thus
result in total supercurrent flow there that is opposite to that of $F_{1}$.
Consequently the system resides in a composite $0$\- and $\pi$-state. Since
the supercurrent is conserved inside the non-superconducting regions, this
also implies that within the central $S$ layer itself, the total supercurrent
must undergo a reversal in direction.

Figure 4:  (Color online) Total maximum supercurrent in each $F$ region
against $\beta_{2}$, the magnetization orientation of $F_{2}$ in $SFSFS$
junction. Also, the magnetization in $F_{1}$ is fixed along the $z$ axis,
i.e., $\beta_{1}=0$. Here a thick middle $S$ terminal is considered with
$d_{S}=4.0\xi_{S}$ corresponding to several tens of nanometers and
$d_{F1}=0.4\xi_{S}$, $d_{F2}=0.7\xi_{S}$. (a) the macroscopic phase of the
middle $S$ terminal is fixed at $\theta_{M}=\pi/4$ while in (b) this quantity
is set to zero, $\theta_{M}=0$. In both cases, the macroscopic phase of the
left superconducting terminal is $\theta_{L}=0$ while $\theta_{R}$ varies in
order to find the maximum supercurrent.

As mentioned above, for large middle $S$ layer widths, $d_{S}$, and
$\theta_{L}-\theta_{M}=0$, the outer $S$ terminals should generally become
decoupled, making it impossible to manipulate the current flowing in $F_{1}$
via magnetization rotation in $F_{2}$. By externally tuning the macroscopic
phase of the middle $S$ layer however, the total maximum charge current in
$F_{1}$ can now be controlled by the rotation of magnetization in $F_{2}$.
This is illustrated in Fig. 4, where the total current in each magnetic region
of a $SFSFS$ structure is plotted versus the magnetization orientation of
$F_{2}$ layer, $\beta_{2}$. As before, the magnetization of $F_{1}$ is fixed
along the $z$ axis, i.e., $\beta_{1}=0$. The thicknesses of the $F$ layers are
$d_{F1}=0.4\xi_{S}$, and $d_{F2}=0.7\xi_{S}$, while a relatively thick middle
$S$ layer is set to $d_{S}=4.0\xi_{S}$. This choice of $d_{S}$ permits an
analysis of the coupling and supercurrent roles of the middle $S$ terminal.
The superconducting phase of the left $S$ terminal is fixed at $\theta_{L}=0$,
whereas $\theta_{R}$ varies over $[0,2\pi]$ to determine the maximum
supercurrent flow. In Fig. 4(a), the macroscopic phase of the middle $S$
terminal is equal to $\theta_{M}=\pi/4$. As seen there, the supercurrent in
$F_{2}$ is insensitive to magnetization direction, $\beta_{2}$. This is
consistent with the fact that charge supercurrent in a single $SFS$ junction
must be constant and independent of magnetization rotation. This is contrary
to the supercurrent behavior in $F_{1}$, where variations are shown as the
magnetization vector rotates. In a way similar to what was observed in Fig. 3,
the odd-frequency triplet current in $F_{2}$ is partially propagated through
the middle $S$ electrode into $F_{1}$. The transport of these superconducting
correlations into $F_{1}$ constitute a coupling mechanism between the outer
$S$ banks. Therefore, the odd-frequency triplet correlations and even-
frequency singlet correlations together result in changes to the supercurrent
in $F_{1}$ by magnetization rotation of $F_{2}$.

Figure 5:  (Color online) (a) Supercurrent in a $SFSFFS$ junction where
$\beta_{1}=0$, $\beta_{2}=\pi$, and $\beta_{3}$ is varied. The geometrical
parameters correspond to $d_{S}=0.2\xi_{S}$, $d_{F1}=0.4\xi_{S}$, and
$d_{F2}=d_{F3}=0.3\xi_{S}$. (b) Josephson current in the same structure with
the same magnetization orientation, but now with $d_{F2}=0.45\xi_{S}$,
$d_{F3}=0.15\xi_{S}$, and unchanged $d_{S}$. As done previously, we set
$\theta_{L}=\theta_{M}=0$ and $\theta_{R}=\pi/2$. The supercurrent is
conserved within each magnetic layer (see Figs. 1 and 3). Thus the current is
the same in the double ferromagnet regions as clearly seen in Fig. 6.  Figure
6:  (Color online) $SFSFFS$ junction (see Fig. 1). The spatial profiles of the
Josephson supercurrent and its components (singlet ($I_{S0}$) and odd-
frequency triplet ($I_{Sy,z}$)). The two magnetizations in $F_{1}$ and $F_{2}$
are fixed in an antiparallel configuration ($\beta_{1}=0$, $\beta_{2}=\pi$)
and three different magnetic orientations, $\beta_{3}$, are considered for
$F_{3}$. The macroscopic phases, as before, are set to
$\theta_{L}=\theta_{M}=0$ and $\theta_{R}=\pi/2$. In all cases, the width of
$F_{1}$ and middle $S$ electrode are fixed at $d_{F1}=0.4\xi_{S}$ and
$d_{S}=0.2\xi_{S}$, respectively. The other geometrical parameters correspond
to (a) top row: $d_{F2}=d_{F3}=0.3\xi_{S}$, and (b) bottom row:
$d_{F2}=0.45\xi_{S}$, $d_{F3}=0.15\xi_{S}$. The vertical lines identify the
interfaces of the junction among the magnetic and superconducting regions
labeled by $F_{1}$, $F_{2}$, $F_{3}$ and $S$, respectively.

In Fig. 4(b) we further explore the proximity effects related to the width of
the middle $S$ terminal, where it now has a phase of zero ($\theta_{M}=0$). It
is evident that the total critical supercurrent in $F_{2}$ is non-zero and
constant for all values of magnetization orientations, due to the nonzero
phase difference between the middle and right $S$ terminals. However, the
supercurrent in $F_{1}$ vanishes despite a phase difference between the outer
$S$ terminals. This clearly demonstrates that for sufficiently thick middle
$S$ terminals and proper choice of phase differences, the outer $S$ electrodes
can become decoupled. We may summarize our results using Eq. (31) in the
following way: For a supercurrent in $F_{1}$ and thick middle $S$ layer,
$d_{S}\gg\xi_{S}$, we have, $I_{1}\rightarrow 0$. If we set then
$\varphi_{LM}=0$, no current flows through $F_{1}$ (see Fig. 4(b)). For the
case of a thin middle $S$ layer, and $\varphi_{LM}=0$, the first term in Eq.
(31) demonstrates that the magnitude of the supercurrent in $F_{1}$ is largest
when $|\theta_{L}-\theta_{R}|=\pi/2$, in accordance with Fig. 2. When
$\theta_{R}-\theta_{M}\neq 0$, and $\theta_{L}-\theta_{M}\neq 0$, the third
term in Eq. (31) contributes to the generation of supercurrent (in addition to
the non-zero second term). Interestingly, this coupling term involves the
product of $\sin\varphi_{RM}$ and $\sin\varphi_{LM}$, which for our
parameters, and $S$ layers a few $\xi_{S}$ thick, is the dominant term in Eq.
(31). In this case, the coupling term reveals itself only in $F_{1}$ where
there is a negative phase gradient, from right to left (see Fig. 4(a)). Thus,
one may conclude that, e.g., if we set $\theta_{L}<\theta_{M}<\theta_{R}$, the
middle $S$ layer mediates supercurrent flow through $F_{1}$ via magnetization
rotation in $F_{2}$.

It is important to note that we have directly solved the Usadel equations
(Eqs. (10)) in the $F$ regions and the middle $S$ electrode together with
appropriate boundary conditions Eqs. (14) and (20). This way, we match the
Green’s function at the interfaces and thus the interaction of adjacent $F$
regions for relatively thin middle $S$ electrodes can be fully accounted for.
If on the other hand, one uses the bulk solution given by Eq. (II) for the
middle $S$ electrode instead of solving the appropriate equations, the middle
$S$ region prohibits any transport between the adjacent $F$ regions similar to
the $d_{S}\gg\xi_{S}$ regime discussed earlier.

We now introduce additional magnetic inhomogeneity into the system by
considering a more complicated $SFSFFS$ structure as shown in part $ii)$ of
Fig. 1. The maximum value of the total charge current is shown in Fig. 5 over
two regions: The $F_{1}$ region, and the $F_{2}$$/$$F_{3}$ double layer. Here
the geometrical parameters correspond to $d_{F2}=d_{F3}=0.3\xi_{S}$ (panel
(a)) and $d_{F2}=0.45\xi_{S},d_{F3}=0.15\xi_{S}$ (panel (b)). In both cases,
$d_{F1}=0.4\xi_{S}$, and $d_{S}=0.2\xi_{S}$ (this value of $d_{S}$ is
correspond to the thin middle $S$ electrode discussed earlier). We also set
the phases, $\theta_{L}=\theta_{M}=0$, and $\theta_{R}=\pi/2$. We vary the
magnetization of the $F_{3}$ layer, $\beta_{3}$, while fixing $\beta_{1}=0$,
and $\beta_{2}=\pi$. Thus the magnetization in $F_{1}$ is oriented along $z$,
antiparallel to $F_{2}$. As can be seen, the supercurrent direction and
magnitude in each $F$ region can be controlled by the magnetization
orientation in $F_{3}$. In panel (a) the total current in each ferromagnet is
directed oppositely over the whole angular range of $\beta_{3}$, except for
$\beta_{3}\approx\pi/2$ corresponding to magnetizations nearly orthogonal to
the other two. In this case, there is a vanishing of the supercurrent in all
$F$ regions. The reversal of supercurrent direction in the $F$ segments upon
varying the magnetization orientation in the $F_{3}$ region, is in stark
contrast to the findings of the previous $SFSFS$ case (bottom row of Fig. 2),
where similar geometrical parameters were used. There the supercurrent changes
direction in $F_{1}$ whereas it remains unchanged in $F_{2}$ by varying
$\beta_{2}$ for the $d_{F1}=0.4\xi_{S}$, and $d_{F2}=0.7\xi_{S}$ case (where
$d_{F2}>d_{F1}$). However, for the $SFSFFS$ junction with equal $F_{2}$,
$F_{3}$ thicknesses (with $d_{F2}+d_{F3}>d_{F1}$), and parameters given in
Fig. 5(a), we find the system has the $0$ and $\pi$ states coexisting over
nearly the whole angular range of $\beta_{3}$. An exception occurs near
$\beta_{3}\approx\pi/2$ and $3\pi/2$, where the supercurrent vanishes. It is
also seen in Fig. 5 that the $0$\- and $\pi$-states exchange locations upon
varying the magnetization rotation $\beta_{3}$. In other words, the
coexistence of $0$\- and $\pi$-states in the $SFSFS$ junction is now enhanced
in the $SFSFFS$ case. This interesting effect in $SFSFFS$ junctions tends to
wash out when $d_{F2}\neq d_{F3}$ (see Fig. 5(b)). It is apparent that the
transport characteristics of $SFSFFS$ Josephson junctions can be highly
sensitive to the geometrical parameters and magnetization patterns. Clearly,
the addition of the $F_{3}$ layer increases the possible tunable parameters,
e.g., its width and magnetization orientation, so that more possibilities
arise for spin switching and supercurrent control.

The behavior of the supercurrent as a function of magnetization variation in
$F_{3}$ (Fig. 5) is consistent with the local spatial profile of the total
supercurrent and its even and odd frequency components, exhibited in Fig. 6.
In particular, the top panels illustrate that the total supercurrent is
positive in throughout the $F_{1}$ region and then as $\beta_{3}$ increases,
the current switches direction, becoming negative. The reverse trends are
observed in the remaining ferromagnet regions, $F_{2}$ and $F_{3}$, in
accordance with Fig. 5(a). The valve effect is clearly identified for the
perpendicular magnetic configuration ($\beta_{3}$), where the supercurrent
nearly vanishes throughout the entire system. Turning now to the individual
components of the total supercurrent, we see that although the current must be
uniform in the $F$ regions, the even and odd frequency contributions can have
complicated spatial behavior. The spin-1 triplet component, $I_{Sy}$, is shown
to vanish when all three magnetizations are collinear, which occurs when
$\beta_{3}=\pi$. As expected, it vanishes in the $F_{1}$ and $F_{2}$ regions
for all $\beta_{3}$ since the relative magnetization there is always
collinear. When the ferromagnet layers have magnetizations that are no longer
collinear, spin-1 triplet correlations can be generated, which is largest in
$F_{3}$ for $\beta_{3}=\pi/2$. Houzet1  On the other hand, the triplet
component, $|I_{Sz}|$ is largest when the magnetization angle corresponds to
values closer to the $z$ spin quantization axis, which in this case are
$\beta_{3}=\pi/8$ and $\pi$. Although similar trends are observed when
considering unequal $F$ widths (bottom row), the configuration involving
larger $d_{F2}$ and e.g., $\beta_{3}=\pi/8$ permits $I_{Sz}$ to establish a
maximum in $F_{2}$ and subsequent decline towards the middle $S$, so that
there is a greater contribution to negative total current flow compared to the
symmetric case in the row above.

##  IV Conclusions

In conclusion, we have considered $SFSFS$ and $SFSFFS$ systems which have been
recently realized experimentally and are expected to have potential
applications in the next generation of memories and quantum computers.Baibich
; eschrigh1 ; Grunberg ; Ioffe ; ryaz1 ; ryaz2 ; ryaz3 ; ryaz4 ; pugach1 ;
giaz1 ; giaz2 ; alidoust3  We have considered the broadly accessible diffusive
regime, which is applicable to many experimental conditions. Using the
Keldysh-Usadel quasiclassical method, we demonstrated that in $SFSFS$ and
$SFSFFS$ systems the behavior of the supercurrent in a given $SFS$ segment can
remarkably be controlled simply by the magnetization orientation in the other
ferromagnetic regions. We have shown that $0$-$\pi$ state profiles of each
junction segment is controllable by means of magnetization rotation.
Particularly, the magnetization rotation can render one part of the junction
to be in a $0$ state while the other can be in a $\pi$ state. In other words,
the system can be in both a $0$ and $\pi$ state configuration: a three-
terminal $0$-$\pi$ spin switch. We have investigated the current-phase
relations in such structures numerically, and formulated our findings. Our
results revealed that a relatively thick middle $S$ electrode can act as an
external source of supercurrent or can effectively limit the spin-tuned
transport through the system, depending on the macroscopic superconducting
phases. We have analyzed the origin of such aspects by decomposing the total
supercurrent into its even-frequency singlet and odd-frequency triplet
components. We have shown that the triplet correlations propagate through the
middle superconductor terminal without any decline in their amplitude. This is
suggestive of a superconducting spin-switch with controllable charge
supercurrent using the magnetization rotation of a ferromagnetic layer
constituting the $SFSFS$ and $SFSFFS$ systems.

###### Acknowledgements.

M.A. would like to thank G. Sewell for valuable discussions in numerical parts
of this work. K.H. is supported in part by ONR and by a grant of supercomputer
resources provided by the DOD HPCMP.

##  V Pauli Matrices

In Sec. II we introduced the the $2\times 2$ Pauli matrices in spin space.
They are denoted by $\vec{\tau}=(\tau_{1},\tau_{2},\tau_{3})$, and given by,

$\displaystyle\tau_{1}=\begin{pmatrix}0&1\\\ 1&0\\\
\end{pmatrix},\;\tau_{2}=\begin{pmatrix}0&-i\\\ i&0\\\
\end{pmatrix},\;\tau_{3}=\begin{pmatrix}1&0\\\ 0&-1\\\ \end{pmatrix}.$ We also
introduced the $4\times 4$ matrices
$\vec{\hat{\rho}}=(\hat{\rho}_{1},\hat{\rho}_{2},\hat{\rho}_{3})$:
$\displaystyle\hat{\rho}_{1}=\begin{pmatrix}0&\tau_{1}\\\ \tau_{1}&0\\\
\end{pmatrix},\;\hat{\rho}_{2}=\begin{pmatrix}0&-i\tau_{1}\\\ i\tau_{1}&0\\\
\end{pmatrix},\;\hat{\rho}_{3}=\begin{pmatrix}\tau_{0}&0\\\ 0&-\tau_{0}\\\
\end{pmatrix}.$

To simplify expressions, it is also convenient to use the following
definitions:

$\displaystyle\tau_{0}=\begin{pmatrix}1&0\\\ 0&1\\\
\end{pmatrix},\;\hat{\rho}_{0}=\begin{pmatrix}\tau_{0}&0\\\ 0&\tau_{0}\\\
\end{pmatrix}.$

## References

  * (1) K.B. Efetov, I.A.Garifullin, A.F.Volkov,K.Westerholt, Magnetic Heterostructures. Advances and Perspectives in Spinstructures and Spintransport. ed. by H. Zabel, S.D. Bader, Series. Springer Tracts in Modern Physics, vol 227 (Springer, New York, 2007), P. 252
  * (2) M. Eschrig, Phys. Today 64, 43 (2011).
  * (3) F. Giazotto, J. T. Peltonen, M. Meschke, and J. P. Pekola,Nat. Phys. 6, 254 (2010).
  * (4) F. Giazotto, P. Spathis, S. Roddaro, S. Biswas, F. Taddei, M. Governale, and L. Sorba, Nat. Phys. 7, 857 (2011).
  * (5) P. Spathis, S. Biswas, S. Roddaro, L. Sorba, F. Giazotto, and F. Beltram, Nanotechnology 22, 105201 (2011).
  * (6) M. Alidoust, K. Halterman, and J. Linder, Phys. Rev. B 88, 075435 (2013).
  * (7) E.A. Demler, G.B. Arnold, and M.R. Beasley, Phys. Rev. B55, 15174 (1997).
  * (8) K. Halterman and O.T. Valls, Phys. Rev. B65, 014509 (2001).
  * (9) A.A. Golubov, MYu. Kupriyanov, E. Ilichev, Rev. Mod. Phys. 76, 411 (2004).
  * (10) A. Buzdin, Rev. Mod. Phys. 77, 935 (2005).
  * (11) F.S. Bergeret, A.F. Volkov, K.B. Efetov, Rev. Mod. Phys. 77, 1321 (2005).
  * (12) V.V. Ryazanov, V.A. Oboznov, A.Yu. Rusanov, A.V. Veretennikov, A.A. Golubov, and J. Aarts, Phys. Rev. Lett. 86, 2427 (2001).
  * (13) L.N. Bulaevskii, V.V. Kuzii, A.A. Sobyanin, JETP Lett. 25, 290 (1977).
  * (14) A.I. Buzdin, L.N. Bulaevskii, S.V. Panyukov, JETP Lett. 35, 178 (1982).
  * (15) Y. Makhlin, G. Schoen, A. Shnirman, Rev. Mod. Phys. 73, 357 (2001).
  * (16) F.S. Bergeret, A.F. Volkov, K.B. Efetov, Phys. Rev. Lett. 86, 4096 (2001).
  * (17) V.V. Ryazanov, V.V. Bolginov, D.S. Sobanin, I.V. Vernik, S.K. Tolpygo, A.M. Kadin, O.A. Mukhanov, Physics Procedia 36, 35 (2012).
  * (18) I.T. Larkin, V.V. Bolginov, V.S. Stolyarov, V.V. Ryazanov, I.V. Vernik, S.K.T. and O.A. Mukhanov ,Appl. Phys. Lett. 100, 222601 (2012).
  * (19) S.V. Bakurskiy, N.V. Klenov, I.I. Soloviev, V.V. Bolginov, V.V. Ryazanov, I.V. Vernik, O.A. Mukhanov, M.Yu. Kupriyanov and A.A. Golubov ,Appl. Phys. Lett. 102, 192603 (2013).
  * (20) I.V. Vernik, V.V. Bolginov, S.V. Bakurskiy, A.A. Golubov, M.Y. Kupriyanov, V.V. Ryazanov, and O.A. Mukhanov ,IEEE Tran. Appl. Supercond. 23 1701208 (2013).
  * (21) N. Pugach, and A. Buzdin, Appl. Phys. Lett. 101, 242602 (2012).
  * (22) K. Halterman and O.T. Valls, Phys. Rev. B69, 014517 (2004).
  * (23) S.V. Bakurskiy, N.V. Klenov, I.I. Soloviev, M.Yu. Kupriyanov, and A.A. Golubov Phys. Rev. B 88, 144519 (2013).
  * (24) J.W.A. Robinson, J.D.S. Witt, M.G. Blamire, Science 329, 5987 (2010).
  * (25) M. Alidoust, and J. Linder, Phys. Rev. B82, 224504 (2010).
  * (26) G.B. Halasz, M.G. Blamire, and J.W.A. Robinson, Phys. Rev. B84, 024517 (2011).
  * (27) C. Wu, O.T. Valls, and K. Halterman, Phys. Rev. Lett. 108, 117005 (2012).
  * (28) M. Alidoust, J. Linder, G. Rashedi, T. Yokoyama, and A. Sodbo, Phys. Rev. B81, 014512 (2010).
  * (29) I.B. Sperstad, J. Linder, and A. Sudbø, Phys. Rev. B78, 104509 (2008).
  * (30) M. Alidoust, K. Halterman, and J. Linder, Phys. Rev. B 89, 054508 (2014).
  * (31) A.G. Malshukov, and A. Brataas, Phys. Rev. B86, 094517 (2012).
  * (32) M. Houzet, A. I. Buzdin, Phys. Rev. B74, 214507 (2006).
  * (33) C. Richard, M. Houzet, J. S. Meyer, Phys. Rev. Lett. 110, 217004 (2013).
  * (34) A. Cottet, T. Kontos, W. Belzig, C. Schonenberger, C. Bruder, Europhys. Lett. 74, 320 (2006).
  * (35) A.V. Zaitsev, Zh. Eksp. Teor. Fiz. 86, 1742 (1984) (Sov. Phys. JETP 59, 1015 (1984); M.Y. Kuprianov _et al._ , Sov. Phys. JETP 67, 1163 (1988).
  * (36) Z. Pajovic, M. Bozovic, Z. Radovic, J. Cayssol, and A. Buzdin, Phys. Rev. B 74, 184509 (2006).
  * (37) Y.S. Barash, I.V. Bobkova, and T. Kopp, Phys. Rev. B 66, 140503(R) (2002).
  * (38) B. Crouzy, S. Tollis, and D.A. Ivanov, Phys. Rev. B 76, 134502 (2007).
  * (39) H. Sellier, C. Baraduc, F. Lefloch, and R. Calemczuk, Phys. Rev. Lett. 92, 257005 (2004).
  * (40) Ya.V. Fominov, A.F. Volkov, and K.B. Efetov, Phys. Rev. B 75, 104509 (2007).
  * (41) Y. Asano, Y. Sawa, Y. Tanaka, and A.A. Golubov, Phys. Rev. B 76, 224525 (2007).
  * (42) Y. Asano, Y. Tanaka, T. Yokoyama, and S. Kashiwaya, Phys. Rev. B 74, 064507 (2006).
  * (43) G. Eilenberger, Z. Phys. 214, 195 (1968).
  * (44) K. Usadel, Phys. Rev. Lett. 25, 507 (1970).
  * (45) I. Sosnin, H. Cho, V. T. Petrashov, and A.F. Volkov, Phys. Rev. Lett. 96, 157002 (2006).
  * (46) N.G. Pugach, M.Yu. Kupriyanov, A.V. Vedyayev, C. Lacroix, E. Goldobin, D. Koelle, R. Kleiner, and A.S. Sidorenko Phys. Rev. B 80, 134516 (2009).
  * (47) G.B. Hal sz, J.W. A. Robinson, J.F. Annett, and M.G. Blamire, Phys. Rev. B 79, 224505 (2009).
  * (48) T. Kontos, M. Aprili, J. Lesueur, X. Grison, Phys. Rev. Lett. 86, 304 (2001).
  * (49) R.S. Keizer, S.T. B. Goennenwein, T.M. Klapwijk, G. Miao, G. Xiao and A. Gupta, Nature 439, 825 (2006).
  * (50) M. Eschrig, T. Lofwander, Nat. Phys. 4, 138 (2008).
  * (51) T.S. Khaire, M.A. Khasawneh, W.P. Pratt, N.O. Birge, Phys. Rev. Lett. 104, 137002 (2010).
  * (52) T. Lofwander, T. Champel, J. Durst, M. Eschrig, Phys. Rev. Lett. 95, 187003 (2005).
  * (53) S. Hikino and S. Yunoki, Phys. Rev. Lett. 110, 237003 (2013).
  * (54) A.M. Bobkov and I.V. Bobkova, Phys. Rev. B 84, 054533 (2011); Phys. Rev. Lett. 108, 197002 (2012).
  * (55) L. Trifunovic, Z. Popovic, and Z. Radovic, Phys. Rev. B 84, 064511 (2011).
  * (56) L. Trifunovic, Phys. Rev. Lett. 107, 047001 (2011).
  * (57) L.J. Jin, Y. Wang, L. Wen, G.Q. Zha, and S.P. Zhou Physics Letters A 376, 2435 (2012).
  * (58) M. Eschrig, J. Kopu, J.C. Cuevas, and G. Schon, Phys. Rev. Lett. 90, 137003 (2003).
  * (59) K. Halterman, P. H. Barsic, and O.T. Valls, Phys. Rev. Lett. 99, 127002 (2007).
  * (60) K. Halterman and O. T. Valls, Phys. Rev. B 80, 104502 (2009).
  * (61) V. Braude and Yu.V. Nazarov, Phys. Rev. Lett. 98, 077003 (2007).
  * (62) J.P. Morten, M.S. thesis, Norwegian University of Science and Technology, 2003.
  * (63) A.F. Volkov and K.B. Efetov, Phys. Rev. B 81, 144522 (2010).
  * (64) M. Alidoust, G. Sewell, and J. Linder Phys. Rev. B 85, 144520 (2012).
  * (65) L.B. Ioffe, V.B. Geshkenbein, M.V. Feigelman, A.L. Fauchere, and G. Blatter, Nature (London) 398, 679 (1999).
  * (66) G. Binasch, P. Grunberg, F. Saurenbach, and W. Zinn, Phys. Rev. B 39, 4828 (1989).
  * (67) M.N. Baibich, J.M. Broto, A. Fert, F. Nguyen Van Dau, F. Petroff, P. Eitenne, G. Creuzet, A. Friederich, and J. Chazelas, Phys. Rev. Lett. 61, 2472 (1988).
  * (68) M. Vissers, V. K. Chua, S. A. Law, S. Vishveshwara, J. N. Eckstein, arXiv:1402.6055.
  * (69) J. D. Sau, R. M. Lutchyn, S. Tewari, S. D. Sarma Phys. Rev. Lett. 104, 040502 (2010).
  * (70) R. M. Lutchyn, J. D. Sau, and S. D. Sarma. Phy. Rev. Lett. 105, 077001 (2010).
  * (71) J. Alicea, Y. Oreg, G. Refael, F. v. Oppen, M. P. A. Fisher, Nat. Phys. 7, 412 (2011).
  * (72) V. Mourik, K. Zuo, S.M. Frolov, S.R. Plissard, E.P.A.M. Bakkers, L.P. Kouwenhoven, Science, 336, 1003 (2012).