Point defects with spins in solids which constitute a two-level system are considered as essential building blocks for application in quantum information, computing and sensing1,2,3,4 when the electron spin can be initialized and read out with sufficiently long coherence time. The nitrogen-vacancy (NV) centre in diamond has been already identified as a qubit5,6,7,8 that can be exploited in diverse quantum technology applications1,2,3,4,9. The NV qubit state is initialised and read out by optical means in which spin-photon interface can be realized for quantum communication in the visible wavelength region10. However, NV centre in diamond is relatively dim, and scalable fabrication and optical waveguide integration of NV centre in diamond and akin defect qubits in three-dimensional (3D) crystals is technologically very challenging11,12,13.

Compared to single photon emitters (SPE) and qubits in 3D materials, defects in two-dimensional (2D) wide bandgap host distinguish themselves with high quantum efficiency and additional functionalities due to spatial confinement and near-surface location14,15. Recently, coherent manipulation of single spins have been reported in van der Waals 2D materials by means of optical initialisation and read-out16,17. In particular, carbon-related defects have been associated with these qubits in hexagonal boron-nitride (hBN)17,18,19 but scalable, deterministic preparation or activation of the qubit defects has not yet been achieved. Although, ab initio calculations proposed the atomic composition of the qubits17,18 but it has not yet been unambiguously confirmed which stems to create them on demand. Alternatively, boron-vacancy, an identified defect, in hBN may act as qubit17,20,21,22. Boron-vacancies are created by irradiation17 or other invasive techniques23 but no deterministic single defect creation is in reach and no single spin boron-vacancy qubit has been reported to date. Nevertheless, these efforts motivate scientists to design and fabricate quantum defects in other 2D materials.

Transition metal dichalcogenides (TMDCs) is another ideal 2D host for quantum defects24,25,26. Single photon emitters have been measured in WSe224,27,28 and WS2, but no coherent control of single spins have been reported24,29. The inherit spin-orbit-coupling (SOC) and excitonic effect provides long coherence time and electric controlled spin-valley coupling30,31. Recent investigation realized the creation of single carbon defect in WS2 through scanning tunnelling microscopy (STM) tip with atomic precision32, in which carbon replaces sulphur, that could isolate a single defect with a doublet spin state. The highly deterministic location with charge and spin state control provides large-scale defect arrays for integrated quantum systems. Furthermore, the electronic structure of the prepared single defect could be directly measured through scanning tunnelling spectra (STS) in TMDCs. However, it has not been confirmed that the single carbon defect spin can be exploited as a qubit in WS2, i.e., no quantum protocol to initialise and read out the spin state and means to coherently drive the spin states have been demonstrated.

In this paper, we demonstrate that single carbon defect spin in WS2, which can be deterministically prepared at atomic scale precision, can act as a qubit where the spin-photon interface can be realized with emission in the telecom wavelength region. We first carry out ab initio magneto-optical spectroscopy to explore the quantum states generated by the carbon defect. We identify the triplet state of the neutral carbon defect (CS) acting as a suitable qubit state with telecom wavelength phosphorescence. The multiplets of the triplet state can be used as a resource to prepare a given quantum state and store quantum information. We show a quantum optics protocol to initialise, read out and drive the single spin of CS defect in WS2, which converts a scalable defect spin to a promising qubit in a van der Waals material.

Results and discussion

Ground state calculations

Figure 1a shows the considered CS defect. Carbon replaces sulphur atom on the top layer. This could be formed by hydrogen depassivation of carbon-hydrogen impurity through voltage pulse from the STM tip. The graphene substrate adjusted the Fermi-level alignment, and experiment confirmed the defect exhibit negatively charged state as C\({}_{\,{{{\rm S}}}\,}^{-}\)32. One occupied state and unoccupied state were detected at − 0.4 V and + 0.52 V sample bias, respectively. We could identify the two defect levels of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{-}\) in the ground state by density functional theory (DFT) HSE calculation (see Methods). We note that charge correction is needed to improve the DFT total energy and defect level, as discussed in the Supplementary Note 3. In addition, spin-orbit coupling (SOC) significantly contributes to the electronic structure. For the pristine WS2, the position of valence band maximum (VBM) shifts with respect to the value without SOC, and the final calculated band gap is 2.76 eV. Another consequence of SOC is that the double degenerate VBM splits. Similarly, SOC modifies the defect levels as indicated in Fig. 1c. The calculated occupied defect level lies at 1.09 eV above VBM. The STS measured occupied level is roughly about 1.1 eV above the VBM considering the spectra smearing (about 0.19 eV)32, in good agreement with the theoretical value. In addition to the in-gap defect levels, there are degenerate e defect levels (ex, ey) about − 0.62 eV below the VBM. The degeneracy is lifted due to SOC interaction and the splitting is 113 meV. Such large splitting has been previously measured for sulphur vacancy in WS2 by STS31. Figure 1d plots the spatial wavefunction of the defect levels. The distribution of in-gap levels clearly demonstrates C3v symmetry with a1 character. The degenerate states mainly come from the d orbitals of neighbour tungsten atoms. However, the unoccupied defect level is located far above the conduction band minimum. Hence the experimentally observed occupied defect level is attributed to the negatively charged defect while the unoccupied level does not correspond to C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{-}\).

