Introduction

Defects with energies falling within the bandgap may act as a trap or emitter of free charge carriers1, a site for exciton recombination2, and a center to scatter electrons or phonons3. In conventional semiconductors, native defects such as vacancies introduce levels close to the middle of the bandgap when the material is more covalently bonded, or close to the band edges when the material is more ionically bonded, resulting in the former materials being defect sensitive while the latter materials are relatively defect tolerant4. Comparing positions of defect levels across different host materials helps to reveal chemical trends that inform defect models with broad impact. For example, the deep level associated with a given impurity5 or native defect6 tends to lie universally at a fixed energy position with respect to the vacuum level even when doped in different semiconductors, which can be used to determine band alignments of the host materials; equilibrium native defects tend to drive the Fermi level toward a stabilization position, and this position with respect to the bandgap can be used as a descriptor of doping propensity and doping limit of the semiconductor7; the DX center, an metastable defect switchable between deep and shallow states, dominates the free electron density in III-V semiconductor alloys8. It is critical to ask whether such insights and knowledge attained in studying conventional semiconductors are applicable in vdW materials. New effects of defects may emerge because the layered nature of vdW materials allows stronger lattice relaxation as well as new types of defects such as intercalated atoms.

Scanning tunneling microscopy (STM) is able to experimentally visualize various types of defects on the surface and relate these imperfections to electronic structures in vdW crystals9, in particular for the most abundant native point defects that play a critical role in their electrical10,11,12,13, optical2, magnetic14, catalytic15 and sensing properties16. However, STM studies have led to inconsistency on the defect types with transmission electron microscopy investigations, as well as discrepancy in signatures of defect-induced mid-gap states from theoretical calculations1,3,17,18,19,20,21, largely because of unclear differentiation of STM contrast between the metal and chalcogen sublattices and the complicated convolution of electronic and geometric structures9. Furthermore, it shows very limited capability in detecting defects beneath the surface.

In this work, we use deep level transient spectroscopy (DLTS), a high-frequency capacitance transient thermal scanning method22,23, to characterize electronic structures of the deep traps inside the bandgap of vdW semiconductors, particularly MoS2, WS2 and their alloys, including their energy positions and capture cross sections. Combined with atomic-resolution scanning transmission electron microscopy and first-principles calculations, one of the deep levels determined by DLTS is identified as sulfur vacancies, whose energy position follows the conduction band edge in the host materials, distinct from vacancy defects in traditional group III-V semiconductors. A metastable DX center is identified in these vdW semiconductors, featuring a persistent photoconductivity above 400 K and explaining the chemical trend of native electron concentration in the hosts.

Results

DLTS devices and DLTS spectra

Mechanically exfoliated, multilayer (~ 50 nm) flakes of freshly grown Mo1−xWxS2 (x = 0, 0.4, 0.7, 1) crystals were made into two-terminal Schottky-Ohmic devices (Fig. 1a). The Schottky contact was formed by dry-stamping freshly exfoliated flakes onto pre-deposited Pt electrodes and confirmed by the IV and CV curves shown in Fig. 1e, f, both of which show the n-type conductivity of MoS2. This maximally protects the depletion region at the Schottky contact against contamination and damage24, as it is at this region where the deep levels trap and emit charge carriers during the DLTS measurement. The measured total capacitance (Supplementary Fig. 10) is composed of that of the DLTS device (Cdevice) and the stray capacitance (Cstray) connected in parallel. The latter, although with a large value, is insensitive to the external differential voltage (Supplementary Fig. 10), hence the variation of capacitance under the biased voltage indeed probes the former (Fig. 1f).

Fig. 1: Materials and devices for transient spectroscopic study of defects.
figure 1

a Schematic and optical image (scale bar: 20 μm) of an asymmetric MoS2 device for DLTS, with Schottky contact (MoS2/Pt/Ti) on the bottom and Ohmic contact (Au/Ti/MoS2) on the top. b Aberration-corrected STEM image of a monolayer MoS2 exfoliated from the materials used for devices. Red arrows highlight S vacancies (VS). Scale bar, 1 nm. c Capacitance transient (bottom) in response to a pulsed change in bias voltage (top). d Band bending of the Schottky junction (MoS2/Pt), illustrating the electron trapping () and emission process () of deep traps in the depletion region (shaded). VR tunes the Fermi level of the n-type MoS2 (EFn) with respect to that of the metal contact (EFm). e & f, Temperature-dependent IV and CV curves confirming the Schottky-Ohmic contacts.

