## Main

CeCoIn5 undergoes a superconducting transition at 2.3 K. Despite evidence of unconventional pairing, consensus on the mechanism of pairing and direct experimental verification of the order parameter symmetry are still lacking6,7,8,9,11. Moreover, experiments have suggested that superconductivity in this compound emerges from a state of unconventional quasiparticle excitations with a pseudogap phase similar to that found in underdoped high- Tc cuprates15,16,17. Previously, we demonstrated that scanning tunnelling spectroscopic techniques can be used to directly visualize the emergence of heavy fermion excitations in CeCoIn5 and their quantum critical nature12. Through these measurements, we also demonstrated the composite nature of heavy quasiparticles and showed their band formation as the f-electrons hybridize with the s p d-electrons starting at 70 K, well above Tc (ref. 12). This previous breakthrough, together with our recent development of high-resolution millikelvin STM, offers a unique opportunity to measure how superconductivity emerges in a heavy electron system.

Figure 1 shows STM topographs of the two commonly observed atomically ordered surfaces of CeCoIn5 produced after the cleaving of single crystals in situ in the ultra-high vacuum environment of our millikelvin STM. We have previously shown through experiments and theoretical modelling that different surface terminations change the coupling between the tunnelling electrons and the composite heavy fermion excitations in this compound12. Tunneling into such composite states can be influenced not only by the coupling of the tip to the spd- or f-like components of such states but also by the interference between these two tunnelling processes. On surface A, tunnelling measurements are more sensitive to the lighter component of the composite band structure and, accordingly, the spectra show evidence for a hybridization gap centred at +9 mV, as shown in Fig. 1c. At temperatures below Tc, this hybridization gap is modified by the onset of an energy gap associated with superconductivity (Fig. 1c,e), as further confirmed by its suppression with the application of a magnetic field larger than the bulk upper critical field (HC2 = 5.0 T perpendicular to the basal plane of this tetragonal system) of CeCoIn5 (see Supplementary Section SI).

Instead of focusing on measurements of surface A, where the tunnelling is dominated by the lighter part of the composite band, we turn to measurements of surface B. On this surface, tunnelling directly probes narrow bands of heavy excitations, which result in a peak in the density of states near EF (Fig. 1d). Lowering the temperature from 7.2 to 5.3 K, above Tc, we find that this peak is modified by the onset of a pseudogap-like feature at a smaller energy scale. Further cooling shows the onset of a distinct superconducting gap below Tc inside the pseudogap. Measurements in a magnetic field corroborate our finding that the lowest energy scale on surface B (±500 μV, as shown in Fig. 1e) is indeed associated with pairing, as it disappears above HC2, whereas the intermediate energy scale pseudogap remains present at low temperature in the absence of superconductivity at high magnetic field (Fig. 1f). This behaviour is reminiscent of the pseudogap found in underdoped cuprates, where the superconducting gap opens inside an energy scale describing strong correlations that onset above Tc. However, unlike cuprates, here we clearly distinguish between the two energy scales by performing high-resolution spectroscopy in a magnetic field large enough to fully suppress superconductivity. Detailed measurements of changes in the spectra with the magnetic field also confirm that the transition out of the superconducting state at HC2 is first order (see Supplementary Section SI), showing that our measurements are consistent with the bulk phase diagram of CeCoIn5.

The spectroscopic measurements suggest that electronic or magnetic correlations alter the spectrum of heavy excitations by producing a pseudogap within which pairing takes place. These measurements also show the shapes of the spectra at the lowest temperature to be most consistent with a d-wave superconducting gap, as they have a nearly linear density of states near zero energy (Fig. 1e). However, measurements on all surfaces and on several samples reveal that this d-wave gap (with a magnitude of 535±35 μV, consistent with that extracted from point contact data18,19), is filled (40%) with low-energy excitations—a feature that cannot be explained by simple thermal broadening (determined to be 245 mK from measurements on a single-crystal Al sample, see Supplementary Section SII). The complex multiband structure of CeCoIn5 could involve different gaps on different Fermi surface sheets, and there is the possibility that some remain ungapped even at temperatures well below Tc (ref. 20). Another contribution to the in-gap density of states could come from surface impurities, because even non-magnetic impurities perturb a nodal superconductor, as we demonstrate below. Before we address the nature of the in-gap excitations, we first demonstrate in more detail the connection between pairing and the heavy fermionic states of CeCoIn5.

