Main

The experimental set-up is shown in Fig. 1a. Individual pentacene molecules were adsorbed onto a dedicated support structure to electrically gate the molecule against the tip potential and—at the same time—apply radio-frequency (RF) magnetic fields. This is achieved by a gold microstrip on a mica disc, covered by an insulating NaCl film that is thick enough to prevent electron tunnelling between the molecule and the microstrip. A gate voltage VG was applied to the microstrip to control single-electron tunnelling between the molecule and the conductive tip of the atomic force microscope14. RF magnetic fields were generated from an RF current sent through the microstrip. Experiments were performed at a temperature of 8 K.

Fig. 1: Set-up, triplet decay under resonant driving and ESR-AFM spectra.
figure 1

a, Sketch of the experimental set-up. Individual pentacene molecules were adsorbed on a Au(111) microstrip on a mica disc, covered by a NaCl film (>20 monolayers), preventing electron tunnelling between microstrip and molecule. A time-dependent gate voltage VG was applied to the strip to repeatedly bring the molecule in the neutral triplet excited state T1 (represented by the two arrows) by two subsequent tunnelling events between molecule and conductive tip. During an experimentally controlled dwell time tD, the neutral molecule can decay to the singlet ground state. An RF current IRF was run through the microstrip to generate an RF magnetic field. After tD, the final state of the molecule was read out as described in Methods. b, Decay of the T1 state as measured without RF (red) and with a broadband (see Methods) RF pulse (black). T1 is zero-field-split into three states TX, TY and TZ having different lifetimes (inset), such that the RF pulse driving the TX–TZ transition changes the resulting overall decay. Solid lines represent fits to triple-exponential decays. Each data point corresponds to 1,920 pump–probe cycles and the error bars were derived from the s.d.; see ref. 15. c,d, ESR-AFM spectra of the TX–TZ and TX–TY transitions of a pentacene-h14, respectively. The RF was swept at a constant tD = 100.2 μs. The AFM signal Δf was normalized to Δfnorm as described in Methods. It can be calibrated against the triplet population15 at tD; see right axes. The error bars were derived from the s.d. of seven and 38 measurements, respectively.

To drive and probe ESR transitions, we first bring the closed-shell pentacene molecule to the excited triplet state T1 by driving two tunnelling events with pump pulses of VG (refs. 15,16), first extracting an electron from the highest occupied molecular orbital (HOMO) and then injecting an electron into the lowest unoccupied molecular orbital (LUMO). The two unpaired electrons in the HOMO and LUMO form the triplet. As shown previously15, the subsequent decay from T1 into the singlet ground state S0 can be measured by transferring the remaining population in T1 after a controlled dwell time tD to the cationic charge state, whereas pentacene in S0 remains neutral (see Extended Data Fig. 1). The two charge states, cationic and neutral, can then be discriminated in the AFM signal17 owing to their different electrostatic force acting on the tip during a probe period, allowing the population decay of state T1 to be measured as a function of tD (ref. 15). Notably, the cationic state is only used to create the triplet state and facilitate the readout, whereas the ESR spectroscopy and spin manipulation described below occurs in the neutral triplet state.

As seen in Fig. 1b (red curve), the population decay of the T1 state reflects the three lifetimes τX = 21 μs, τY = 67 μs and τZ = 136 μs of the three zero-field-split triplet states TX, TY and TZ, differing from each other markedly (see Methods for the spin Hamiltonian). Driving an ESR transition between two of these states by an RF magnetic field of matching frequency effectively equilibrates their populations and thereby strongly affects the overall population decay of the T1 state18,19. This is shown in Fig. 1b (black curve), for which the TX–TZ transition was driven at 1,540 MHz. Around a tD of 100 μs, the change in the triplet population owing to the RF field is maximal for this transition.

To measure an ESR-AFM spectrum of this transition, we therefore fixed tD to 100.2 μs and recorded the triplet population as a function of frequency fRF of the driving field. In this single-molecule experiment, the pump–probe cycle (Extended Data Fig. 1) was repeated 6,400 times in 20 s for every data point, whereas the AFM signal Δf (see Methods) was measured and time averaged, yielding Δf. This Δf is mainly determined by the probe phases because they make up for approximately 95% of the total time. As indicated above, during these probe phases, the outcome of the previous triplet-decay period is read out through the charge state of the molecule. From Δf, a dimensionless normalized frequency shift Δfnorm was derived, which scales linearly with the triplet population; for details, see Methods and Extended Data Fig. 2.

Figure 1c shows the resulting ESR signal with an asymmetric shape, which closely resembles the signal shape obtained with optically detected magnetic resonance (ODMR)18,19. This asymmetric shape entails information about the nuclear spin system of the molecule; it arises from the hyperfine coupling of the 14 proton nuclear spins to the electron spins (see Methods and Extended Data Fig. 3). Note that this signal was measured at low RF powers, at which power broadening20 was negligible (Extended Data Fig. 4).

The aforementioned data-acquisition scheme was optimized for both swiftness and signal-to-noise ratio. We note that—at slower timescales—every single triplet-to-singlet decay event can be probed individually15, providing absolute information about the spin population, as exemplarily demonstrated by the right axis in Fig. 1c.

Also, the TX–TY transition at 115 MHz can be probed with this technique (see Fig. 1d), being very similar to that for pentacene in a terphenyl matrix21. Note that the smaller ESR signal in this case is because of the smaller difference of the TX and TY decay rates.

These ESR spectra were acquired in the absence of a static external magnetic field and therefore probe the zero-field splitting of T1 (refs. 18,19). This splitting arises predominantly from the dipole–dipole interaction of the two unpaired electron spins. It is therefore governed by the spatial distribution of the triplet state (see Extended Data Fig. 3 and Methods) and can serve as a fingerprint of the molecule. The shift of the TX–TZ transition frequency by 60 MHz (about 4% of its value) with respect to pentacene molecules in a host matrix18,19 can be rationalized by the different environments. Figure 2 demonstrates such fingerprinting for perylenetetracarboxylic dianhydride (PTCDA) in comparison with pentacene, along with an atomically resolved AFM image.