Fig. 1: Electronic structure of the C\({}_{\,{{\mbox{S}}}\,}^{-}\) in WS2.
figure 1

a Side view of the optimized ground state geometry of C\({}_{\,{{\mbox{S}}}\,}^{-}\). The energy levels diagram of C\({}_{\,{{\mbox{S}}}\,}^{-}\) at ground state without (b) and with (c) SOC effect. The arrows indicate spin-up and spin-down channels. The dash lines indicate the position of defect levels after charge correction. d Spatial wave function of the defect levels. Numbers denote the first, second and third neighbouring tungsten atoms around carbon atom. The isosurface is set to 0.00068/Å3.

We anticipate that, with positive bias in STS, the Fermi-level of the sample shifts down with respect to the Fermi-level of the tip. As a consequence, the electron from the occupied defect level in the gap transfers to the graphene substrate, so the defect level is depleted in the gap with turning the defect charge state from negative to neutral. With the increase of sample bias to +0.52 eV, electron from the tip transfers to the unoccupied state of the neutral C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) and recharges it. Such charge transition during STS measurement has been reported for the silicon dangling bond on the Si surface33. Hence, the unoccupied state observed with positive bias should be associated with the empty level of the neutral defect. This scenario is confirmed by our calculations. The calculated formation energy as a function of Fermi-level is plotted in Fig. 2. The charge transition level (CTL) for (0 − 1) is at 1.57 eV above VBM. The graphene substrate tunes this Fermi level of WS2 above CTL and maintains negatively charged. However, positive bias sinks the Fermi-level and alters the charge state during experiment. The defect levels of neutral C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) is plotted at Fig. 2b. There is only one non-degenerate unoccupied a1 level in the gap at 2.11 eV above VBM which again agrees with the observed one at about 2.1 eV above VBM in STS32.

Fig. 2: Thermal stability and electronic structure of the C\({}_{\,{{\mbox{S}}}\,}^{0}\) in WS2.
figure 2

a Formation energy as a function of Fermi-level for CS defect. The green and orange colours denote the VBM and CBM. The CTL energy is aligned to VBM with SOC included. The − 2 charge state is not stable. The chemical potential of carbon atom is set to bulk diamond. The energy diagram of neutral state of CS at ground state without (b) and with (c) SOC effect.

Our interpretation of results clearly shows that the charge state of single CS defect can be well manipulated by the choice of the substrate and/or the applied bias. The spin state of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{-}\) is S = 1/2 which might act as qubit. Nevertheless, the calculated excitation energies with involving the defect state in the gap are always larger than the ionisation threshold energy at around 1.2 eV (see Supplementary Note 4). This makes the optical readout of the spin state difficult as ionisation competes with the neutral photo-excitation of the defect upon illumination. The C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) defect ground state is a closed shell singlet but a triplet S = 1 metastable state may exist that can act as a qubit similarly to the ST1 centre in diamond34. Next, we explore the fine electronic structure of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) in WS2 and its potential as qubit.

Ab initio spectroscopy of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) in WS2

In the neutral charge state, there is one empty a1 level in the gap. The ground state is a closed shell singlet 1A1. An electron from VBM may be promoted to the empty a1 level upon illumination. After emptying the VBM state, a localized e level pops up in the gap because of the strong Coulomb interaction between the localized electrons which lies at 0.6 eV below VBM when occupied. In the hole picture, the excited state can be described as ea1 electronic configuration and the corresponding many-body states can be analysed by group theory within C3v symmetry (e.g., Ref. 35). One singlet, 1E state exists near the 3E triplet state. The 3E manifold contains Ex, y ms = 0 and A1A2 = A1,2 and E1,2 ms = ±1 spin projections in double group notation.

