## Abstract

Flat bands of zero-energy states at the edges of quantum materials have a topological origin. However, their presence is energetically unfavorable. If there is a mechanism to shift the band to finite energies, a phase transition can occur. Here we study high-temperature superconductors hosting flat bands of midgap Andreev surface states. In a second-order phase transition at roughly a fifth of the superconducting transition temperature, time-reversal symmetry and continuous translational symmetry along the edge are spontaneously broken. In an external magnetic field, only translational symmetry is broken. We identify the order parameter as the superfluid momentum **p**_{s}, that forms a planar vector field with defects, including edge sources and sinks. The critical points of the vector field satisfy a generalized Poincaré-Hopf theorem, relating the sum of Poincaré indices to the Euler characteristic of the system.

## Introduction

Superconducting devices are often experimentally realized as thin-film circuits or hybrid structures operating in the mesoscopic regime^{1,2,3,4}. At this length scale, where the size of the circuit elements becomes comparable with the superconducting coherence length, the nature of the superconducting state may be dictated by various finite-size or surface/interface effects^{5}. This holds true in particular for unconventional superconductors, such as the high-temperature superconductors with an order parameter of \(d_{x^2 - y^2}\) symmetry that changes the sign around the Fermi surface. Scattering at surfaces, or defects, leads to substantial pair breaking and formation of Andreev states with energies within the superconducting gap^{6,7}. Today, the material control of high-temperature superconducting films is sufficiently good that many advanced superconducting devices can work at elevated temperatures^{8,9}. This raises the question how the specific surface physics of *d*-wave superconductors influences devices.