The depletion width at the Schottky junction (~ 20 nm, the shadow in Fig. 1d), hence the capacitance (Fig. 1c), is initially held constant by a steady-state reverse bias (VR = −0.5 V, stage )23. An opposite voltage pulse (VP) is then added onto VR, reducing the depletion width (as evidenced by the increased capacitance at less-negative voltage, Fig. 1f), and allowing the traps in the initial depletion region to be filled with free electrons (stage )23. When the initial, constant bias is restored, the return of the capacitance to the steady-state value is characterized by a transient (stage ) related to the emission of majority carriers from the deep traps in the material. The capacitance difference within a rate window (between the pre-set t2 and t1 in Fig. 1c)22 reaches the maximum at a specific temperature. The emission rate (en) in stage depends exponentially on temperature via the trapping energy level (Ei) measured from the conduction band minimum (CBM, ECB)22,

$$\frac{{e_n}}{{T^2}} = K\sigma _n\exp \left( { - \frac{{\left| {E_{CB} - E_i} \right|}}{{k_BT}}} \right)$$
(1)

where σn is the capture cross section, and K is a known constant. Arrhenius plots of Eq. (1) at various rate windows (0.5 ms to 20 ms in Fig. 2a) allow extraction of the activation energy of deep levels, ECBEi. For MoS2 we found two, 0.27 ± 0.03 eV (peak A) and 0.40 ± 0.02 eV (peak B), as shown in Fig. 2b. The positively valued DLTS peaks (Fig. 2a) indicates that these are majority carriers traps in MoS222. We also measured current transient spectroscopy (CTS, see Supplementary Fig. 1) by recording the current rather than capacitance under the pulsed bias25, yielding an activation energy of ECBEi = 0.25 ± 0.02 eV for MoS2 (Supplementary Fig. 1a), consistent with the peak A in DLTS. We note that for each of the trap energies obtained in this work, at least two devices were measured and all show consistently very similar energy. Thermodynamically, the slope of Eq. (1) corresponds to the change of enthalpy (ΔH), different from the Gibbs free energy ΔG (= ECBEi)26, but the difference can be neglected when electrons are excited from the traps to the conduction band without invoking changes in the bonding configuration (see Supplementary Note 5)27.

Fig. 2: Deep levels and their alignment in vdW crystals.
figure 2

a DLTS signal of a MoS2 device at different rate windows and b the resultant Arrhenius plots to determine the activation energies. c Conduction and valence band edge alignment calculated with respect to the vacuum level, and positions of deep level experimentally identified in this work. Solid black lines: CBM and VBM in bulk crystals from our DFT calculations; red bars: deep levels attributed to VS measured by DLTS and CTS; blue bars: DX center levels determined by DLTS and PPC (dashed blue line is guide to the eye); green bars: DFT-calculated VS levels. d density of states (DOS) for multilayer MoS2 with VS. Inset: real space distribution of the wavefunction of VS state. The purple and yellow spheres represent Mo and S atoms, respectively.

Determination of sulfur vacancies from STEM and DFT calculations

To reveal the atomic origin of these deep traps, we have performed first-principles calculations of S single vacancies (VS) in multilayer MoS2, WS2 and their alloys. VS is chosen because it is the most abundant defect known to naturally occur in these materials21. The calculation shows that VS would introduce a deep-level state with energy of 0.29 eV (for MoS2) and 0.21 eV (for WS2) below the CBM, in good agreement with the DLTS/CTS results. We note that the value of 0.29 eV is also consistent with the calculated VS energy in MoS2 previously reported in literature1,3. Our calculations also confirm that VS is a deep acceptor, labeled as (0/−)1,23, not responsible for the natively n-type conductivity of MoS2. The neutral ground state implies its extremely weak Coulomb attraction to electrons, and hence very small capture cross section. VS defects are directly observed in these materials by scanning transmission electron microscopy (STEM, Fig. 1b and Supplementary Fig. 5)11, where the density of VS is directly determined to be 1~3 × 1020 cm−3 (Supplementary Fig. 4), on the same order of those reported in literature3,21. The STEM study also confirms that VS is the dominant point defects, and no other defects or impurities were detected in the materials. We note that akin to conventional semiconductors, not all of these VS are electronically active (Supplementary Fig. 6); in fact, deep traps can be highly passivated or compensated, as observed in GaN and GaAs28,29.