First, we approximate the singlet and triplet excitation energies by \({e}^{\uparrow }{a}_{1}^{\downarrow }\) and \({e}^{\uparrow }{a}_{1}^{\uparrow }\) electronic configurations (arrows represent the respective spin-up and spin-down spin channels), respectively, in C3v symmetry without SOC. The calculated ZPL energies are 1.062 eV and 0.985 eV, respectively. These energies are significantly smaller than the photo-ionisation threshold energy, thus C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) is a photostable quantum emitter in the telecom wavelength region. Furthermore, a high spin triplet state exists that may be used as a qubit.

The fine structure of the excited states of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) depends on the complex interaction of phonons, orbitals and spins. Orbitals and spins are coupled by spin-orbit interaction whereas 1E and 3E states are Jahn-Teller active, i.e, strong electron-phonon coupling is expected by the symmetry distorting E phonons, i.e., it establishes an Ee dynamic Jahn-Teller (DJT) system. Since the estimated energy gap between the singlet and triplet levels is Δ = 54.9 meV and the calculated spin-orbit coupling connecting the E{x, y} and 1E states is λz = −54 meV the singlet and triplet states may be coupled as

$${\hat{H}}_{\rm e}= {\hat{W}}_{\rm ee}+{\hat{H}}_{\rm SOC}=0|{\!\,}^{3}E\rangle \langle {\!\,}^{3}E|+{{\Delta }}|{\!\,}^{1}E\rangle \langle {\!\,}^{1}E|+{\lambda }_{z}|{\!\,}^{3}E\rangle \langle {\!\,}^{1}E|=0|{E}_{x,y}\rangle \\ \langle {E}_{x,y}|+{{\Delta }}|{\!\,}^{1}E\rangle \langle {\!\,}^{1}E|+{\lambda }_{z}|{E}_{1,2}\rangle \langle {E}_{1,2}|-{\lambda }_{z}|{A}_{1,2}\rangle \langle {A}_{1,2}|+{\lambda }_{z}|{E}_{x,y}\rangle \langle {\!\,}^{1}E|,$$

where the reference zero energy is the level of the triplet state before applying spin-orbit interaction. The negative sign of λz is due to the hole left on the e orbital. Eq. (1) clearly shows that the singlet and the ms = 0 part of the triplet are mixed by spin-orbit interaction. The eigenvalues of the matrix provide the electronic part of SOC are discussed in Supplementary Note 5.

However, the strength of the effective spin-orbit coupling which separates the A1,2, Ex,y and E1,2 levels can be significantly reduced due to the strong electron-phonon coupling which mixes the ml = +1 and ml = −1 components of the electronic wavefunctions known as Ham reduction36. In the Ee DJT system37, the electron-phonon coupling may be described as

$${\hat{H}}_{{{{{{{\rm{JT}}}}}}}}=\hslash {\omega }_{e}({a}_{x}^{{{{\dagger}}} }{a}_{x}+{a}_{y}^{{{{\dagger}}} }{a}_{y}+1)+F\left({\hat{\sigma }}_{z}\hat{x}+{\hat{\sigma }}_{x}\hat{y}\right)\,{{\mbox{,}}}\,$$

where ax,y, \({a}_{x,y}^{{{{\dagger}}} }\) are creation and annihilation operators for E phonon, ωe is the energy of the effective E phonon mode. The \({\hat{\sigma }}_{z}=|{e}_{x}\rangle \langle {e}_{x}|-|{e}_{y}\rangle \langle {e}_{y}|\) and \({\hat{\sigma }}_{x}=|{e}_{x}\rangle \langle {e}_{y}|+|{e}_{y}\rangle \langle {e}_{x}|\). F is the electron-phonon coupling strength and could be calculated from \(F=\sqrt{2{E}_{{{{{{{\rm{JT}}}}}}}}\hslash {\omega }_{e}}\). The ωe can be obtained from parabolic fit to the adiabatic potential energy surface (APES) and EJT = 89.9 meV is the JT energy as shown in Fig. 3(b). E1,2 and A1,2 cannot interact with Ex,y and 1E through DJT, and DJT acts only on the ms = ±1 states. The calculated F = 74 meV is the same order of magnitude as the spin-orbit coupling strength. In this case, the spin-orbit interaction is not taken like a small perturbation near electron-phonon coupling but the full Hamiltonian \(\hat{H}={\hat{W}}_{{{{{{{\rm{ee}}}}}}}}+{\hat{H}}_{{{{{{{\rm{SOC}}}}}}}}+{\hat{H}}_{{{{{{{\rm{JT}}}}}}}}\) should be solved simultaneously. Nevertheless, we solved this problem perturbatively too, in order to gain more insight about the complex interplay of phonons, orbitals and spins (see Supplementary Note 5). We find that the perturbative solution is surprisingly close to that of the full Hamiltonian solution, and the results can be explained by a Ham reduction factor p = 0.017 which means that the spin-orbit coupling is strongly quenched by the electron-phonon coupling with reducing the energy spacing between the A1,2 and E1,2 to about 454 GHz whereas the Ex,y level goes above that of A1,2 by about 99.1 GHz. As a consequence, the electron spin-spin interaction, typically in the GHz energy region, should be also considered in the spin Hamiltonian.