From a theory point of view, the physics at specular pair-breaking surfaces of *d*-wave superconductors is rich and interesting. The reason is the formation of zero-energy (midgap) Andreev states due to the sign change of the *d*-wave order parameter for quasiparticles scattered at the surface^{6,7,10}. In modern terms, there is a flat band of spin-degenerate zero-energy surface states as a function of the parallel component of the momentum, *p*_{||}, which is a good quantum number for a specular surface. A topological invariant has been identified^{11,12}, that guarantees the flat band for a time-reversal symmetric superconducting order parameter and *p*_{||} conserved. However, the large spectral weight of these states exactly at zero energy (i.e., at the Fermi energy) is energetically unfavorable. Different scenarios have been proposed, within which there is a low-temperature instability and a phase transition into a time-reversal symmetry-broken phase where the flat band is split to finite energies, thus lowering the free energy of the system. One scenario is the presence of a subdominant pairing interaction and appearance of another order parameter component *π*/2 out of phase with the dominant one^{13,14,15}, for instance a subdominant *s*-wave resulting in an order parameter combination *Δ*_{d} + *i**Δ*_{s}. The phase transition is driven by a split of the flat band of Andreev states to ±*Δ*_{s}. The split Andreev states carry current along the surface, which results in a magnetic field that is screened from the bulk. In a second scenario, exchange interactions drive a ferromagnetic transition at the edge where the flat Andreev band is instead spin split^{16,17}. A third scenario involves spontaneous appearance of supercurrents^{18,19,20} that Doppler shifts the Andreev states and thereby lowers the free energy. Here the electrons couple to the electromagnetic gauge field **A**(**R**), and this mechanism was first considered theoretically for a translationally invariant edge. In this case, the transition is a result of the interplay of weakly Doppler shifted surface bound states, decaying away from the surface on the scale of the superconducting coherence length *ξ*_{0}, and weak diamagnetic screening currents, decaying on the scale of the penetration depth *λ*. The resulting transition temperature is very low, of order *T*^{*} ~ (*ξ*_{0}/*λ*)*T*_{c}, where *T*_{c} is the *d*-wave superconducting transition temperature. Later, the transition temperature was shown to be enhanced in a film geometry^{21,22,23,24,25} where two parallel pair-breaking edges are separated by a distance of the order of a few coherence lengths. The suppression of the order parameter between the pair-breaking edges can be viewed as an effective Zeeman field that splits the Andreev states and enhances the transition temperature. The mechanism does not involve subdominant channels or coupling to magnetic field, but depends on film thickness *D*, and the transition temperature decays rapidly with increasing thickness as *T*^{*} ~ (*ξ*_{0}/*D*)*T*_{c}.

In this paper, we consider a peculiar scenario^{26,27} where spontaneous supercurrents also break translational symmetry along the edge. This scenario too does not rely on any additional interaction term in the Hamiltonian. Instead, as we will discuss below, it relies on the development of a texture in the gradient of the *d*-wave order parameter phase *χ*, or more precisely in the gauge invariant superfluid momentum

where *ħ* is Planck’s constant, *e* the charge of the electron, and *c* the speed of light. This superfluid momentum spontaneously takes the form of a planar vector field with a chain of sources and sinks along the boundary and saddle points in the interior, see Fig. 1. The vector field is illustrated by arrows showing the local unit vectors \(\hat {\bf{p}}_{\mathrm{s}}({\bf{R}})\), while the color scale illustrates the magnitude *p*_{s}(**R**). An interior critical point at **R**_{0} is characterized by a Poincaré index defined as^{28,29}

where *θ* = arctan(*p*_{sy}/*p*_{sx}) is the angle of \(\hat {\bf{p}}_{\mathrm{s}}({\bf{R}})\) on the Jordan curve *Γ* encircling **R**_{0}. Internal sources and sinks have *I* = +1, while saddle points have *I* = −1. Although the special points on the boundary have to be treated with care, there is a sum rule (Eq. (3)) for the Poincaré indices, as we will discuss below. We identify the **p**_{s} vector field as the order parameter of the symmetry-broken phase, motivated by the fact that the free energy is lowered by a large split of the flat band of Andreev states by a Doppler shift **v**_{F} · **p**_{s}, where **v**_{F} is the Fermi velocity. This free energy gain is maximized by maximizing the magnitude of **p**_{s}, which is achieved by the peculiar vector field in Fig. 1. The balance of the Doppler shift gain and the energy cost in setting up the vector field with critical points where^{30} ∇ × **p**_{s} ≠ 0 and the splay patterns between them leads to a high *T*^{*} ≈ 0.18*T*_{c}. The inhomogeneous vector field induces a chain of loop-currents at the edge circulating clockwise and anti-clockwise. The induced magnetic fluxes of each loop are a fraction of the flux quantum and form a chain of fluxes with alternating signs along the edge. Here we clarify the structure of the order parameter of the symmetry-broken phase, i.e., **p**_{s}, and study the thermodynamics of this phase under the influence of an external magnetic field, explicitly breaking time-reversal symmetry.

## Results

### Translational symmetry breaking in a magnetic field

In Fig. 2, we show the influence of a rather weak external magnetic field, *B* = 0.5*B*_{g1}, applied to the *d*-wave superconducting grain with pair-breaking edges for varying temperature near the phase transition temperature *T*^{*}. The scale *B*_{g1} = *Φ*_{0}/\({\cal A}\) corresponds to one flux quantum threading the grain area \({\cal A}\), see the Methods section. The left and right columns show the currents and the magnetic field densities, respectively, induced in response to the applied field. To be concrete, we discuss a few selected sets of model parameters, as listed in Table 1. First, for *T* > *T*^{*} (parameter set I), the expected diamagnetic response of the condensate in the inner part of the grain is present, see Fig. 2a, e. On the other hand, midgap quasiparticle Andreev surface states respond paramagnetically. This situation is well established theoretically and experimentally through measurements of the competition between the diamagnetic and paramagnetic responses seen as a low-temperature up-turn in the penetration depth^{18,31,32}. Upon lowering the temperature to *T* ≳ *T*^{*} (parameter set II), see Fig. 2b, f, the paramagnetic response at the edge becomes locally suppressed and enhanced, forming a sequence of local minima and maxima in the induced currents and fields. The bulk response is, on the other hand, relatively unaffected. Finally, as *T* < *T*^{*} (parameter set III), see Fig. 2c, g, the regions of minimum current turns into regions with reversed currents. The resulting loop currents with clock-wise and anti-clockwise circulations induce magnetic fluxes along the surface with opposite signs between neighboring fluxes. The situation for *T* < *T*^{*} in an external magnetic field can be compared with the one in zero magnetic field^{26} displayed in Fig. 2d, h. In the presence of the magnetic field, there is an imbalance between positive and negative fluxes, while in zero external magnetic field, the total induced flux integrated over the grain area is zero.

### Topology of the superfluid momentum vector field

Let us quantify the symmetry-broken phase in a magnetic field by plotting the superfluid momentum defined in Eq. (1), see Fig. 3. For *T* ≳ *T*^{*} (parameter set II), the amplitude of **p**_{s} varies along the edge (coordinate *x*), see Fig. 3a, reflecting the varying paramagnetic response in Fig. 2b, f. For *T* < *T*^{*} (parameter set III), the sources and sinks have appeared pairwise together with a saddle point, see Fig. 3b. The left defects in the figure are not well developed because of the proximity to the corner. Finally, in Fig. 3c, we show the vector field at a lower temperature when the chain of sources, sinks, and saddle points are well established and the magnitude of **p**_{s} is large, much larger than in the interior part of the grain still experiencing diamagnetism. In a magnetic field, the vector field far from the surface has a preferred direction reflecting the diamagnetic response of the interior grain. This shifts the sources and sinks along the surface, as compared with the regular chain for zero field in Fig. 1, and moves the saddle points to the surface region.

The superflow pattern of sources, sinks, and saddle points satisfy a certain sum rule related to the topology of the sample. This relation also ties the special points of the **p**_{s} field on the edge of the sample with critical points in its bulk. The generalized Poincaré-Hopf theorem for manifolds with boundaries^{33,34} connects the properties of a vector field *v* inside a manifold *M*, and on its boundary *∂M*, with the Euler characteristic of the manifold *χ*(*M*). Using the formulation presented in ref. ^{34}, we write

where Ind_{
M
}(*v*) is the total Poincaré index of critical points of the field *v* internal to *M*, \({\mathrm{Ind}}_{\partial _ \pm M}(v_{||})\) is the total Poincaré index of critical points of the tangent vector *v*_{||} || *∂M* on the boundary. The theorem applies when the boundary *∂M* does not go through any critical points of *v*. Boundary indices where field points inside (*∂*_{−}*M*) / outside (*∂*_{+}*M*) of *M*, come with positive/negative signs. In Supplementary Note 1, we demonstrate in detail how the sum rule works for the vector field in Fig. 1, redrawn as a streamline plot in Supplementary Fig. 2. We also provide other examples of grain geometries in Supplementary Figs. 3–10. We utilize the sum rule as a tool to verify that the calculations are correct.

In a magnetic field, as in Fig. 3, a motif with one edge source, one edge sink, and one saddle point annihilate at *T*^{*}. In the same fashion, increasing the magnetic field strength, the motif gets smaller as the defects are forced toward each other to match the superflow in the bulk. However, the magnitude of **p**_{s} near the surface due to Meissner screening of the bulk is not large enough to force an annihilation of the motifs. The broken symmetry phase therefore survives the application of an external magnetic field within the whole Meissner state, *b* ∈ [0, 1].

For higher fields, when Abrikosov vortices start to enter the grain, the problem quickly becomes complicated by the interplay of the Abrikosov vortex lattice formation and finite grain size effects. The free energy landscape is very flat and it is possible to find multiple metastable configurations. For a variety of grain sizes and magnetic field strengths, we have established coexistence of Abrikosov vortices and the spontaneously formed edge loop currents^{35}. We therefore conclude that the edge loop-current phase established for *T* < *T*^{*} should survive into the mixed state, but a complete investigation of the geometry-dependent phase diagram for large fields is beyond the scope of this paper.

### Induced currents and magnetic fields

Let us investigate further how the currents and magnetic fields are induced at *T*^{*}. As we have seen, the paramagnetic response and the spontaneously appearing edge loop currents compete, as they both lead to shifts of midgap Andreev states. As the temperature is lowered, the strength of the paramagnetic response increases slowly and linearly, while the strength of the loop currents increases highly non-linearly. This is illustrated in Fig. 4, by plotting the area-averaged current magnitude

as a function of temperature for the cases when *B*_{ext} = 0 (solid line), *B*_{ext} = 0.5*B*_{g1} (dashed line), and for comparison also for a system without pair-breaking edges having only a diamagnetic response at *B*_{ext} = 0.5*B*_{g1} (dash-dotted line). The paramagnetic response is fully suppressed at low temperatures *T* < *T*^{*}. Such a sudden disappearance of the paramagnetic response at a temperature *T*^{*} should be experimentally measurable, for example in the penetration depth or by using nano-squids^{36,37}.

We show in Fig. 5a the total induced magnetic flux through the grain

and in Fig. 5b the area-averaged order parameter magnitude

both as functions of temperature for different values of *B*_{ext}. The figures also show results for a *d*-wave grain without pair-breaking edges at *B*_{ext} = 0.5*B*_{g1} (dash-dotted line). For better visibility, the latter results have been scaled by a factor 0.4 and 0.9 in (a) and (b), respectively. Two different trends are distinguishable in the observables for *T* < *T*^{*} and *T* > *T*^{*}, separated by a “kink”. The induced magnetic flux through the grain area decreases as *T* decreases down to *T*^{*} due to the increasing paramagnetic response that competes with the diamagnetic one. At *T*^{*}, the inhomogeneous edge state appear and starts competing with the paramagnetic response. Thus, the total magnetic flux increases again. At the same time, the order parameter is partially healed.

### Phase transition and thermodynamics

The sudden changes with a discontinuity in the derivative as a function of temperature of the total induced current, the magnetic flux, as well as the order parameter (Figs. 4 and 5) indicate that there is a phase transition occurring at the temperature *T*^{*}. In zero external magnetic field, there is a second-order phase transition at *T*^{*}, where both time-reversal symmetry and continuous translational symmetry along the edge are spontaneously broken^{26}. Let us now investigate the thermodynamics in an external magnetic field already explicitly breaking time-reversal symmetry.

In Fig. 6a, we plot the free energy difference between the superconducting and normal states *Ω*_{S} − *Ω*_{N}, defined in Eq. (29), for external field *B* = 0.5*B*_{g1} (red dashed line) and for zero field (solid black line). For comparison, we show the free energy difference for a purely real order parameter in zero field (gray fine line), i.e., without the symmetry breaking edge loop currents. For *T* < *T*^{*}, this solution is not the global minimum of the free energy, and we therefore refer to it as a metastable state. To enhance the visibility of the differences in free energy between the possible solutions, we show in Fig. 6b the free energy difference with respect to the metastable state, i.e., *Ω*_{S} − *Ω*_{ms}. The small slope in the red dashed line at *T* > *T*^{*} in Fig. 6b is caused by the shift of midgap Andreev states due to the paramagnetic response, which increases as *T* decreases. The phase transition temperature *T*^{*} for the second-order phase transition can be identified with the “knee” in the entropy difference defined in Eq. (31), see Fig. 6c, d. Since time-reversal symmetry is already explicitly broken by the external magnetic field, the phase transition signals breaking of local continuous translational symmetry and establishment of the vector field **p**_{s} with the chain of defects along the edge, as shown in Fig. 3. The magnitude of the order parameter follows the expected scaling law for second-order phase transitions, *p*_{s}(*T*) ∝ (1 − *T*/*T*^{*})^{β} with *β* = 1/2, as shown in the inset of Fig. 6d. However, the temperature range within which the scaling law holds is very limited and non-linear terms play an important role for lower temperatures *T* < *T*^{*}.