Fig. 2: ESR-AFM spectra of PTCDA and pentacene.
figure 2

a, ESR-AFM spectra of pentacene-d14 and PTCDA over a broad frequency range. Each molecule shows a sharp line at a characteristic frequency corresponding to its intrinsic zero-field splitting. Note that, for PTCDA, there is a very small signal at 1,501 MHz (not shown) that is too small to be observed at the parameters used here (see Methods). The molecules were measured under identical parameters (error bars are s.d. of twelve repetitions for PTCDA and seven repetitions for pentacene-d14), except for Vdeg (which is specific to the molecule) and the dwell pulse parameters: VD = 2.5 V, tD = 100.2 μs for pentacene-d14, VD = 2.35 V, tD = 501 μs for PTCDA (see Methods). b, Spectral zoom-in of the feature around 1,250 MHz of the PTCDA molecule, revealing its asymmetric lineshape (error bars are s.d. of eight repetitions). Note that the asymmetric shoulder appears here at the low-frequency side, indicative of the TY–TZ transition (see Methods). c, Constant-height AFM image atomically resolving two PTCDA and a pentacene molecule, measured with a CO-functionalized tip (z-offset Δz = −3.1 Å with respect to the set point: Δf = −1.05 Hz at V = 0 V, oscillation amplitude A = 0.55 Å). The two molecules, above which the spectra were taken, are labelled as ‘A’ for pentacene-d14 and ‘B’ for PTCDA. The weaker features seen around the molecules are because of probe-tip imperfections. Scale bar, 10 Å.

ESR-AFM, as introduced here, relies on selective triplet formation by electron tunnelling between the tip and the frontier orbitals of the molecule15. Therefore, the spatial resolution of the ESR-AFM signals is predominantly determined by the distance dependence of these tunnelling processes22, allowing the unambiguous assignment of a given ESR spectrum to the individual molecule beneath the tip (see Extended Data Fig. 5). Similarly, the required tunnelling coupling restricts tip heights to a certain range (see Methods).

The narrow ESR line in Fig. 1c already indicates a long coherence time. To demonstrate the long coherence enabled by our new detection scheme, we measured Rabi oscillations23. The Rabi oscillations measured on a pentacene molecule shown in Fig. 3a demonstrate that coherent spin manipulation on a microsecond timescale is possible. In this experiment (Extended Data Fig. 6), the three triplet states were allowed to decay independently during tS = 45.1 μs, resulting in a strong imbalance of their populations, with the longest-lived TZ being dominant. Subsequently, an RF pulse of variable duration (tRF = 0 to 7 μs) at resonance with the TX–TZ transition was applied, driving the population to oscillate between TZ and TX. During the remaining roughly 50 μs of a fixed total tD = 100.2 μs, the triplet states again decayed independently from each other, such that—after each pulse sequence—predominantly the TZ population remained and was detected. Note that this Rabi-oscillation measurement scheme gives rise to an overall decaying trend of Δfnorm (see blue line in Fig. 3a and Methods). The assignment as Rabi oscillations is confirmed by the linear dependence of the Rabi frequency on the RF amplitude (see Extended Data Fig. 7).

Fig. 3: Rabi oscillations and ESR-AFM spectra of a protonated and perdeuterated pentacene molecule.
figure 3

a, Rabi oscillations from driving the TX–TZ transition (fRF = 1,540.5 MHz) showing coherent spin manipulation. The pump–probe pulse scheme is shown in the inset (tD = 100.2 μs, tS = 45.1 μs, tRF variable) and described in the main text (error bars are s.d. of four repetitions). The predominant contribution to T1 is TZ at tRF = 0, then starting to oscillate towards a predominant contribution of TX and back, as indicated for the first oscillation. A fit (grey line) yields a decay constant of the Rabi oscillations of 2.2 ± 0.3 μs (see Methods for details on the fit of the baseline (blue line)). b, ESR-AFM spectrum of pentacene-d14 (red), exhibiting a much narrower resonance in comparison with pentacene-h14 (grey). The decreased hyperfine interaction leads to a reduced width of the high-frequency tail. The left flank of the signal corresponds to a broadening of only 0.12 MHz. The error bars result from the s.d. of eight (pentacene-d14) and seven (pentacene-h14) repetitions. c, The Rabi oscillations of pentacene-d14 have a longer decay time of 16 ± 4 μs. The pump–probe pulse scheme was the same as that used for a (error bars are s.d. of eight repetitions) but with tS = 30 μs (see Methods).

A decay constant of 2.2 ± 0.3 μs was extracted from the fit in Fig. 3a. Even though a single-molecule experiment avoids ensemble averaging, it still averages over possible fluctuations occurring in time. Here the nuclear spin configurations will fluctuate from pump–probe cycle to pump–probe cycle, giving rise to the peculiar lineshape reflecting all different nuclear spin configurations (Fig. 1c,d). Similarly, the measured oscillations represent an average over finding the individual pentacene molecule in different nuclear spin configurations and, consequently, of a resonance and thus a Rabi frequency differing for every individual pump–probe cycle. Hence, the observed decay of the oscillations is probably dominated by the dephasing from the fluctuating Rabi frequency, limiting the coherence time24. Reducing the hyperfine interaction could then increase the coherence time further.

To this end, we studied pentacene-d14, that is, fully deuterated pentacene, the ESR spectrum of which is shown in Fig. 3b. Comparing with pentacene-h14, the peak shape is similar but its high-frequency tail is reduced in width by a factor of approximately 14. We suggest this reduction to be the result of the smaller hyperfine interaction of deuterium; the width is now probably dominated by nuclear electric quadrupole interaction21. The left flank of the signal exhibits a broadening of 0.12 MHz (full width at half maximum; see Methods), corresponding to less than a nanoelectronvolt in spectral resolution. The Rabi oscillations on pentacene-d14 exhibit a much longer decay time of 16 ± 4 μs (see Fig. 3c). This shows that, in the above-described experiments on protonated pentacene, the coherence was limited by the molecule itself and not by the method.