To reveal the chemical trend of the VS level in different vdW semiconductors, Mo0.6W0.4S2, Mo0.3W0.7S2, and WS2 were also synthesized and then assembled into Schottky devices for similar DLTS/CTS measurements (Supplementary Fig. 1). All of these materials exhibit at least one deep level, akin to the feature A observed in MoS2, with an energy level below the CBM of the host material of 0.29 ± 0.02 eV, 0.31 ± 0.02 eV and 0.26 ± 0.04 eV (red bars in Fig. 2c), respectively. These energy levels are all in good agreement with the DFT calculated VS levels, as shown by the green bars in Fig. 2c and the refined band structure with VS in Supplementary Fig. 8.

Some deep levels in different isovalent materials line up at a fixed position with respect to the vacuum level, such as oxygen dopant or Ga dangling bond in different GaAs1−xPx alloys6,30. In contrast, the red bars in Fig. 2c show that as the W fraction increases in Mo1−xWxS2, the energy level of VS shifts monotonically toward the vacuum level; that is, the VS level largely follows the CBM of the host. This is understandable because, as shown in the partial density of states plot in Fig. 2d, the VS state originates mostly from the 4d (5d) orbitals of the Mo (W) atoms, rather than the S atoms, sharing the same orbital composition as the CBM31,32. Following this finding, anion impurities (such as oxygen) substituting S are predicted to create deep levels also about 0.3 eV below the CBM of the host (see Supplementary Fig. 7), because it is known that highly electronegative, substitutional dopants tend to have similar wavefunctions as those of ideal vacancies6. The electron capture cross section (\(\sigma _n\)) of VS is evaluated from Eq. (1) to be ~3.6 × 10−18 cm2 in MoS2, using the thermal velocity effective mass (0.57 mo) and effective density of states mass (0.50 mo) obtained from our DFT calculation and literature (see Supplementary Note 1). This value is small but comparable to that of Zn acceptor level in Si and Cu acceptor level in Ge23,33.

Persistent photoconductivity and DX center model

To explore the origin of peak B (0.40 eV) in MoS2 shown in Fig. 2a, we obtained complementary information about deep levels from photoconductivity measurements. Photoconductivity, especially when it is persistent (persistent photoconductivity, PPC), has been used to gauge conduction by charge carriers photo-liberated from certain deep traps34,35. Figure 3a shows temperature-dependent dark conductance of a MoS2 flake (~50 nm thick) measured in four-probe geometry (Inset of Fig. 3b). The sample was cooled in darkness from 400 K to 200 K (black data points). It was then exposed to white light for 10 min (blue data point) at 200 K, during which the conductance became two orders of magnitude higher than in the dark. When the light was switched off (dark again) at this low temperature, the conductance dropped slightly, but still stayed >50 times higher than the pristine dark state. The PPC stayed at this level for at least 11 h at 200 K (Fig. 3b). When the sample was warmed up, the conductance stayed at the higher level (red data points) until a temperature of 400 K where it nearly converged to the pristine dark conductance.

Fig. 3: Temperature-dependent persistent photoconductivity (PPC) and the DX center model.
figure 3

a Conductance of a MoS2 device as a function of temperature before, during, and after exposure to light illumination. b PPC transient of the device at 200 K. Inset: optical image of a four-probe device for PPC measurement (scale bar: 20 μm). c Configurational coordinate diagram (CCD) showing the three energies to characterize the DX center and describe the five PPC processes in a.