The knee in the entropy leads to a jump in the specific heat, as shown in Fig. 6e, f. The heat capacity is expressed in units of the heat capacity jump at the normal-superconducting phase transition at *T*_{c} for a bulk *d*-wave system

where *α* = 8*π*^{2}/[7*ζ*(3)], with *ζ* being the Riemann-zeta function. The jump in heat capacity at the phase transition is an edge-to-area effect, and grows linearly as the sample becomes smaller. The jump is roughly 4.5% of Δ*C*_{d} for the mesoscopic \({\cal A} = 60 \times 60\xi _0^2\) grain considered here, and grows as the size of the grain is reduced. The phase transition temperature *T*^{*} is extracted as a function of *B*_{ext} as the midpoint temperature of the jump in the specific heat. Figure 7 shows a phase diagram where the *T*^{*}, extracted in this way from the specific heat, is plotted versus external field strength (crosses). We compare this with *T*^{*} extracted as the minimum (the “kink”, see Fig. 5a) in the induced flux. The small lowering of *T*^{*} with increased *B*_{ext} is caused by the competing paramagnetic response.

From the above, it is clear that the phase with edge loop currents shows extreme robustness against an external magnetic field in the whole Meissner region (*B*_{ext} ≤ *B*_{g1}). The magnitude of the spontaneously formed superfluid momentum **p**_{s} at the edge grows non-linearly to be very large for *T* < *T*^{*}, fueled by the lowering of the free energy by Doppler shifts of the flat band of Andreev surface states. The corresponding correction to **p**_{s}, due to the process of screening of the external magnetic field, is in comparison small. Thereby, *T*^{*} is not dramatically shifted in a magnetic field and the symmetry-broken phase below *T*^{*} is robust.