Energy-resolved spectroscopic mapping with STM can be used to measure the quasiparticle interference (QPI) to examine the heavy Fermi surface. As shown in Fig. 2a–d, features in the discrete Fourier transform (DFT) of these maps show wave vectors related to the elastic momentum transfer Q(E), connecting the initial and the final momentum states on the contours of constant energy. Previous theoretical calculations, quantum oscillation, and angle resolved photoemission spectroscopy measurements have shown CeCoIn5 to have a complex three-dimensional (3D) band structure, with the α and β bands being the most relevant near EF (Fig. 2e)21,22,23. Our previous QPI measurements on surface A show features that are most consistent with 2kF scattering originating from the α band. The QPI measurements presented here on surface B exhibit scattering wave vectors originating from a larger Fermi surface volume and are more consistent with scattering involving the β band (see Supplementary Section SIV). As QPI does not probe the Fermi surface directly, inferring a unique Fermi surface in a 3D, multi-band material without making a large number of assumptions is not possible (see Supplementary Section SV). Nevertheless, the results of QPI measurements (Fig. 2a–d), together with spectroscopic measurements (Fig. 1d), demonstrate that the superconducting instability occurs within a correlated heavy quasiparticle band of CeCoIn5 with a large density of states at the Fermi energy.

We focus our discussion next on the momentum structure of the superconducting gap, first by examining the conductance maps in this energy window on the same area of the sample (with the same tip) in the normal (H>HC2) and superconducting (H = 0) states of CeCoIn5. As the data in Fig. 2f–o demonstrate, we observe clear differences between the DFT maps in the superconducting (H = 0) and normal states (H = 5.7 T). Typically, QPI at low energies in a superconductor is associated with the scattering of Bogoliubov–de Gennes (BdG) excitations and is often analysed to obtain information about the momentum structure of the superconducting gap24,25,26. In particular, contrasting the zero-energy DFTs in the superconducting (Fig. 2h) and normal (Fig. 2m) states, we see an enhancement of QPI at wave vector Q3 (see also Supplementary Section SVII), suggestive of nodal BdG quasiparticles in a d-wave superconductor. However, if such features were only due to BdG-QPI, then they should exhibit a particle–hole symmetric dispersion in their energy-momentum structure away from the nodes, as seen for example in similar measurements of high- Tc cuprates24. The absence of such particle–hole symmetry in our data (Fig. 2f–j), together with the large zero-bias density of states (40%, see Fig. 1e), suggests that such QPI measurements are complicated by an ungapped portion of the Fermi surface or by in-gap impurity-induced states, which are expected to have a particle–hole asymmetric structure (see measurements and discussion below). These complications, together with the complex 3D nature of the Fermi surface of this compound, make extraction of the gap function from such QPI measurements unreliable (see Supplementary Section SVI).

In contrast, using the power of STM to probe the real space structure of electronic states, it is still possible to find direct spatial signatures of the nodal character of superconductivity in CeCoIn5 that do not require multi-parameter modelling or ad hoc assumptions to interpret. The first such signature can be found by examining the response of low-energy excitations to extended potential defects such as atomic step edges. Spectroscopic mapping with STM on approaching such steps shows direct evidence for the suppression of superconductivity in their immediate vicinity (Fig. 3a,b). This suppression is consistent with the expected response of a nodal superconductor to non-magnetic scattering (Fig. 3c), analogous to similar observations in the cuprates27, and in marked contrast with our step-edge measurements of the conventional s-wave superconductor Al (see Supplementary Section SII). The data in Fig. 3d provide a direct measure of the Bardeen–Cooper–Schrieffer (BCS) coherence length28 ξBCS = 56±10 Å, in agreement with ξBCS(νF)/(πΔ)60 Å using the gap observed in Fig. 1 (0.5 meV) and the Fermi velocity extracted from Fig. 2 (1.5×106 cm s−1).