Such a PPC effect in response to light exposure and temperature is a direct manifestation of metastability of defect states, and a hallmark of DX centers in semiconductors34,35. DX centers, observed in the 1980s in many III-V semiconductors such as AlGaAs, are a special type of localized states resonant with the conduction band of the host8. In contrast to ordinary deep levels, DX centers are capable of switching into a charge-delocalized, electron-donating state via significant lattice relaxation when triggered by external stimuli, such as light and gate control8,36,37. Typically described in the configurational coordinate diagram (CCD) as shown in Fig. 3c, DX centers are characterized by a parabolic coordinate (Q) dependence of DX center energy (UDX) intersecting that of the delocalized state (UCB)8. The displacement along the Q axis between the two minima describes a large lattice relaxation that reflects the metastability of the DX centers. Three energies are thus defined: capture activation energy (Ec), which is the energy barrier for the DX center to trap an electron and can be determined from the kinetics of PPC; emission activation energy (Ee), the energy barrier to de-trap (emit) an electron, measured via DLTS8,36; and energy depth (Eb = ECBEDX = EeEc), which is the ground state energy (EDX) measured from the CBM (ECB) and can be derived from the temperature dependence of conductance.

As shown in Fig. 3a, c, at the thermal equilibrium state (stage ), most electrons are trapped in the DX centers. Upon excitation by light with energies above the optical threshold (stage )8,36, electrons in EDX are photo-excited to ECB. When the light is off, these electrons stay in ECB and are blocked by the barrier Ec from relaxing back to EDX, causing the PPC (stage ). When temperature rises, more electrons are thermally excited over Ec into EDX (stage ), eventually recovering to the pristine, dark-state conductivity (stage ). In this study, the PPC effect exists at temperatures up to more than 400 K (upper limit of our equipment). This is in stark contrast to the PPC effect of DX centers discovered in group III-V semiconductors, where it survives only at T < ~ 140 K35,37,38.

The transient PPC curves are plotted in Fig. 4a for a range of temperatures, where non-persistent photocurrent was excluded, dark current was subtracted and the remaining part was normalized by the value at t = 0, the moment the illumination is terminated. Note that in order to reset the initial dark current before taking each of these PPC curves, the samples were kept at 400 K for at least one day in a high vacuum (~10−6 torr) to drain the extra electrons in ECB. We see that, consistent with the DX center model (Fig. 3), high temperature expedites the kinetics of the PPC decay. Following the treatment in literature, the PPC can be well described by the stretched-exponential equation34,35:

$$I_{PPC}\left( t \right)/I_{PPC}\left( 0 \right) = \exp [ - (t/\tau )^\beta ]$$
(2)

where τ is the characteristic decay time constant, β is a decay index with a value between 0 and 1. Because of the underlying thermal activation process, the temperature dependence of τ is related to the trap barrier via\(\tau \propto \exp (E_c/k_BT)\)34,35. Arrhenius plots of the temperature-dependent τ yield Ec of 0.28 ± 0.02 eV for MoS2 and 0.17 ± 0.02 eV for Mo0.3W0.7S2 (Fig. 4b and Supplementary Fig. 3). These values are higher than Ec (~0.14 eV) of DX centers reported in the Se-doped AlGaAs system8, presumably because the layered structure of the vdW materials allows larger lattice relaxation than the tetrahedral structure of AlGaAs. The higher Ec is also responsible for the extension of PPC to much higher temperatures.

Fig. 4: DX center levels measured in MoS2 and Mo0.3W0.7S2.
figure 4

a Transient normalized-PPC curves at various temperatures for MoS2 and b the resultant Arrhenius plots of the time constant for MoS2 and Mo0.3W0.7S2. Semitransparent points: experimental data; thin solid lines: fitting to Eq. (2). c CCD for MoS2 and Mo0.3W0.7S2, where the energy depth (Eb), capture (Ec) and emission (Ee) energy barriers are determined by temperature dependence of conductance, PPC and DLTS, respectively. The band offset between the two materials is obtained from DFT, resulting in a flat lineup of the DX center energy level (EDX) across different host materials. The error range for these energies is estimated to be ± 0.04 eV.