## Discussion

Which of the scenarios outlined in the introduction wins will ultimately depend on the material properties of a specific high-temperature superconducting sample, or the material properties of other candidate *d*-wave superconductors, e.g., FeSe^{38}. In the scenario studied here, the resulting transition temperature is high, *T*^{*} ~ 0.18*T*_{c}. It means that the interaction terms in the Hamiltonian for the other scenarios would have to be sufficiently large in order to compete. It is even possible that one or another scenario wins in different parts of the material’s phase diagram^{16}.

We note that the phase transition at *T*^{*} means that the initially topologically protected flat band of zero energy surface states is shifted away from the Fermi energy. Such fragility of topologically protected states has been studied recently e.g., for topological insulators^{39} supporting the quantum spin-Hall state. In that case, an edge reconstruction due to Coulomb interactions leads to breaking of time-reversal symmetry. In the *d*-wave superconductor case, although the bulk Hamiltonian still maintains required symmetries, a local instability at the surface violates these symmetries spontaneously and moves the flat band of bound states to finite energies. The spontaneously broken translational symmetry allows for a larger shift from zero energy and a high *T*^{*}.

From an experimental point of view, the surface physics of *d*-wave superconductors is complicated by, for instance, surface roughness, inhomogeneous stoichiometry, and presence of impurities. The formation of a band of Andreev states centered at zero energy is well established by numerous tunneling experiments, in agreement with the expectation for *d*-wave symmetry of the order parameter, as reviewed in refs. ^{6,7}. One consistent experimental result is that the band is typically quite broad, with a width that saturates at low temperature. On the other hand, the establishment of a time-reversal symmetry breaking phase remains under discussion, see for instance refs. ^{40,41}. Several tunneling experiments on YBCO^{42,43,44} show a split of the zero-bias conductance peak, while others do not^{45,46}. Other probes indicating time-reversal symmetry breaking include thermal conductivity^{47}, Coulomb blockade in nanoscale islands^{5}, and STM tunneling at grain boundaries in FeSe^{38}. As we argued in refs. ^{26,27} within the scenario with spontaneous loop currents, the split of the Andreev band might be difficult to resolve in a tunneling experiment because of the broken translational symmetry along the edge and associated variations in the superflow field. This leads to a smearing effect for tunnel contacts with an area larger than the coherence length and an expected wide, largely temperature-independent, peak centered at zero energy. In fact, this would be consistent with most tunneling experiments.

With an eye to inspire a new generation of experiments, we have presented results for the interplay between an external magnetic field, that induces screening supercurrents, and the phase transition at *T*^{*} into a state with the spontaneous loop currents at the edges. We have shown that the phase should be quantified in terms of its order parameter, the vector field **p**_{s}(**R**), which contains edge sources and sinks, as well as saddle points. At all these critical points, ∇ × **p**_{s} ≠ 0. The **p**_{s} vector field drives the loop currents with opposite circulations in neighboring loops. The loop-current strength increases highly non-linearly, suppressing the paramagnetic response present for *T* > *T*^{*}. As the strength of the external magnetic field increases, the size of the Doppler shift due to the paramagnetic response grows linearly. Therefore, *T*^{*} decreases slightly as the magnitude of the external field increases. The influence of the external field, and in particular the sudden disappearance of the paramagnetic response, leads to observables which we argue should be visible in experiment. For example the “kink” in the total induced flux at *T*^{*}. The magnetic fluxes induced by the loop currents should be directly observable with recently developed scanning probes^{36,37}, and the sudden disappearance of the paramagnetic response should be observable with nano-SQUIDS and possibly in penetration-depth experiments. Furthermore, the large jump in heat capacity at the phase transition should be observable with nanocalorimetry^{48}.

The identification of the order parameter **p**_{s}(**R**), with its topological textures, leads to similarities with other systems, including general relativity^{33}, fluid dynamics^{49}, liquid crystals^{50}, and superfluid ^{3}He^{51}. An interesting difference is that in those systems, there is typically a transition in a preexisting vector field to a state with topological textures. Here, instead, we have a singlet *d*-wave superconductor that spontaneously establishes **p**_{s}(**R**) with topological textures different than the traditional Abrikosov vortices.

## Methods

### Model and grain geometry

Our aim is to investigate the ground state of clean mesoscopic *d*-wave superconducting grains in an external magnetic field applied perpendicular to the crystal *ab*-plane, as shown in Fig. 8. As a typical geometry, we consider a square grain with side lengths *D* = 60*ξ*_{0}, where *ξ*_{0} = *ħv*_{F}/(2*πk*_{B}*T*_{c}) is the zero-temperature superconducting coherence length. Here, *v*_{F} is the normal state Fermi velocity, and *k*_{B} the Boltzmann constant. The sides of the system are assumed to be misaligned by a 45° rotation with respect to the crystal *ab*-axes, inducing maximal pair-breaking at the edges.