Notably, in force-detected ESR, as introduced here, no decoherence owing to tunnelling electrons is induced, as not even a single electron needs to be sent through the molecule during the ESR pulse. Further, as ESR-AFM does not rely on a finite conductance to the substrate, scattering with the electron bath of a conducting substrate is absent as a decoherence source9,12,25 and there are no electronic states available for scattering in the thick NaCl film close to the Fermi level. Although scattering with conduction electrons in the tip remains possible, decoherence owing to the latter is expected to be small because of the weak tunnel coupling. Indeed, varying the tip height and cantilever oscillation amplitude does not appreciably affect the Rabi oscillations (see Extended Data Fig. 8). Moreover, the ESR-AFM technique introduced here does not require a magnetic tip2 and thereby avoids interaction between the spin system and the magnetic stray field of the tip5,9,13. Nonetheless, the molecules under study are subject to many further interactions and decoherence sources, such as hyperfine coupling inside the molecule24 and to nuclei in the substrate, coupling to neighbouring molecules26 and to substrate defects such as step edges, and the electric field penetrating from the tip. We believe that, by avoiding various strong decoherence sources, ESR-AFM will give access to these interactions of the environment occurring on a much smaller magnitude of coupling. For example, we observed an appreciable Stark shift of the TX–TZ transition27 of pentacene-d14 (not shown) on the order of 0.3 MHz on changing the voltage by 1 V in the tip–sample junction. It seems likely that this Stark shift together with the cantilever oscillation contributes to the small but finite linewidth, as well as the observed decoherence in our experiments. The Stark shift might also be exploited in future scanning-gate-type experiments28.

Demonstrating the combination of single-spin sensitivity and atomic-scale local information, we locally identified a single pentacene-h-d13 of the otherwise deuterated pentacene molecules from its spectral signature (comparing with ODMR data29) and imaged it in its unique environment, as shown in Fig. 4a,b. The hyperfine interaction generally offers a way to manipulate and probe nuclear spins—featuring even longer coherence times30—by means of the electronic spin system31. Further, the interplay of selection rules and molecular orientation can be visualized at atomic scales, as shown in Fig. 4c,d: the TX–TZ transition is driven by the component of the RF magnetic field along the short molecular axis32 (see Methods), which obviously depends on the azimuthal orientation of the molecule, giving rise to a corresponding Rabi frequency being proportional to the projection of the RF field along the short axis of the molecule (see Fig. 4c). By contrast, the TX–TY transition is driven only by the RF-field component perpendicular to the molecular plane. As the latter always coincides with the surface plane, the corresponding Rabi frequency should be the same for all molecules, as exemplified in Fig. 4d.

Fig. 4: ESR-AFM spectra and Rabi oscillations of differently oriented molecules and different isotopologues of pentacene.
figure 4

a, AFM topography image of the NaCl-covered surface with several individual pentacene molecules measured with a CO-functionalized tip (set point: Δf = −1.45 Hz at V = 0 V, oscillation amplitude A = 1.65 Å). The inset shows a constant-height AFM image as a close-up of molecule 2 resolving its structure (A = 0.3 Å, Δz = −5.08 Å with respect to the set point Δf = −1.45 Hz at V = 0 V, A = 0.3 Å). Scale bars, 30 Å (main), 5 Å (inset). b, Although the ESR-AFM spectra of two individual pentacene-d14 (red (denoted ‘2’ in a) and grey (denoted ‘3’)) molecules are very similar, that of another isotopologue, pentacene-h-d13 (blue (denoted ‘1’)) differs clearly (note that the grey dataset is offset by 0.19 with respect to the right axes) (error bars are s.d. of four repetitions). c,d, Rabi oscillations of the TX–TZ and TX–TY transitions (error bars are s.d. of eight and ten repetitions, respectively) of the two individual molecules 2 and 3. Although for the same RF power the Rabi frequency of the TX–TY transition for the two molecules is comparable, that of the TX–TZ transition differs by almost a factor of three, in agreement with their different adsorption orientation and the selection rules (see text). For the reproducibility on other individual molecules, see Extended Data Fig. 9.

The single-molecule ESR-AFM as introduced here opens several new research directions simultaneously. The system is brought to and studied at out-of-thermal-equilibrium and thereby eliminates the need to measure at (below) liquid-helium temperatures and large magnetic fields. Experiments in the absence of a static external magnetic field enable fingerprinting molecules from their zero-field splitting. The spin coherence on the 10-μs scale demonstrated here represents a leap forward for local studies of future artificial quantum systems and fundamental local quantum-sensing experiments. Directly resolving the atomic-scale geometry in relation to minute differences in zero-field splitting, spin–spin coupling, spin decoherence, as well as hyperfine coupling will boost our atomistic understanding of the underlying mechanisms. In combination with the toolset of atom manipulation, such as spin33 and charge-state control17, this will open a new arena for future fundamental studies.

Methods

Set-up and sample preparation

Our measurements were performed under ultrahigh vacuum (base pressure, p < 10−10 mbar) with a home-built conductive-tip atomic force microscope equipped with a qPlus sensor34 (resonance frequency, f0 = 30.0 kHz; spring constant, k ≈ 1.8 kNm−1; quality factor, Q 1.9 × 104 and 2.8 × 104) and a conductive Pt-Ir tip. The microscope was operated in frequency-modulation mode, in which the frequency shift Δf of the cantilever resonance is measured. The cantilever amplitude was 0.55 Å (1.1 Å peak to peak), except if specified otherwise. Constant-height AFM images were taken at tip-height changes Δz with respect to the set point, as indicated. Positive Δz values indicate being further away from the surface.