Fig. 3: Multiplets structure and the JT process.
figure 3

a The possible optical excitation cycle among ground state and excited states. Blue arrow indicates the allowed optical transition by electric dipole moment interaction. The black dots denote the structures with Cs symmetry. The EJT are 139 meV and 89.9 meV for 1E and 3E, respectively. Red dash lines indicate selective non-radiative ISC between different spin multiplicity. Intrinsic SOC splitting λz separates the spin sublevels in the triplet 3E excited state which is reduced by p < 1 Ham reduction factor due to Jahn-Teller (JT) interaction. b APES of the JTE between C3v and Cs symmetry for C\({}_{\,{{\mbox{S}}}\,}^{0}\). The line is the fitted curve and dot is the DFT result. The C3v configuration is refered to Q = 0. The standard deviation is less than 1%. c Polaronic eigenstates for energy levels in 3E with SOC  DJT interaction included. The inset shows the lowest vibronic solution for the three states.

The electron spin-spin Hamiltonian of the 3E state can be expressed by

$$\hat{{H}_{{{{{{{\rm{ss}}}}}}}}}= \; D(|{A}_{1}\rangle \langle {A}_{1}|+|{A}_{2}\rangle \langle {A}_{2}|+|{E}_{1}\rangle \langle {E}_{1}|+|{E}_{2}\rangle \langle {E}_{2}|)\\ -2D(|{E}_{x}\rangle \langle {E}_{x}|+|{E}_{y}\rangle \langle {E}_{y}|)\\ +2{{\Lambda }}(|{A}_{1}\rangle \langle {A}_{1}|-|{A}_{2}\rangle \langle {A}_{2}|)\,{{\mbox{,}}}$$

where the energy gaps between the ms = 0 and ± 1 and between the A1 and A2 are given by

$$D=\frac{{\mu }_{0}}{4\pi }{g}^{2}{\beta }^{2}\left\langle X\right|\frac{1-3{\hat{z}}^{2}}{4{r}^{3}}\left|X\right\rangle =-\frac{1}{2}{D}_{zz},$$
$${{\Lambda }}=2\frac{{\mu }_{0}}{4\pi }{g}^{2}{\beta }^{2}\left\langle X\right|\frac{3{\hat{x}}^{2}-3{\hat{y}}^{2}}{4{r}^{3}}\left|X\right\rangle =\frac{1}{2}{D}_{xx-yy}.$$

Here, the β is the Bohr magneton and g is the Landé factor. The calculated D is 2.5 GHz and Λ is 970 MHz. The magnitude manifests itself as perturbation over SOC and DJT and could be treated independently. Due to the non-symmetric character of Λ, it is reduced by the Ham factor discussed above and the reduced gap pΛ is about 16.5 MHz. We note that the energy gap between Ex,y and A1A2 levels are indicative as will be discussed below.

The Ex,y level shifts above the ms = ±1 levels because its interaction with the singlet 1E state. This interaction results in a singlet inmixture into the Ex,y state by 2.1%. As a consequence, C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) may act like a phosphorescence centre with emission between the triplet state and the singlet ground state. The calculated ZPL energy is 0.847 eV (~1460 nm) which nicely falls to the desired telecom wavelength for efficient quantum communication via optical fibre links. We note here that the estimated accuracy in the absolute value of the ZPL energy is about 0.1 eV (see Methods). Next, we discuss whether the triplet spin levels may be exploited to realize a qubit.

Quantum optics protocol for C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\)