The external field is directed perpendicular to the *xy*-plane,

We shall consider rather small external fields, and will use a field scale *B*_{g1} = *Φ*_{0}/\({\cal A}\), corresponding to one flux quantum threading the grain of area \({\cal A}\) = *D*^{2} = 60*ξ*_{0} × 60*ξ*_{0}. The flux quantum *Φ*_{0} = *hc*/(2|*e*|) is given in Gaussian CGS units. The field *B*_{g1} is larger than the lower critical field \(B_{{\mathrm{c}}1} \propto { {\Phi }}_0{\mathrm{/}}\lambda _0^2\), where vortices can enter a macroscopically large superconductor, since the grain side length is smaller than the penetration depth. We assume that *λ*_{0} = 100*ξ*_{0}, relevant for YBCO. The upper critical field \(B_{{\mathrm{c}}2} \propto { {\Phi }}_0{\mathrm{/}}\xi _0^2\) is much larger than any field we include in this study. To be precise, we parameterize the field strength as

and we will consider *b* ∈ [0, 1].

### Quasiclassical theory

We utilize the quasiclassical theory of superconductivity^{52,53,54}, which is a theory based on a separation of scales^{55,56,57,58}. For instance, the atomic scale is assumed small compared with the superconducting coherence length, \(\hbar {\mathrm{/}}p_{\mathrm{F}} \ll \xi _0\). This separation of scales makes it possible to systematically expand all quantities in small parameters such as *ħ*/*p*_{F}*ξ*_{0}, *Δ*/\(\epsilon _{\mathrm{F}}\), and *k*_{B}*T*_{c}/\(\epsilon _{\mathrm{F}}\), where *Δ* is the superconducting order parameter, *p*_{F} is the Fermi momentum, and \(\epsilon _{\mathrm{F}}\) is the Fermi energy. In equilibrium, the central object of the theory is the quasiclassical Green’s function \(\hat g({\bf{p}}_{\mathrm{F}},{\bf{R}};z)\), which is a function of quasiparticle momentum on the Fermi surface **p**_{F}, the quasiparticle center-of-mass coordinate **R**, and the quasiparticle energy *z*. The latter is real *z* = \(\epsilon\) + *i*0^{+} with an infinitesimal imaginary part *i*0^{+} for the retarded Green’s function, or an imaginary Matsubara energy *z* = *i*\(\epsilon _n\) = *iπk*_{B}*T*(2*n* + 1) in the Matsubara technique (*n* is an integer). To keep the notation compact, the dependence on the parameters **p**_{F}, **R**, and *z* will often not be written out. The hat on \(\hat g\) denotes Nambu (electron-hole) space

where *g* and *f* are the quasiparticle and pair propagators, respectively. The tilde operation denotes particle-hole conjugation

The quasiclassical Green’s function is parameterized in terms of two scalar coherence functions, *γ*(**p**_{F}, **R**; *z*) and \(\tilde \gamma\)(**p**_{F}, **R**; *z*), as^{59,60,61,62,63,64,65}

Note that with this parameterization, the Green’s function is automatically normalized to \(\hat g^2 = - \pi ^2\hat 1\). The coherence functions obey two Riccati equations:

where **A** is the vector potential. These first-order non-linear differential equations are solved by integration along straight (ballistic) quasiparticle trajectories. Quantum coherence is retained along these trajectories, but not between neighboring trajectories. A clean superconducting grain in vacuum is assumed by imposing the boundary condition of perfect specular reflection of quasiparticles along the edges of the system.

The superconducting order parameter is assumed to have pure *d*-wave symmetry

where *θ* is the angle between the Fermi momentum **p**_{F} and the crystal \(\widehat {\bf{a}}\)-axis, and *η*_{d}(*θ*) is the *d*-wave basis function:

fulfilling the normalization condition

The order parameter amplitude satisfies the gap equation

where *λ*_{d} is the pairing interaction, *N*_{F} is the density of states at the Fermi level in the normal state, and *Ω*_{c} is a cutoff energy. The pairing interaction and the cutoff energy are eliminated in favor of the superconducting transition temperature *T*_{c} (see for example ref. ^{66}) as

The above equations are solved self-consistently with respect to *γ*, \(\tilde \gamma\), and *Δ*_{d}. As an initial guess, we assume a homogenous superconductor with a small modulation of the phase. The coherence functions on the boundaries have to be updated in each iteration, taking into account the specular boundary condition. The starting guess is the local homogeneous solution. After several iterations, the information of the initial guess for the coherence functions is lost^{67}.

We choose an electromagnetic gauge where the vector potential has the form

The total vector potential **A**(**R**), that enters Eqs. (13) and (14), is given by **A**_{ext}(**R**) and the field **A**_{ind}(**R**) induced by the currents **j**(**R**) in the superconductor (Eq. (27) below):

The vector potential **A**_{ind}(**R**) should be solved from Ampère’s circuit law