As a sample substrate, we used a cleaved mica disc, on which we deposited gold in a loop structure (diameter, d = 10.5 mm; thickness, t = 300 nm) by means of electron-beam physical vapour deposition. This gold structure contained a 100-μm-wide constriction, on which the measurements were performed. A non-conducting spacer material was introduced below the mica disc to prevent eddy-current screening of the RF magnetic field. The sample was prepared by short sputtering and annealing cycles (annealing temperature, T ≈ 550 °C) to obtain a clean Au(111) surface. On half of the sample, a thick NaCl film (>20 monolayers) was grown at a sample temperature of approximately 50 °C; the other half of the sample was used for tip preparation, presumably resulting in the tip apex being covered with gold. Part of the data was measured with a CO-functionalized tip apex. To this end, a sub-monolayer coverage of NaCl was also deposited on the whole surface at a sample temperature of approximately 35 °C, to grow two monolayer NaCl islands also on the half of the sample used for tip preparation. After preparing a tip by indenting into the remaining gold surface, a CO molecule was picked up from the two monolayer NaCl islands, after which the tip was transferred to the thick NaCl film35. The NaCl film inhibits any electrons to tunnel to or from the gold structure. The voltage that is applied to the gold structure with respect to the tip represents a gate voltage (VG), gating the molecular electronic states against the chemical potential of the conductive tip. The measured molecules (pentacene-h14 and PTCDA-h8, Sigma-Aldrich; pentacene-d14, Toronto Research Chemicals) and CO for tip functionalization were deposited in situ onto the sample inside the scan head at a temperature of approximately 8 K. Pentacene was reported to adsorb centred above a Cl anion with the long molecular axis aligned with the polar direction of NaCl, resulting in two equivalent azimuthal orientations36.

The AC voltage pulses were generated by an arbitrary waveform generator (TGA12104, Aim-TTi), combined with the DC voltage, fed to the microscope head by a semi-rigid coaxial high-frequency cable (Coax Japan Co. Ltd.) and applied to the gold structure as VG. The high-frequency components of the pulses of VG lead to spikes in the AFM signal because of the capacitive coupling between the sample and the sensor. To suppress these spikes, we applied the same pulses with opposite polarity and adjustable magnitude to an electrode that capacitively couples to the sensor.

The RF signal was produced by a software-defined radio (bladeRF 2.0 micro xA4, Nuand), low-pass filtered to eliminate higher-frequency components and amplified in two steps (ZX60-P103LN+, Mini Circuits; KU PA BB 005250-2 A, Kuhne electronic). The RF was pulsed using RF switches (HMC190BMS8, Analog Devices), which were triggered by the arbitrary waveform generator, allowing synchronization with VG and control over the pulse duration. The pulsed RF signal was fed into the microscope head by a semi-rigid coaxial high-frequency cable (Coax Japan Co. Ltd.) ending in a loop, inductively coupling the RF signal to the gold loop on the sample. These two loops are in the surface plane of the sample, such that the inductive coupling adds a vertical z component to the magnetic field. The field generated by the microstrip is associated to field lines looping around the microstrip (Ampère’s law). At the position of a molecule placed above the strip, the local magnetic field resulting from the microstrip is expected to be homogeneous, in the surface plane and perpendicular to the direction of the microstrip.

The RF signal transmission of the cables including the loop for inductive coupling was detected by a magnetic field probe and can be well approximated to be constant over intervals of tens of megahertz around the TX–TZ transition, that is, wider than the spectral features observed in the experiments. Although the microstrip will contribute to the overall transmission of the signal to the local magnetic field, it is expected to not introduce any resonances in the frequency range of interest. Note that the RF signal at a frequency of 1,500 MHz has a wavelength roughly three times the entire circumference of the loop of the microstrip.

To excite the entire broadened ESR resonance for the lifetime measurements of the triplet state T1 with RF, shown in Fig. 1b, we used IQ modulation to generate a broadband RF pulse. We created a chirped pulse with a width of 12 MHz, a repetition time of 5 μs and a centre frequency of 1,544 MHz. Thereby, the RF signal spans the range 1,538–1,550 MHz in frequency space.

ESR-AFM pulse sequence and data acquisition

The description of the measurement of the triplet-state lifetime can be found in ref. 15. The ESR-AFM experiments were performed with a similar voltage-pulse sequence, which is shown in Extended Data Fig. 1. Between each individual voltage-pulse sequence, the voltage is set to Vdeg, the bias voltage, at which the respective ground states of the positively charged (D0) and the neutral (S0) molecules are degenerate. This way, the spin states of the molecule are converted to different charge states and detected15 by charge-resolving AFM (ref. 17). The dwell voltage pulse duration tD was fixed to 100.2 μs for pentacene and, simultaneously, an RF pulse with a variable frequency was applied. In the case of PTCDA, the triplet lifetimes were determined to be 350 ± 43  µs, 170 ± 13 µs and 671 ± 62 µs, and tD was set to 501 µs for the ESR-AFM spectra shown. To reduce the statistical uncertainty for a given data-acquisition time, we repeated the pump–probe pulse sequence 160 or 320 times per second (instead of eight times per second for the lifetime measurements of the triplet state T1). Note that, to prevent the excitation of the cantilever, the durations of the voltage pulses were set to an integer multiple of the cantilever period (33.4 μs). At this high repetition rate of the voltage-pulse sequence, the charge states cannot be read out individually. Instead, the AFM signal, that is, the frequency shift Δf, was averaged over an interval of 20 s. This average frequency shift Δf reflects the ratio of the charged and neutral states and thus the triplet and singlet states, but because the change in Δf is very small, it is also sensitive to minor fluctuations in the tip–sample distance (see Extended Data Figs. 2c and 5b). To minimize the fluctuations in tip–sample distance, the tip–sample distance was reset by shortly turning on the Δf feedback either after every sweep of the RF or after a fixed time (15 to 60 min). To minimize the dependence of Δf on the remaining fluctuations in tip height, Δf was normalized using the frequency shifts of the charged Δf+ and neutral Δf0 molecule, as \({\Delta f}_{{\rm{norm}}}=\frac{\langle \Delta f\rangle -{\Delta f}^{0}}{{\Delta f}^{+}-\Delta {f}^{0}}\). These frequency shifts were determined at the beginning and end of every 20-s data trace (see Extended Data Fig. 2a); the charge state was changed by applying small voltage pulses (\({V}_{{\rm{set}}}^{0}={V}_{{\rm{\deg }}}+0.3\,{\rm{V}}\), \({V}_{{\rm{set}}}^{+}={V}_{{\rm{\deg }}}-0.3\,{\rm{V}}\)). Tunnelling events during the readout of these frequency shifts were minimized by using a tip–sample distance at which the decay constant for the decay of the D0 state into the S0 state during a pulse of Vdeg + 1.2 V was around 4 μs (note that this requirement restricts the possible distances to a small range, as the tip height should also be small enough such that the tunnelling processes are considerably faster than the triplet decay; see also discussion of the spatial resolution in the main text).