The energy Eb (= ECBEDX) characterizes the thermodynamic energy depth of the DX center, and was extracted from Arrhenius plots of the dark conductance of the sample (Supplementary Fig. 3). Values of Eb = 0.12 eV and 0.30 eV were found for MoS2 and Mo0.3W0.7S2, respectively. Adding Eb to Ec gives Ee, the emission barrier, of 0.39 eV and 0.47 eV for MoS2 and Mo0.3W0.7S2, respectively. These values are in very good agreement with the energies of peak B measured in DLTS for MoS2 (0.40 ± 0.02 eV) and Mo0.3W0.7S2 (0.47 ± 0.02 eV). Therefore, we attribute the peak B measured in DLTS to emission of electrons from the DX centers. We note that, unlike regular deep levels (such as the VS state) which have no capture/emission barriers, for DX centers, the Arrhenius plot of the DLTS spectrum extracts the emission barrier Ee (Figs. 2c and 3c), rather than Eb which is the separation of EDX directly measured from the conduction or valence band edges (see more in Supplementary Note 6)23. Following the CBM offset of ~0.3 eV between MoS2 and WS2 from our DFT calculation, the CBM (ECB) of Mo0.3W0.7S2 is interpolated to be higher than that of MoS2 by 0.2 eV. Combining all these energy values, the energy of EDX shows an interestingly flat alignment across these two compositions, as plotted in the CCD in Fig. 4c. It is not surprising to see that the EDX position is independent of the material composition because it is also constant for DX centers in AlGaAs across different alloy compositions8,36,38: in AlGaAs alloys, EDX is located universally at 3.8 eV below the vacuum level, and does not follow the CBM of the host material (in contrast to shallow defect levels). DX centers act as deep traps that result in different shallow donor doping efficiency in AlGaAs with different compositions8; similarly, the chemical trend of energy level of DX centers in the vdW semiconductors can explain the well-known, orders of magnitude higher native free electron density in undoped MoS2 than in WS2, as the DX centers are shallower in the former (details in Supplementary Fig. 9). When they are doped, these deep defects also largely determine the doping efficiency and dopability of these materials, as they can compensate the shallow dopants.

Discussion

Although our multipronged experiments show clear evidence of DX centers in these vdW semiconductors, elucidation of the atomic origin of the DX centers requires further exploration including extensive first-principles calculations. However, the flat alignment of EDX provides a clue. In AlGaAs, the electron wavefunction of the DX center is extremely localized on an Al/Ga site surrounded only by and bonded only to the nearest As atoms; therefore, EDX is very insensitive to the change of Al fraction in the alloy37,39. Similarly, in Mo1-xWxS2 alloys where EDX is independent of the cation composition x, it is likely that the DX centers neighbor only S atoms, hence are either impurity atoms substituting the cation, or small interstitial atoms bonded to S. For example, a potential candidate would be a defect complex involving hydrogen bonded to S, a dopant inevitably and unintentionally introduced during the growth. Indeed, hydrogen has been proposed to be a possible origin of n-type native conductivity in MoS2 due to the formation of shallow levels40.

The decay time constant describes the time it takes for the mobile electrons to be re-trapped by the DX centers, and dictates the relaxation kinetics of the free charge carrier density. The transient conductivity or current in the PPC (Fig. 4a) is assumed to have a similar relaxation kinetics as that of free carrier density, and hence can be used to extract the delay time constant for DX centers. This assumption is typically made in investigation of DX centers in traditional III–V semiconductors as the carrier mobility varies much less than the carrier density and the current is then directly proportional to carrier density34,35,36,41,42. In order to test the validity of this assumption in our case, a multilayer MoS2 FET was made to determine the evolution of mobility before and after the illumination. Figure 5a depicts a multilayer MoS2 assembled into the FET which is subjected to a back gate voltage (VG). According to the data in Fig. 5b, we extract the low-field field-effect mobility to be ~16 cm2/(V S) for the MoS2 channel, based on the expression \(\mu = [dI_{DS}/dV_{Gate}] \times [L/WCV_{DS}]\)43, where W and L are the width and length of the channel, respectively, C is the capacitance of the gate dielectric SiO2 layer, and VDS is the source-drain voltage in the FET. These IDSVG curves exhibit the same slope before and after light illumination, indicating a constant mobility regardless of the density of free or trapped electrons in the channel, hence validating the extraction of time constant from electrical current via Eq. (2).