The intriguing electronic and phonon properties of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) motivate us to propose a set of quantum protocol for qubit application. We start at the 1A1 ground state of the defect. The absorption by 1E state upon illumination in the near infrared (NIR) region (about 1340 nm) should be very effective by {x, y} polarized photons as the calculated optical transition dipole moment is about 24.7 Debye which corresponds to a radiative lifetime at 1.52 ns.

After arrival at 1E, a very fast intersystem crossing (ISC) occurs selectively to the ms = 0 of Ex,y state because of the following arguments. According to the theory and measurements for NV centre in diamond with similar electronic structure in the excited state,38 the cooling of excited vibronic levels to the ground state vibronic level occurs within the order of 100 fs it is slowed down for C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) to about 38.2 ps because of the overlap spin function of 1E and Ex,y state. Here we estimate the ISC rate from 1E with

$${\tau }_{{{{{{{\rm{ISC}}}}}}}}=(2\pi /\hslash ){\lambda }_{z}^{2}F({{\Delta }}E),$$

where F is the function of overlap between the vibrational spectrum of singlet and triplet and ΔE is the energy splitting between singlet and triplet. The final estimate for the ISC lifetime is in the order of picosecundum (see Supplementary Note 9) which is much shorter than the radiative lifetime of the 1E state. The Ex,y state (or one of them in the presence of constant electric fields or strain, e.g., Ref. 35) can be used as one of the quantum levels that can be initialized by optical pumping.

Here we note that the 3E states are highly sensitive to strain or constant electric fields as manifested already by the strong electron-phonon coupling. Up to 0.64% strain could be applied to monolayer WS239. As a comparison, 0.005% strain induces about 38 GHz energy splitting between Ex,y in diamond NV centre35. Thus, the actual strain in WS2 may largely split and shift the spin levels of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) that can be tuned towards the desired microwave resonance fields.

The optical lifetime of the 3E state can be calculated with

$${\tau }_{{{{{{{\rm{rad}}}}}}}}={p}_{1}\frac{3\pi {\epsilon }_{0}{c}^{3}{\hslash }^{4}}{{n}_{D}{E}_{{{{{{{\rm{ZPL}}}}}}}}^{3}{\mu }^{2}}{{\mbox{,}}}\,$$

where ϵ0 is the vacuum permittivity and c is the speed of light. Here n = 3.04 is the refractive index of WS2 and μ is the optical transition dipole moment. p1 is the mix fraction of the singlet into 3E state. Finally, the calculated optical lifetime is about 145 ns with a corresponding radiative rate at 1.10(2π) MHz (in angular frequency). We note that the non-radiative decay may compete with the radiative one at elevated temperatures which shorten the lifetime and decrease the quantum efficiency (see Supplementary Fig. 15). The estimated lifetime at low temperature implies that it is viable to apply quantum operation for this state, for instance, by employing a π microwave pulse resonant with A2 state. Since A1,2 states are completely dark it should provide a large optical read-out contrast with respect to the Ex,y states. Thus, the electron spin qubit state can be optically initialised and read out, as sketched in Fig. 4. According to recent studies40, the coherence time of the S = 1 qubit should be about 11 ms in WS2 thus the coherence time may be limited by the large hyperfine interaction of the electron to the nearest nuclear spins of the defect. According to our results (see Supplementary Note 7), 13C has a large hyperfine interaction (in the order of 100 MHz), thus should be avoided as a potential ancilla qubit because it would cause decoherence. Although, the immediate three 183W neighbour nuclear spins have an interaction strength of about 10 MHz which could also decoherent the electron spin. On the other hand, farther nuclear spins (see Supplementary Fig. 12) with an interaction strength of about 100 kHz may be used as a resource to store the quantum information before decaying to the ground state that may be realized at excited state level anticrossing with applying a small well tuned external magnetic field41,42. That qubit can be a very long living quantum memory in WS2 host, similarly to the concept of ST1 centre in diamond34. We note that the ZPL emission could be small over the phonon-assisted emission because the estimated Debye-Waller factor is about 0.002 based on the Huang-Rhys theory applied to the Cs geometry of the 3E state (see Supplementary Note 6). We estimate about 1 million counts per second total emission from a single neutral C defect based on radiative lifetime and estimated collection efficiency (19.1% in Ref. 43) which can be readily observed. The coherent ZPL emission would be in the order of 2500 counts per second which is still observable. Nevertheless, optical cavities were already built from WS244,45 that can be used to significantly enhance ZPL emission of Cs qubit by Purcell effect.