Application of a magnetic field can also be used to probe the local suppression of heavy fermion superconductivity in CeCoIn5 due to the presence of vortices and the Abrikosov lattice. As shown in Fig. 4a,b, STM conductance maps can be used to directly visualize the vortex lattice in this compound, which can have different structures depending on the magnetic field. Such structural changes of the vortex lattice (transition between rhombic and square lattices) have been previously studied in neutron scattering experiments29 and various theoretical models30. Complementing these efforts, STM can be used to probe the electronic states within the vortex core directly, as shown in Fig. 4d, to demonstrate the presence of a zero-energy vortex bound state. Analysis of this core state demonstrates the anisotropic decay of the vortex bound state (Fig. 4c,e and see Supplementary Section SVIII), the angular average (Fig. 4e) of which determines the Ginzburg–Landau coherence length scale (ξGL = 48±4 Å), consistent with an independent estimate from dHc2/$\text{d}T{|}_{T={T}_{\text{C}}}$ (ref. 31). Although observation of such anisotropy is consistent with the nodal character of pairing, an understanding of the role of the underlying Fermi surface symmetry and vortex–vortex interactions is required to model the STM data in more detail.

A more spectacular demonstration of the nodal pairing character in CeCoIn5 can be obtained from examining the spatial structure of in-gap states associated with defects on the surface of cleaved samples. The spatial structure of impurity quasi-bound states, which are mixtures of electron-like and hole-like states, can be a direct probe of the order parameter symmetry28,32. Figure 5 shows an extended defect with a four-fold symmetric structure, which perturbs the low-energy excitations of CeCoIn5 by inducing an in-gap state. Probing the spatial structure of these impurity states, we not only find their expected electron–hole asymmetry, but also find that their orientation is consistent with that predicted for a ${d}_{{x}^{2}-{y}^{2}}$ superconductor (Fig. 5b–e and Supplementary Section SIX)32. The minima (maxima) in the oscillations for hole-like (electron-like) states identify the nodes of the d-wave order as occurring at 45° to the atomic axes (Fig. 5h). In fact, these features in STM conductance maps are identical to those associated with Ni impurities in high- Tc cuprates28,33. However, in contrast to measurements in the cuprates, we are able to determine the spatial structure that such impurities induce on the normal state by suppressing pairing at high magnetic fields. Such measurements allow us to exclude the influences of the normal state band structure, of the impurity shape, or of the tunnelling matrix element28 on the spatial symmetries of the impurity bound state in the superconducting state. Contrasting such measurements for H>HC2 (in Fig. 5f,g) with measurements on the same impurity for H = 0 (Fig. 5d,e) we directly visualize how nodal superconductivity in CeCoIn5 breaks the symmetry of the normal electronic states in the vicinity of a single atomic defect.

The appearance of a pseudogap and the direct evidence for ${d}_{{x}^{2}-{y}^{2}}$ superconductivity reported here, together with previous observations of the competition between antiferromagnetism and superconductivity, closely ties the phenomenology of the Ce-115 system to that of the high-temperature cuprate superconductors. An important next step in extending this phenomenology would be to explore how the competition between antiferromagnetism and superconductivity manifests itself on the atomic scale in STM measurements. Similarly, extending our studies of the electronic structure in magnetic vortices could be used to examine the competition between different types of ordering in the mixed state, and the possible development of the Fulde–Ferrell–Larkin–Ovchinnikov state in this Pauli-limited superconductor29,34,35.

## Methods

The single-crystal samples (1.5 mm×1.0 mm×0.2 mm) used for this study were grown from excess indium at Los Alamos National Laboratory, and were then cleaved along the c-axis in ultra-high vacuum at room temperature before performing STM measurements. All data shown from surface B were taken on an undoped sample of CeCoIn5; all surface A measurements were performed on a sample with an effective doping of 0.15% Hg. Bulk transport properties of both samples are indistinguishable. Conductance measurements were made using standard a.c. lock-in techniques, with a bias applied to the sample, and were reproduced on different large, atomically flat areas of the sample, having different defect concentrations, and under multiple tunnelling conditions ranging up to two orders of magnitude in set-point current.