If still a charging event happened, the data trace was discarded. To maximize the rate of the tunnelling processes during the voltage-pulse sequence, the beginning and end of the voltage pulses were synchronized with the closest turnaround point of the cantilever movement. The data-acquisition and renormalization scheme to derive Δfnorm is shown in Extended Data Fig. 2. As can be seen in Extended Data Figs. 2c and 5b, also the raw Δf signal exhibits the ESR features but with stronger baseline drift.

Note that Δfnorm typically deviates from the triplet population, but that, for a given measurement, a linear relation between them exists. This deviation arises from the voltage pulses that are for pentacene turned on for 4.3% of the time, during which the frequency shift corresponds to the applied voltages and thus crucially depends on the exact shape of the Kelvin probe force parabola17. This explains the differences in the baseline of the Δfnorm signal (without RF or RF off-resonance) for different measurements—even for those above the same molecule—owing to differences in the position above the molecule. Quantitative results (right axis of Fig. 1c,d) can be obtained from a calibration measurement in which the population was determined by counting the individual outcomes after each pulse sequence at a repetition rate of eight per second. This calibration was performed for an RF corresponding to the maximum of the ESR signal, as well as an RF that was off-resonance. For both cases, 7,680 pump–probe cycles were recorded.

Note that we do not observe any appreciable change in the damping of the cantilever during an RF sweep.

Experimental uncertainties and statistical information

To determine the uncertainty on the ESR-AFM data points, the 20-s data traces were repeated several times and the error bars were extracted as the s.d. of the mean of these repetitions. This way, any type of non-systematic uncertainty will be accounted for, irrespective of its source (see next paragraph). Note that the hydrogen spins can have a different configuration for every individual readout19. Given our large number of sampling events, we acquire an average over the possible nuclear spin configurations.

The three main sources of uncertainty of Δfnorm are the statistical uncertainty from the finite number of repeats15, the remaining drift of the tip height and the noise on the frequency shift Δf. We choose the number of repeats per data point such that the statistical uncertainty becomes comparable with the other two sources of uncertainties; depending on the exact experimental conditions, any of these three sources can dominate. Probe tips that give a strong response to charging (a large charging step in the Kelvin parabola) provide a better signal-to-noise ratio and, therefore, a smaller relative uncertainty. To minimize this contribution to the uncertainty, we only used tips for which the charging step was large compared with the noise in Δf (size of charging step 0.2–0.4 Hz for tips with a Δf setpoint around −1.5 Hz at zero bias; Δf averaged over 1 s exhibits a typical uncertainty of 1 mHz). In the case of the data in Fig. 4c, top and Extended Data Fig. 8c, bottom, the drift was clearly dominating the error margins. Therefore, the noise resulting from drift was, for these datasets, further minimized by setting the average of every repeat equal to the average over all data points.

In the case of pentacene, the TX–TZ transition was measured for 19 individual pentacene-h14 molecules, 20 pentacene-d14 and 1 pentacene-h-d13; for 18 of these molecules, we also measured the TX–TY transition. The TY–TZ transition of PTCDA was measured in 20 individual spectra for 2 molecules, whereas TX–TY and TX–TZ transitions (not shown) were measured 3 and 5 times, respectively. In total, 16 different tips were used for these measurements. Molecule-to-molecule variations of the resonance frequencies for two different tips are shown in Extended Data Table 1.

Spin Hamiltonian and eigenstates

The pulse sequence prepares the molecule into an electronically excited state with one unpaired electron in both the HOMO and the LUMO. These electrons couple through exchange interaction, leading to a large energy difference of ΔE ≈ 1.1 eV (refs. 37,38) between the excited singlet S1 and the excited triplet T1 states. We note in passing that this energy difference allows us to selectively occupy T1 instead of S1. With respect to exchange interaction, all three triplet sub-states of T1 are degenerate. These are typically represented in the basis of magnetic quantum numbers mS = −1, 0 and +1, which—in the representation of the two coupled spins—is T−1 = |↓↓, T0 = (|↑↓ + |↓↑)/√2 and T+1 = |↑↑, respectively.

As explained in the following, the magnetic dipole–dipole interaction between the two electron spins, which is orders of magnitude weaker than the exchange interaction, lifts this degeneracy, leading to a splitting of the triplet states, called the zero-field splitting. We note that the zero-field splitting may also have contributions from spin–orbit interaction. The dipole–dipole interaction is described by the Hamiltonian39

$${\mathscr{H}}=-\frac{{\mu }_{0}{\gamma }_{{\rm{e}}}^{2}}{4\pi {r}^{3}}(3({{\bf{S}}}_{1}\cdot \widehat{{\bf{r}}})({{\bf{S}}}_{2}\cdot \widehat{{\bf{r}}})-{{\bf{S}}}_{1}\cdot {{\bf{S}}}_{2}){\hbar }^{2},$$

with the two spins S1 and S2 at a distance r in a relative direction \(\widehat{{\bf{r}}}={\bf{r}}/r\). μ0 is the magnetic constant, γe the gyromagnetic ratio, ħ the reduced Planck constant and r the vector connecting the two spins. Notably, the magnetic dipole–dipole interaction is highly anisotropic, that is, for given spin orientations, it strongly differs and even changes sign for different relative positions of the two spins (see Extended Data Fig. 3a). The spatial positions of the electron spins are given by the orbital densities of the two electrons, the confinement of which is very different along the three molecular axes (see Extended Data Fig. 3b). Note that, for pentacene and PTCDA, the z direction is perpendicular to the molecular plane and, thereby, perpendicular to the surface plane; x points along the long molecular axis21. The anisotropy of the dipole–dipole interaction together with the non-uniformity of orbital densities gives rise to an energy difference in the range of microelectronvolts for the spins pointing in different real-space dimensions. This zero-field splitting is thus a fingerprint of the orbital densities and thereby the molecular species (see Fig. 2).