Fig. 4: The spin-spin interaction and quantum protocol for C\({}_{\,{{\mbox{S}}}\,}^{0}\).
figure 4

The splitting between A1 and A2 is reduced by Ham factor.

In conclusion, we determined the electronic and vibronic properties of carbon defect in WS2 that has been recently observed in experiments. The signal measured in STS could be attributed to the localized states in different charge states. The energy diagram of C\({}_{\,{{{{{{\rm{S}}}}}}}\,}^{0}\) manifests itself as promising qubit candidate as the spin can be initialised and read out optically, and microwave excitation can be applied to prepare a coherent state. To produce the periodic pattern of this optically active defect, other unintentional impurities should be avoided surrounding the defects. A hBN capping layer can be used to prevent potential hydrogen reattachment (see Supplementary Note 2). Owing to the controllable fabrication, surface accessibility, mechanically and electrically tunable electro-optical properties, and optical cavities from the material, we propose CS in WS2 as a scalable qubit operating at the near infrared region close to the ideal telecom wavelength.


Details on DFT calculations

Our calculations are performed using the density functional theory (DFT) implemented in Vienna ab initio simulation package (VASP)46,47. Projector augmented wave (PAW) formalism48,49 is selected to describe the valence electrons close to nuclei. The energy cutoff for the expansion of the plane-wave basis set was set to 520 eV. The screened hybrid density functional of Heyd, Scuseria, and Ernzerhof (HSE)50,51 is used to calculate the electronic structure. In this approach, the short-range exchange potential is described by mixing with part of nonlocal Hartree-Fock exchange with fraction α. The electron-electron interaction between short and long ranged part is adjusted by separation parameter μ. To overcome this difficulty, these two parameters are adjusted. The HSE parameters were attested against many-body perturbation methods (see Supplementary Note 1), resulting in α = 0.40 with μ = 0.10 Å−1, which could closely reproduce the experimental fundamental band gap at about 2.76 eV32,52 with SOC interaction included as shown in Supplementary Fig. 2.

A 6 × 6 monolayer supercell is constructed and the perfect supercell contains 108 atoms which is sufficient to avoid the periodic defect-defect interaction, a vacuum layer of 12 Å is applied to separate the periodic layer images. We also consider a graphene substrate which is a direct simulation of the experiments,32 together with calculation containing hBN capping layer to protect the defect, as shown in Supplementary Fig. 3. In this case we apply 4 × 4 supercell for WS2 and 5 × 5 supercell for graphene or hBN that are nearly commensurate. The result shows the graphene or hBN substrate would not change the electronic structure of WS2 and the defect levels are well kept. Γ-point scheme is converged for the k-point sampling of the Brillouin zone for these sizes of supercell. During structural optimization, the internal coordinates are allowed to relax until the forces of each atom are less than 0.01 eV/Å. The calculated lattice constant is 3.14 Å and agrees well with experimental value (3.155 Å)53,54. The optical transition energies were obtained from the differences in total energies between the different electronic configurations through ΔSCF method which has a typical accuracy of about 0.1 eV with involving localized defect states55. We note that the Kohn-Sham orbitals change their localization in the ΔSCF procedure with respect to those in the ground state electronic configuration for the neutral C defect. Our ab initio many-body perturbation theory based GW and Bethe-Salpeter equation (BSE) calculations partially support the construction of the lowest energy excitonic state of the neutral C defect in the ΔSCF method as discussed in Supplementary Note 8. We note that ΔSCF method for the negatively charged C defect may produce less accurate results than that for the neutral defect because the former involves delocalized states split from the conduction band that may be treated by many-body perturbation methods56,57,58.

The phonon calculation at Γ-point scheme for the supercell is done by calculating Hessian matrix based on the derivative forces. The HSE optimized geometry is fixed to calculate the phonon at Perdew-Burke-Ernzerhof (PBE)59 level. The SOC is calculated within the noncollinear approach. The spin quantization axis is aligned with symmetry axis of the defect. The SOC is evaluated based on geometry from spin-polarized calculation. Here supercell size scaling method, Freysoldt-Neugebauer-Van de Walle (FNV) correction and self-consistent charge correction60,61 are used to calculate the formation energy and defect levels as discussed in Supplementary Note 3. The non-radiative transition is calculated based on NONRAD code62, as discussed in Supplementary Note 9.