Fig. 5: Mobility of MoS2 before and after illumination.
figure 5

a Schematic of a multilayer MoS2 field-effect transistor (FET). b Transient transfer characteristics for the FET before the illumination (hollow points) and at specific time after the illumination is turned off (solid points). The back gate voltage, VG, is applied to the substrate. The solid lines show the slopes of the IDSVG curves, corresponding to electron mobility of the channel material in the device.

It is technically challenging to apply the DLTS to monolayers of vdW semiconductors, owing to expected high leakage current and issues arising from the sub-depletion width thickness. However, the deep levels we quantified for thick layers are expected to be applicable to monolayers and few layers. This is because the very weak interlayer vdW coupling only modulates the conduction and valence band edges, transitioning the material from direct bandgap in monolayers to indirect bandgap in the bulk, while hardly affecting the entire band structure32; on the other hand, the spatially very localized wavefunctions of deep levels do not hybridize with the conduction or valence band edges, which is in contrast to shallow defects whose wavefunctions are composed of entirely the band edge states. For example, regarding monolayer MoS2, first-principles calculations predicted that the VS deep level lies about 0.5 eV below the CBM at the K point in the Brillouin Zone1,3,17,21,44, which is in good agreement with the 0.27 eV below the CBM at the Q point in multilayer MoS2 quantified in this study, considering the 0.2 eV CBM offset between monolayer and bulk MoS245,46.

Our work determines energy levels and chemical trends of the most abundant native defects in MoS2, WS2 and their alloys. These energy levels offer quantitative references for both applications that are limited by defects such as transistors10,24 and light emitting devices2, as well as applications that are facilitated by defects such as catalysis15 and sensors16. We also discover metastable and switchable, DX center-like defects in these vdW materials at temperatures above 400 K, in contrast to those in other semiconductors that exist only at T < 140 K8,38. As a result, practical device applications may be developed from the DX centers in vdW materials, such as nonvolatile memory based on a single defect. These defects may provide a platform for study of electron-phonon coupling, electron correlation, and many-body physics such as negative-U effects in quasi-two-dimensional crystals30.

Methods

Materials preparation

The vdW bulk crystals were synthesized using the flux zone technique without using transporting agent precursor, in order to reduce contamination47. The growth starts with 6N-purity, commercially available 300 mesh amorphous powders of molybdenum and/or tungsten and pieces of sulfur. Further electrolytic purification was necessary to eliminate magnetic impurities commonly found in metal powders, and secondary ion mass spectroscopy (SIMS) was used to test the purity. Powders were mixed at stoichiometric ratios, sealed under 10−7 torr pressure in quartz ampoules, and annealed up to 800 °C for 10 days. The polycrystalline products were collected and resealed again. In the second formation process, a small temperature differential (~15 °C) was created at high temperatures to thermodynamically drive the reactions. The crystallization process was slow and the entire growth was completed in a three-month time frame.

Device fabrication

Multilayer (~50 nm thick) MoS2, WS2 and their alloys were mechanically exfoliated from bulk crystals. For DLTS/CTS experiments, these samples were transferred onto Pt/Ti (45/10 nm) bottom electrodes10, followed by photolithography, and electron beam evaporation of 20-nm Ti and then 80-nm Au as the top electrodes, and lift-off. In this way, the vdW flake is sandwiched by Pt (Schottky) metal at the bottom, and Ti (Ohmic) metal at the top. For PPC measurements, four-probe metal leads (Au (80 nm)/Ti (20 nm), Ti at bottom) were deposited onto exfoliated samples. The devices used SiO2 (300 nm)/Si as the substrate.

Electrical measurements