The corresponding eigenstates are no longer T−1, T0 and T+1 but TX, TY and TZ. The latter eigenstates expressed in the basis of the former read TX = (T−1 − T+1)/√2, TY = (T−1 + T+1)i/√2 and TZ = T0, whereas expressed as the states of the two individual spins |ms1 ms2〉, they are TX = (|↓↓ − |↑↑)/√2, TY = (|↓↓ + |↑↑)i/√2 and TZ = (|↑↓ + |↓↑)/√2. Further, they have the property that the expectation value of the total spin Ti|S|Ti vanishes for all three states Ti=X,Y,Z, whereas \(\langle {{\rm{T}}}_{i}| {{\bf{S}}}_{j}^{2}| {{\rm{T}}}_{i}\rangle =\left(1-{\delta }_{ij}\right)\). Here δij is 0 for i ≠ j and 1 for i = j. S = 0 renders these triplet states relatively insensitive to external perturbations; an external magnetic field affects the system and energies only to the second order.

The spin Hamiltonian \({\mathscr{H}}\) for the zero-field splitting and an external magnetic field B (excluding hyperfine terms) is \({\mathscr{H}}={\bf{S}}\widehat{D}{\bf{S}}+{g}_{{\rm{e}}}{\mu }_{{\rm{B}}}{\bf{SB}}\), with the dipole–dipole-interaction tensor \(\widehat{D}\). Explicitly expressed in the basis of the zero-field split states TX, TY and TZ, it reads39

$${\mathscr{H}}=\left[\begin{array}{ccc}{{\epsilon }}_{{\rm{X}}} & {-{\rm{i}}g}_{{\rm{e}}}\,{\mu }_{{\rm{B}}}{B}_{{\rm{Z}}} & {{\rm{i}}g}_{{\rm{e}}}\,{\mu }_{{\rm{B}}}{B}_{{\rm{Y}}}\\ {\rm{i}}{g}_{{\rm{e}}}\,{\mu }_{{\rm{B}}}{B}_{{\rm{Z}}} & {{\epsilon }}_{{\rm{Y}}} & {-{\rm{i}}g}_{{\rm{e}}}\,{\mu }_{{\rm{B}}}{B}_{{\rm{X}}}\\ -{\rm{i}}{g}_{{\rm{e}}}\,{\mu }_{{\rm{B}}}{B}_{{\rm{Y}}} & {\rm{i}}{g}_{{\rm{e}}}\,{\mu }_{{\rm{B}}}{B}_{{\rm{X}}} & {{\epsilon }}_{{\rm{Z}}}\end{array}\right]$$

Here μB is the Bohr magneton, ge is the electron g-factor and ϵX, ϵY and ϵZ are the zero-field energies of TX, TY and TZ, respectively. With increasing external magnetic field, the eigenstates will gradually change and asymptotically become the states T−1, T0 and T+1 in the limit of large magnetic fields (for example, see Extended Data Fig. 3c).

Selection rules

It follows from the above Hamiltonian that any two of the three zero-field split states are coupled by means of the magnetic field component pointing in the remaining third real-space dimension32. For example, TX and TZ are only coupled through BY, such that only the latter can drive the TX–TZ transition. Because x, y and z are defined with respect to the molecular axes, they might not coincide for different individual molecules (for example, see Fig. 4c).

Origin of asymmetric lineshape

The hyperfine interaction in protonated pentacene can be described as an effective magnetic field BHFI created by the nuclei with non-zero spins acting on the electron spins. Assuming a random orientation of the 14 proton nuclear spins at a given point in time, BHFI will fluctuate around zero-field (see Extended Data Fig. 3c) and point in a random direction. Because of the many fluctuating nuclear spins acting together at random, the probability distribution of BHFI has its maximum around zero and falls off towards larger absolute values. The influence of BHFI is always small compared with the zero-field splitting such that BHFI shifts the energies of the triplet states only to the second order, that is, to \(\propto {B}_{{\rm{HFI}}}^{2}\) (ref. 21). This is depicted in Extended Data Fig. 3c for the BHFI component in the z direction, BHFI,Z, in which it becomes clear that the broadening is single-sided in this case. The x and y components of BHFI contribute much less to the broadening. From Extended Data Fig. 3c, it becomes clear that the curvature around BHFI = 0 of the hyperbolic avoided crossing is responsible for the asymmetric broadening. This curvature is inversely proportional to the energy difference of the respective pair of states. As the TX–TY transition has the smallest energy splitting of all possible pairs, the broadening is dominated by their avoided crossing occurring along the z component of BHFI (ref. 21). Specifically, for the case of pentacene, this effect is smaller by roughly one order of magnitude in the other two directions.

Different individual isotopes contribute differently to BHFI, such that different isotopologues give rise to a different probability distribution of BHFI when considering all possible nuclear spin configurations. The assignment to the isotopologue is done in comparison with previous work29, based on the line profile, which not only includes the width but also its shape. Because the hyperfine interaction enters as a second-order term, the mere presence of one nucleus (for example, a proton) with strong hyperfine interaction also influences how strongly all the other nuclei (for example, deuterons) affect the line, thereby changing its overall shape.

Analogously, the hyperfine interaction of the eight proton nuclear spins in PTCDA gives rise to its asymmetric lineshape (see Fig. 2b). Note that the asymmetric shoulder appears here at the low-frequency side. Such a lineshape is expected for the TY–TZ signal21, as becomes clear from Extended Data Fig. 3c (when considering the TY–TZ transition instead of the TX–TZ transition that is explicitly illustrated). The TY–TZ signal is the largest for PTCDA; small signals were also observed for the TX–TY transition (at 252 MHz) and the TX–TZ transition (at 1,501 MHz). Note that this is in contrast to pentacene, for which the TX–TZ signal is the largest and the TY–TZ transition was not detected (because of the similarity in the lifetimes of its TY and TZ states).

Fitting of the lineshapes