with appropriate boundary conditions for the induced field inside and outside the sample. To take the full electrodynamics into account, *A*_{ind}(**R**) also needs to be computed self-consistently in each iteration. However, the strength of the electrodynamic back-coupling scales as *κ*^{−2}, where *κ* ≡ *λ*_{0}/*ξ*_{0} is the dimensionless Ginzburg-Landau parameter. The electrodynamic back-coupling is therefore a very small effect for type II superconductors (typically *κ*^{−1} ≈ 10^{−2} for the cuprates). We have verified through fully self-consistent calculations that for grains with side lengths *D* < *λ*, as we limit ourselves to in this paper, it is always safe to neglect this back-coupling. For large system sizes, \(D \gg \lambda\), back-coupling would ensure proper Meissner screening on the length scale *λ* in the interior for *b* < 1 and the establishment of a proper Abrikosov vortex lattice with inter-vortex distances of order *λ* for moderate fields *b* > 1, corresponding to field strengths of order *H*_{c1}. Since the spontaneous fields appearing below *T*^{*} are located within a small distance of order \(\xi _0 \ll \lambda\) from the boundary, the effect of back-coupling is small also in these cases. Only in very high fields, approaching *H*_{c2}, where inter-vortex distances become of order *ξ*_{0} may we expect a serious effect on *T*^{*}, but this is beyond the scope of this paper.

The induced magnetic flux density is computed as

We consider a layered superconductor with many weakly, for our purposes negligibly, coupled layers stacked in the *c*-axis direction. This ensures translational invariance in that direction. Therefore, we neglect the problem of the field distribution around the superconductor and focus on the field induced at the *ab*-plane where we have simply **B**_{ind} = \(B_{{\mathrm{ind}}}\widehat {\bf{z}}\).

### Gauge transformation

Once the Green’s function and the order parameter have been determined self-consistently, we can perform a gauge transformation in order to make the order parameter a real quantity and in the process extract the superfluid momentum **p**_{s}. This can be illustrated by transforming the Riccati equation in Eq. (13). To begin with, the self-consistently obtained order parameter is complex, i.e.,

We make the ansatz

and put that into the Riccati equation. We obtain

where **p**_{s} is defined in Eq. (1).

### Observables

The current density is computed within the Matsubara technique through the formula

In the results section, we shall show this current density in units of the depairing current

The free-energy difference between the superconducting and the normal states is calculated with the Eilenberger free-energy functional^{52}

We have verified that this form of the free energy gives the same results as the Luttinger-Ward functional^{26,55,64}. The entropy and specific heat capacity are obtained from the thermodynamic definitions

### Data availability

All relevant data are available from the authors.

## Additional information

**Publisher's note:** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

- 1.
Gol'tsman, G. N. et al. Picosecond superconducting single-photon optical detector.

*Appl. Phys. Lett.***79**, 705–707 (2001). - 2.
De Franceschi, S., Kouwenhoven, L., Schönenberger, C. & Wernsdorfer, W. Hybrid superconductor-quantum dot devices.

*Nat. Nanotechnol.***5**, 703–711 (2010). - 3.
Welp, U., Kadowaki, K. & Kleiner, R. Superconducting emitters of THz radiation.

*Nat. Photonics***7**, 702–710 (2013). - 4.
Fornieri, A. & Giazotto, F. Towards phase-coherent caloritronics in superconducting circuits.

*Nat. Nanotechnol.***12**, 944–952 (2017). - 5.
Gustafsson, D. et al. Fully gapped superconductivity in a nanometre-size YBa

_{2}Cu_{3}O_{7−δ}island enhanced by a magnetic field.*Nat. Nanotechnol.***8**, 25–30 (2012). - 6.
Kashiwaya, S. & Tanaka, Y. Tunnelling effects on surface bound states in unconventional superconductors.

*Rep. Prog. Phys.***63**, 1641–1724 (2000). - 7.
Löfwander, T., Shumeiko, V. S. & Wendin, G. Andreev bound states in high-

*T*_{ c }superconducting junctions.*Supercond. Sci. Technol.***14**, R53–R77 (2001). - 8.
Baghdadi, R. et al. Fabricating nanogaps in YBa

_{2}Cu_{3}O_{7−δ}for hybrid proximity-based Josephson junctions.*Phys. Rev. Appl.***4**, 014022 (2015). - 9.
Xie, M. et al. Improved coupling of nanowire-based high-

*T*_{c}SQUID magnetometers-simulations and experiments.*Supercond. Sci. Technol.***30**, 115014 (2017). - 10.
Hu, C.-R. Midgap surface states as a novel signature for -wave superconductivity.

*Phys. Rev. Lett.***72**, 1526–1529 (1994). - 11.
Sato, M., Tanaka, Y., Yada, K. & Yokoyama, T. Topology of Andreev bound states with flat dispersion.

*Phys. Rev. B***83**, 224511 (2011). - 12.
Nagai, Y., Ota, Y. & Tanaka, K. Time-reversal symmetry breaking and gapped surface states due to spontaneous emergence of new order in

*d*-wave nanoislands.*Phys. Rev. B***96**, 060503 (2017). - 13.
Matsumoto, M. & Shiba, H. Coexistence of different symmetry order parameters near a surface in

*d*-wave superconductors I.*J. Phys. Soc. Jpn.***64**, 3384–3396 (1995). - 14.
Fogelström, M., Rainer, D. & Sauls, J. A. Tunneling into current-carrying surface states of high-

*T*_{c}superconductors.*Phys. Rev. Lett.***79**, 2754–2754 (1997). - 15.
Sigrist, M. Time-reversal symmetry breaking states in high-temperature superconductors.

*Progr. Theor. Phys.***99**, 899–929 (1998). - 16.
Honerkamp, C., Wakabayashi, K. & Sigrist, M. Instabilities at [110] surfaces of superconductors.

*Europhys. Lett.***50**, 368–374 (2007). - 17.
Potter, A. C. & Lee, P. A. Edge ferromagnetism from Majorana flat bands: application to split tunneling-conductance peaks in high-

*T*_{c}cuprate superconductors.*Phys. Rev. Lett.***112**, 117002 (2014). - 18.
Higashitani, S. Mechanism of paramagnetic Meissner effect in high-temperature superconductors.

*J. Phys. Soc. Jpn.***66**, 2556–2559 (1997). - 19.
Barash, Y. S., Kalenkov, M. S. & Kurkijarvi, J. Low-temperature magnetic penetration depth in d-wave superconductors: zero-energy bound state and impurity effects.

*Phys. Rev. B***62**, 6665–6673 (2000). - 20.
Löfwander, T., Shumeiko, V. S. & Wendin, G. Time-reversal symmetry breaking at Josephson tunnel junctions of purely

*d*-wave superconductors.*Phys. Rev. B***62**, R14653–R14656 (2000). - 21.
Vorontsov, A. B. Broken translational and time-reversal symmetry in unconventional superconducting films.

*Phys. Rev. Lett.***102**, 177001 (2009). - 22.
Hachiya, M., Aoyama, K. & Ikeda, R. Field-induced reentrant superconductivity in thin films of nodal superconductors.

*Phys. Rev. B***88**, 064519 (2013). - 23.
Higashitani, S. & Miyawaki, N. Phase transition to a time-reversal symmetry-breaking state in

*d*-wave superconducting films with rough surfaces.*J. Phys. Soc. Jpn.***84**, 033708 (2015). - 24.
Miyawaki, N. & Higashitani, S. Temperature dependence of the critical thickness of

*d*-wave superconducting films.*Phys. Procedia***65**, 25–28 (2015). - 25.
Miyawaki, N. & Higashitani, S. Fermi surface effect on spontaneous breaking of time-reversal symmetry in unconventional superconducting films.

*Phys. Rev. B***91**, 094511 (2015). - 26.
Håkansson, M., Löfwander, T. & Fogelström, M. Spontaneously broken time-reversal symmetry in high-temperature superconductors.

*Nat. Phys.***11**, 755–760 (2015). - 27.
Holmvall, P., Löfwander, T. & Fogelström, M. Spontaneous generation of fractional vortex-antivortex pairs at single edges of high-

*T*_{c}superconductors.*J. Phys. Conf. Ser.***969**, 012037 (2018). - 28.
Mermin, N. D. The topological theory of defects in ordered media.

*Rev. Mod. Phys.***51**, 591–648 (1979). - 29.
Effenberger, F. & Weiskopf, D. Finding and classifying critical points of 2D vector fields: a cell-oriented approach using group theory.

*Comput. Vis. Sci.***13**, 377–396 (2011). - 30.
Salomaa, M. M. & Volovik, G. E. Quantized vortices in superfluid

^{3}He.*Rev. Mod. Phys.***59**, 533–613 (1987). - 31.
Walter, H. et al. Low-temperature anomaly in the penetration depth of YBa

_{2}Cu_{3}O_{7}films: evidence for Andreev bound states at surfaces.*Phys. Rev. Lett.***80**, 3598–3601 (1998). - 32.
Suzuki, S.-I. & Asano, Y. Paramagnetic instability of small topological superconductors.

*Phys. Rev. B***89**, 184508 (2014). - 33.
Gottlieb, D. H. & Samaranayake, G. The index of discontinuous vector fields.

*New York J. Math.***1**, 130–148 (1995). - 34.
Jubin, B. A generalized Poincaré-Hopf index theorem. Preprint at http://arxiv.org/abs/0903.0697v2 (2009).

- 35.
Holmvall, P.

*Modeling mesoscopic unconventional superconductors*. Licentiate thesis, Chalmers University of Technology https://research.chalmers.se/publication/253315 (2017). - 36.
Vasyukov, D. et al. A scanning superconducting quantum interference device with single electron spin sensitivity.

*Nat. Nanotechnol.***8**, 639–644 (2013). - 37.
Pelliccione, M. et al. Scanned probe imaging of nanoscale magnetism at cryogenic temperatures with a single-spin quantum sensor.

*Nat. Nanotechnol.***11**, 700–705 (2016). - 38.
Watashige, T. et al. Evidence for time-reversal symmetry breaking of the superconducting state near twin-boundary interfaces in FeSe revealed by scanning tunneling spectroscopy.

*Phys. Rev. X***5**, 031022 (2015). - 39.
Wang, J., Meir, Y. & Gefen, Y. Spontaneous breakdown of topological protection in two dimensions.

*Phys. Rev. Lett.***118**, 046801 (2017). - 40.
Kirtley, J. R. et al. Angle-resolved phase-sensitive determination of the in-plane gap symmetry in YBa

_{2}Cu_{3}O_{7−δ}.*Nat. Phys.***2**, 190–194 (2005). - 41.
Saadaoui, H. et al. Search for broken time-reversal symmetry near the surface of superconducting YBa

_{2}Cu_{3}O_{7−δ}films using*β*-detected nuclear magnetic resonance.*Phys. Rev. B***83**, 054504 (2011). - 42.
Covington, M. et al. Observation of surface-induced broken time-reversal symmetry in YBa

_{2}Cu_{3}O_{7}tunnel junctions.*Phys. Rev. Lett.***79**, 277–280 (1997). - 43.
Dagan, Y. & Deutscher, G. Doping and magnetic field dependence of in-plane tunneling into YBa

_{2}Cu_{3}O_{7−x}: possible evidence for the existence of a quantum critical point.*Phys. Rev. Lett.***87**, 177004 (2001). - 44.
Elhalel, G., Beck, R., Leibovitch, G. & Deutscher, G. Transition from a mixed to a pure

*d*-wave symmetry in superconducting optimally doped YBa_{2}Cu_{3}O_{7−x}thin films under applied fields.*Phys. Rev. Lett.***98**, 137002 (2007). - 45.
Neils, W. K. & Van Harlingen, D. J. Experimental test for subdominant superconducting phases with complex order parameters in cuprate grain boundary junctions.

*Phys. Rev. Lett.***88**, 047001 (2002). - 46.
Deutscher, G. Andreev–Saint-James reflections: a probe of cuprate superconductors.

*Rev. Mod. Phys.***77**, 109–135 (2005). - 47.
Krishana, K., Ong, N. P., Li, Q., Gu, G. D. & Koshizuka, N. Plateaus observed in the field profile of thermal conductivity in the superconductor Bi

_{2}Sr_{2}CaCu_{2}O_{8}.*Science***277**, 83–85 (1997). - 48.
Diao, Z. et al. Microscopic parameters from high-resolution specific heat measurements on superoptimally substituted BaFe

_{2}(As_{1−x}P_{ x })_{2}single crystals.*Phys. Rev. B***93**, 014509 (2016). - 49.
Ma, T. & Wang, S. A generalized Poincaré-Hopf index formula and its applications to 2-D incompressible flows.

*Nonlinear Anal. Real World Appl.***2**, 467–482 (2001). - 50.
Kleman, M. & Lavrentovich, O. D.

*Soft Matter Physics: An Introduction*. (Springer New York, New York, 2004). - 51.
Volovik, G. E.

*The Universe In a Helium Droplet*. (Oxford University Press, Oxford, 2010). - 52.
Eilenberger, G. Transformation of Gorkov’s equation for type II superconductors into transport-like equations.

*Z. Phys.***214**, 195–213 (2005). - 53.
Larkin, A. I. & Ovchinnikov, Y. N. Quasiclassical method in the theory of superconductivity.

*Sov. Phys. JETP***28**, 1200–1205 (1969). - 54.
Shelankov, A. L. On the derivation of quasiclassical equations for superconductors.

*J. Low Temp. Phys.***60**, 29–44 (1985). - 55.
Serene, J. W. & Rainer, D. The quasiclassical approach to superfluid

^{3}He.*Phys. Rep.***101**, 221–311 (1983). - 56.
Eschrig, M., Heym, Jr & Rainer, D. Corrections to Fermi-liquid theory of correlated metals.

*J. Low Temp. Phys.***95**, 323–327 (1994). - 57.
Eschrig, M., Rainer, D. & Sauls, J. A. Effects of strong magnetic fields on pairing fluctuations in high-temperature superconductors.

*Phys. Rev. B***59**, 12095–12113 (1999). - 58.
Sauls, J. A. & Eschrig, M. Vortices in chiral, spin-triplet superconductors and superfluids.

*New J. Phys.***11**, 075008 (2009). - 59.
Nagato, Y., Nagai, K. & Hara, J. Theory of the Andreev reflection and the density of states in proximity contact normal-superconducting infinite double-layer.

*J. Low Temp. Phys.***93**, 33–56 (1993). - 60.
Schopohl, N. & Maki, K. Quasiparticle spectrum around a vortex line in a

*d*-wave superconductor.*Phys. Rev. B***52**, 490–493 (1995). - 61.
Schopohl, N. Transformation of the Eilenberger equations of superconductivity to a scalar Riccati equation. Preprint at http://arxiv.org/abs/cond-mat/9804064v1 (1998).

- 62.
Eschrig, M., Sauls, J. A. & Rainer, D. Electromagnetic response of a vortex in layered superconductors.

*Phys. Rev. B***60**, 10447–10454 (1999). - 63.
Eschrig, M. Distribution functions in nonequilibrium theory of superconductivity and Andreev spectroscopy in unconventional superconductors.

*Phys. Rev. B***61**, 9061–9076 (2000). - 64.
Vorontsov, A. B. & Sauls, J. A. Thermodynamic properties of thin films of superfluid

^{3}He-A.*Phys. Rev. B***68**, 064508 (2003). - 65.
Eschrig, M. Scattering problem in nonequilibrium quasiclassical theory of metals and superconductors: general boundary conditions and applications.

*Phys. Rev. B***80**, 134511 (2009). - 66.
Grein, R., Löfwander, T. & Eschrig, M. Inverse proximity effect and influence of disorder on triplet supercurrents in strongly spin-polarized ferromagnets.

*Phys. Rev. B***88**, 054502 (2013). - 67.
Nagai, Y., Tanaka, K. & Hayashi, N. Quasiclassical numerical method for mesoscopic superconductors: bound states in a circular d-wave island with a single vortex.

*Phys. Rev. B***86**, 094526 (2012).

## Acknowledgements

We thank the Swedish Research Council for financial support. It is a pleasure to thank Mikael Håkansson, Niclas Wennerdal, and Per Rudquist for valuable discussions.

## Author information

### Affiliations

#### Department of Microtechnology and Nanoscience-MC2, Chalmers University of Technology, SE-41296, Göteborg, Sweden

- P. Holmvall
- , M. Fogelström
- & T. Löfwander

#### Department of Physics, Montana State University, Bozeman, MT, 59717, USA

- A. B. Vorontsov

### Authors

### Search for P. Holmvall in:

### Search for A. B. Vorontsov in:

### Search for M. Fogelström in:

### Search for T. Löfwander in:

### Contributions

P.H. carried out the numerical calculations. P.H., A.B.V., M.F., and T.L. analyzed the results. P.H. and T.L. wrote the paper with contributions from A.B.V. and M.F.

### Competing interests

The authors declare no competing interests.

### Corresponding author

Correspondence to T. Löfwander.

## Electronic supplementary material

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.