A deep level transient spectrometer (Sula Technologies) was used to measure DLTS, CTS, CV, and IV curves in Figs. 1 and 2. In this instrument, the emission rate is set as \(e_n = 1/\left( {D \times {{{\mathrm{{\Delta}}}}}t} \right)\), where \({{{\mathrm{{\Delta}}}}}t = t_2 - t_1\) is the preset time difference in Figs. 1c and 2a, and D is a constant representing the delay factor, 1.94 and 4.3 for the DLTS and CTS measurements, respectively. In the capacitance test, including CV and DLTS, an A.C. voltage with an amplitude of ~60 mV and frequency of 1 MHz was superimposed onto the D.C. reverse bias. For the PPC measurements, four-terminal transport characteristics were measured by applying a DC bias to the outer channel and recording the current using a current amplifier and the voltage drop across the inner channel using a voltage amplifier. Optical illumination for the PPC was by a convection-cooled 30-Watt illuminator (Fiber-Lite 190).

STEM characterization

Mechanically-exfoliated monolayer MoS2 was transferred from SiO2 surface to TEM grids (Quantifoil R2/2) by selective etching of the SiO2 in 49% hydrofluoric acid. Images were acquired from different regions of the monolayer MoS2 using a Nion UltraSTEM 100 aberration-corrected STEM in ADF-STEM mode with E = 70 kV. The beam convergence semi-angle was 30 mrad and the detector collection angle was in the range of 30-300 mrad, where a small detector inner angle was chosen to reduce the electron dose. The energy spread of the electron beam was 0.3 eV. To reduce the total electron dose, images were measured with a beam current of 15 pA and a dwell time of 84 μs per image, which correspond to a total electron dose 4.7 × 105 e2. The ADF-STEM images contain a mixture of Poisson and Gaussian noise and were denoised by the block-matching and 3D filtering (BM3D) algorithm48, from which S vacancies were identified. It has been reported previously that a 80 keV electron beam induces S vacancies in MoS2 with a rate of 3.45 × 108–3.36 × 109 electrons per S vacancy3,21. As we used a 70 keV electron beam, the vacancy formation rate in our experiment should be >3.45 × 108 electrons per S vacancy. From the total electron dose used in our experiment, we estimated the electron beam induced S vacancy density in our sample was <2 × 1020 cm−3. Since we observed a S vacancy density of 3 × 1020 cm−3 in the MoS2 sample, we concluded that the native S vacancy density was >1 × 1020 cm−3, which is in agreement with that of exfoliated undoped MoS2 samples21.

DFT calculations

The calculations were performed using the Vienna ab initio simulation package (VASP) with the projector-augmented wave method49,50. The generalized gradient approximation of Perdew-Burke-Ernzerhof (GGA-PBE) was adopted for the exchange-correlation functionals51. The energy cutoff for the plane-wave expansion was set to 350 eV. Structure relaxation was stopped when the force on each atom was smaller than 0.01 eV/Å. The van der Waals interaction was included by using the correction scheme of Grimme52.

For defect calculations in bulk MX2, we employed 5 × 5 × 1 supercell, where a tilted c lattice vector was adopted, with c = c0 + 2a0 + 2b0, where a0, b0, and c0 are the primitive cell lattice vectors. As discussed in previous studies1, this improves the convergence of total energies with respect to cell size. The k-point sampling is 2 × 2 × 2. The defect charge-transition energy level ε(q/q′) corresponds to the Fermi energy EF at which the formation energy for a defect α with different charge state q and q′ equals with each other. It can be calculated by53:

$$\epsilon \left( {q/q^{\prime}} \right) = \left[ {E\left( {\alpha ,q} \right) - E\left( {\alpha ,q^{\prime}} \right) + \left( {q - q^{\prime}} \right)\left( {E_{VB} + {{{\mathrm{{\Delta}}}}}V} \right)} \right]/\left( {q^{\prime} - q} \right).$$

Here E(α,q) is the total energy of the supercell containing the defect, and EVB is the valence band maximum (VBM) energy of the host material. The potential alignment correction term ΔV is added to align the VBM energy in systems with different charged states. It is calculated by the energy shift of the 1s core-level energy of a specified atom (which is far away from the defect site) between the neutral defect and charged cases. For Mo1−xWxS2 alloys, different S vacancy sites have different local environments. The number of surrounding Mo and W atoms varies, resulting in four types of VS. We calculated the charge-transition levels for each type, and then carried out an average according to the concentration of different types to obtain the final charge-transition level.