As explained in the previous section, the hyperfine interaction is the origin of the asymmetric lineshape of the ESR signals. The lineshape of the TX–TZ transition can be well approximated by a sudden onset at the frequency fonset followed by an exponential decay of width fdecay (ref. 20) as

$$\Theta (f-{f}_{{\rm{o}}{\rm{n}}{\rm{s}}{\rm{e}}{\rm{t}}}\,)\exp (\,-\,(f-{f}_{{\rm{o}}{\rm{n}}{\rm{s}}{\rm{e}}{\rm{t}}}\,)/{f}_{{\rm{d}}{\rm{e}}{\rm{c}}{\rm{a}}{\rm{y}}}\,),$$

in which Θ(x) denotes the Heaviside function.

A second contribution to the overall lineshape results from the finite lifetimes of the involved states. This leads to a lifetime broadening, resulting in a Lorentzian of the form

$${\pi }^{-1}\Gamma /({(f-{f}_{{\rm{res}}})}^{2}+{\Gamma }^{2})$$

centred around each resonance frequency fres with a full width at half maximum of 2Γ. Accordingly, the experimental resonances are fit to a convolution of the above two functions, allowing to extract the broadening owing to the hyperfine interaction and the finite lifetimes separately. We note that non-Markovian processes20,24 may lead to a deviation from the idealized Lorentzian and that power broadening was avoided in the measurements of the ESR-AFM signals. The effect of power broadening is illustrated in Extended Data Fig. 4.

Rabi oscillations simulations and delay time

The Rabi oscillations were measured using an RF pulse applied around the middle of the dwell voltage pulse with a varying duration and a frequency corresponding to the maximum of the TX–TZ or TX–TY ESR signal. To illustrate the effect of such an RF pulse for the TX–TZ transition, the evolution of the populations of the three triplet states and the singlet state during the dwell voltage pulse were simulated, as shown in Extended Data Fig. 6.

These simulations were performed using the Maxwell–Bloch equations40, analogous to the model used for ODMR41. The Rabi oscillation data are a temporal average of a single molecule, which—according to the ergodic assumption—is the same as an ensemble average. Therefore, we can use the density-matrix formalism42 to simulate our data. Note that, on driving the TX–TZ transition, TY is decoupled from the TX and TZ dynamics and simply decays independently. The Bloch equations in the density-matrix formalism can therefore be restricted to the two coupled states43, here TX and TZ, whereas the occupation of the third triplet state is treated separately as a simple exponential decay function. With respect to the two coupled states, the system is described by the density matrix42

$$\rho =\left[\begin{array}{cc}{\rho }_{{\rm{ZZ}}} & {\rho }_{{\rm{ZX}}}\\ {\rho }_{{\rm{XZ}}} & {\rho }_{{\rm{XX}}}\end{array}\right]$$

and evolves according to the Liouville equation42

$$\frac{{\rm{d}}\rho }{{\rm{d}}t}=-\frac{i}{\hbar }\left[{\mathscr{H}},\rho \right].$$

The Hamiltonian of the molecule interacting with the RF field (with Rabi rate Ω) at resonance with the TX–TZ transition (with resonance frequency ωZ − ωX) can be written as41

$${\mathscr{H}}=\left[\begin{array}{cc}\hbar {\omega }_{{\rm{X}}} & -\hbar \Omega \cos \left({{\omega }_{{\rm{Z}}}-\omega }_{{\rm{X}}}\right)\\ -\hbar \Omega \cos \left({{\omega }_{{\rm{Z}}}-\omega }_{{\rm{X}}}\right) & \hbar {\omega }_{{\rm{Z}}}\end{array}\right]$$

The time evolution of the density operator in the rotating-frame approximation, with phenomenologically added relaxation and dephasing terms, can be described as41

$$\frac{{\rm{d}}{\rho }_{{\rm{XX}}}}{{\rm{d}}t}=\frac{i\Omega }{2}\left({\rho }_{{\rm{ZX}}}-{\rho }_{{\rm{XZ}}}\right)-\frac{{\rho }_{{\rm{XX}}}}{{\tau }_{{\rm{X}}}}$$
$$\frac{{\rm{d}}{\rho }_{{\rm{ZZ}}}}{{\rm{d}}t}=\frac{i\Omega }{2}\left({\rho }_{{\rm{XZ}}}-{\rho }_{{\rm{ZX}}}\right)-\frac{{\rho }_{{\rm{ZZ}}}}{{\tau }_{{\rm{Z}}}}$$
$$\frac{{\rm{d}}{\rho }_{{\rm{XZ}}}}{{\rm{d}}t}={-\rho }_{{\rm{XZ}}}\left(\frac{1}{{T}_{2}}+\frac{1}{2{\tau }_{{\rm{X}}}}+\frac{1}{2{\tau }_{{\rm{Z}}}}\right)+\frac{i\Omega }{2}\left({\rho }_{{\rm{ZZ}}}-{\rho }_{{\rm{XX}}}\right)$$
$$\frac{{\rm{d}}{\rho }_{{\rm{ZX}}}}{{\rm{d}}t}={-\rho }_{{\rm{ZX}}}\left(\frac{1}{{T}_{2}}+\frac{1}{2{\tau }_{{\rm{X}}}}+\frac{1}{2{\tau }_{{\rm{Z}}}}\right)+\frac{i\Omega }{2}\left({\rho }_{{\rm{XX}}}-{\rho }_{{\rm{ZZ}}}\right)$$

The time evolution of TY is simply given by

$$\frac{{\rm{d}}{\rho }_{{\rm{YY}}}}{{\rm{d}}t}=-\frac{{\rho }_{{\rm{YY}}}}{{\tau }_{{\rm{Y}}}}$$

These last five equations were used for the simulation for Extended Data Fig. 6. As input parameters for the simulation, we used the parameters that were experimentally derived for pentacene-h14: the decay constants of the triplet states: τX = 20.8 μs, τY = 66.6 μs and τZ = 136.1 μs; the decay constant of the Rabi oscillations: T2 = 2.2 μs; the initial populations ρXX = ρYY = ρZZ = 0.8/3 and coherences ρXZ = ρZX = 0; the starting time of the RF pulse tS = 45.1 μs and its duration of 4 and 4.5 Rabi-oscillation periods, respectively. Note that interconversion between TX and TZ resulting from spin-lattice relaxation is assumed to be negligible compared with τX and τZ.

Here the initial occupation of the TX, TY and TZ states are assumed to be all equal to 0.8/3. Simulations and data in ref. 15 show that the triplet state is initially approximately 80% occupied (this value depends on the exact tip position, as the two competing tunnelling rates to form the T1 and S0 states depend on the wave-function overlap between tip and the LUMO and the HOMO, respectively). We assume that the probability to tunnel in the three states is equal (same spatial distribution and tunnelling barrier, as their energy differences are negligibly small). The Maxwell–Bloch simulations were performed to guide the understanding of our Rabi-oscillation measurements. For this purpose, we disregarded non-Markovian effects20,24 and modelled the relaxation with a single phenomenological time constant T2.

The delay time tS, at which the RF pulses started, was fixed for one Rabi-oscillation sweep. The optimal tS was experimentally determined by sweeping the timing of a π RF pulse over the range of the dwell pulse. A tS > 0 is needed to initiate an imbalance between the TX and TZ states. Similarly, a decay time after the RF pulses is required such that the final triplet population is dominated by only one of these two triplet states. The optimal delay time is, therefore, shortly before the middle of the dwell voltage pulse. Furthermore, it is important that, on increasing the duration of the RF pulse, the sensitivity for differentiating TX and TZ does not greatly reduce, otherwise a further decay of the Rabi oscillations is induced by the readout. Therefore, we chose 30 μs as a delay time for the Rabi oscillations of pentacene-d14, which were probed up to an RF pulse duration of 30 μs.

Rabi oscillations baseline fit

The baseline of the Rabi-oscillation experiment represents the situation of equal populations in the coupled states TX and TZ during the pulse; even if the Rabi signal is not yet decayed, it is oscillating around the baseline. The decay of the baseline arises from the decay of the (on average) equally populated TX and TZ states into the singlet state during the RF pulse. As the final population of TY is independent of the RF signal, it will only give rise to a constant background and will be disregarded in the following.

Hence, the baseline is defined by the following: in the initial phase 0 < t < tS, all three triplet states decay independently from each other. At the beginning of the RF pulse, that is, at t = tS, the sum of populations in TX and TZ is

$${P}_{{\rm{XZ}}}({t}_{{\rm{S}}})={P}_{0}/3\left(\exp \left(-{k}_{{\rm{X}}}{t}_{{\rm{S}}}\right)+\exp \left(-{k}_{{\rm{Z}}}{t}_{{\rm{S}}}\right)\right),$$

in which \({k}_{{\rm{X}}}={\tau }_{{\rm{X}}}^{-1}\) and \({k}_{{\rm{Z}}}={\tau }_{{\rm{Z}}}^{-1}\) are the decay rates of TX and TZ, respectively, and P0 is the initial total population in the triplet state, such that P0/3 is the initial population in each TX, TY and TZ. During the RF pulse, that is, for tS < t < tE (with tE being the end of the RF pulse), the RF signal equilibrates (on average) the populations of two of the states, thus at the end of the RF pulse

$${P}_{{\rm{XZ}}}\left({t}_{{\rm{E}}}\right)={P}_{{\rm{XZ}}}\left({t}_{{\rm{S}}}\right)\exp \left(-\left({k}_{{\rm{X}}}+{k}_{{\rm{Z}}}\right)\left({t}_{{\rm{E}}}-{t}_{{\rm{S}}}\right)/2\right).$$

Finally, for tE < t < tD, the states decay again independently, giving at the end of the dwell time

$${P}_{{\rm{XZ}}}\left({t}_{{\rm{D}}}\right)={P}_{{\rm{XZ}}}\left({t}_{{\rm{S}}}\right)\exp \left(-\left({k}_{{\rm{X}}}+{k}_{{\rm{Z}}}\right)\left({t}_{{\rm{E}}}-{t}_{{\rm{S}}}\right)/2\right)\{\exp \left(-{k}_{{\rm{X}}}\left({t}_{{\rm{D}}}-{t}_{{\rm{E}}}\right)\right)+\exp \left(-{k}_{{\rm{Z}}}\left({t}_{{\rm{D}}}-{t}_{{\rm{E}}}\right)\right)\}/2,$$

which can be rearranged to

$$\begin{array}{l}{P}_{{\rm{XZ}}}({t}_{{\rm{D}}})={P}_{{\rm{XZ}}}({t}_{{\rm{S}}})\{\exp (-{k}_{{\rm{X}}}({t}_{{\rm{D}}}-{t}_{{\rm{S}}}))\exp ({t}_{{\rm{RF}}}({k}_{{\rm{X}}}-{k}_{{\rm{Z}}})/2)\\ \,\,\,\,+\exp (-{k}_{{\rm{Z}}}({t}_{{\rm{D}}}-{t}_{{\rm{S}}}))\exp (-{t}_{{\rm{RF}}}({k}_{{\rm{X}}}-{k}_{{\rm{Z}}})/2)\}/2.\end{array}$$

Note that PXZ(tS) does not depend on tRF = tE − tS and therefore just represents a constant prefactor. The two terms provide contributions to the baseline that rise and fall exponentially with tRF, respectively. For the specific case and parameters considered here, the prefactor of the rising term is much smaller than that of the falling term and is therefore neglected. Because the decay rates were determined (Fig. 1b) for the pentacene-h14 molecule, for which the Rabi oscillations were measured, these rates were used for the fitting of the Rabi oscillations of the pentacene-h14 molecule (Fig. 3a). In case of pentacene-d14 (Fig. 3c), we set (kX − kZ)/2 = 0.012 μs−1 based on the measured decay rates of another individual pentacene-d14 molecule. In the experiment, other effects (for example, a thermal expansion owing to RF-induced heating) may also add to a temporal evolution of the baseline. These contributions were not separately accounted for but they are fitted as part of the falling term described above.