Owing to their excellent electrical conductivity1, charge-carrier mobility2, specific surface area3, light-weight4, and flexibility5, carbon nanotubes (CNTs) have attracted considerable attention as potential components for various devices, including transistors6, sensors7, photovoltaics8, transparent electrodes9, and thermoelectric generators10. Similar to current silicon-based electronics, effective doping techniques must be developed for CNTs. As electronic devices require p/n junctions, controlling the major carrier type (electron for n-type and hole for p-type) and its density is important for facilitating the intended device functions. To date, numerous doping reagents have been proposed. For instance, alkali metals11,12, amines13,14, phosphines15, and supramolecular salts16 were proposed as n-type dopants, whereas protonic acids17,18, halogen19, organic borates20, and AuCl321 were identified as p-type dopants.

Furthermore, the thermal stability of doped states is essential for ensuring long-term operability due to device heating during operation. For instance, logic circuits generate condensed heat owing to the application of electric currents22, photovoltaic cells are heated upon exposure to light23, and thermoelectric devices work in hot environments. Although ever-explored doping reagents have been reported to induce doped states in CNTs with stability of several days to months in air24,25,26,27, thermal stability has been often overlooked. The techniques for stabilizing doped states of CNTs and the understanding of their chemistry are still in their infancy.

Electrons or holes are injected into CNTs via charge transfer interactions (e.g., ππ, nπ, σπ, and ion–π interactions) between CNTs and dopants. The concept of charge-transfer doping of CNTs is illustrated in Fig. 1a. Reductants (Red) donate electrons, whereas oxidants (Ox) donate holes to CNTs, resulting in n- (anion) and p- (cation) doped CNTs, respectively. Subsequently, the conjugate acid (Red+) and base (Ox) adsorb onto the surface to compensate for the injected carriers (complex formation)16. The hard and soft acid and base (HSAB) concept is useful for comparing the stability of complexes28,29. Generally, soft acids and bases are large and possess low charge density and high polarizability, and vice versa. Pairs of hard/hard and soft/soft cations and anions produce more stable complexes. For instance, the soft Cu+ cation creates a stable complex with the soft I anion (CuI), but CuI2 (combining hard Cu2+ and soft I) easily decomposes. As charge carriers injected in CNTs are expected to delocalize through their π-conjugations, the p-doped CNTs are considered soft cations that may stabilize when coordinated with soft anions30,31,32.

Fig. 1: Complex-chemistry concept of chemical doping of carbon nanotubes.
figure 1

a Schematic of the concept of chemical doping of carbon nanotubes (CNTs). b Chemical structures of the protonic acids used in this study. c Molecular structures of the anions used in this study with their electrostatic potential (ESP) mapping as molecular surface, and the order of chemical hardness. Optimization of the structures, ESP mapping, and calculation of chemical hardness were performed using density functional theory at B3LYP/6-31 G(d,p) GD3 levels. Cl, NO3, CH3COO, and SO42− are anion species originating from the protonic acids shown in (b). TFSI and NFSIare anion species used for the anion replacement shown in Fig. 5. Larger-in-size anions tend to provide smaller chemical hardness values.

As a quantitative parameter for comparing the hardness of chemical species, chemical hardness (η) was previously introduced as a parameter of the resistance of a chemical species to change its electronic configuration33. η of a compound can be obtained by determining its total energy (EN) and those of its reduced (EN+1) and oxidized (EN−1) states via computational calculations, and applying the following equation:

$${{{{\eta }}}}=\frac{1}{2}{\left(\frac{{\partial }^{2}E}{\partial {N}^{2}}\right)}_{v}=\frac{1}{2}\left({E}_{N+1}-2{E}_{N}+{E}_{N-1}\right),$$

where E is the total energy of the chemical, N is the number of electrons, and v is the external potential. Here, higher values of η indicate harder chemical species.

Herein, we employed several protonic acids, each with different anions, as model compounds for p-type dopants. The thermal stability of p-doped states along with the chemical hardness of the anions was compared to evaluate the effect of the coordination between hole-injected (positively charged) CNTs and the counter anion on the stability. Further, the stability of p-doped states could be significantly improved by replacing the hard anions with soft ones. Considering the excellent thermal stability (over 1 year at 100 °C in air), simple doping and anion replacement processes, tunability of doping levels, and versatility in the choice of materials, our findings establish a promising foundation for the production of p-type CNTs for molecular electronics.


Doping effect of protonic acids

Protonic acids are good candidates for verifying the HSAB concept in complexes with doped CNTs owing to the abundance of anion species and the released proton acting as the electron acceptor (Fig. 1b). Protons efficiently withdraw electrons from CNTs, and subsequently, anions adsorb onto the resulting CNT cations for coordination. Further, these anions possess distinct chemical hardness values (Fig. 1c), allowing to compare the effect of hardness on doped CNT stability.

Chemical doping of CNTs affects the major carrier type and its density. Such changes were expected to be verified by Hall-effect measurements; however, the random orientation of the tubes in our CNT samples (see SEM images shown in later) hindered the application this principle. Instead, the effect of doping on thermoelectric properties (electrical conductivity and Seebeck coefficient), work function shifts, and optical absorptions was evaluated. The sign and absolute value of the Seebeck coefficient reflect the major carrier type (positive and negative for p- and n-type materials, respectively) and its density (the higher carrier density typically reduces the absolute coefficient value), regardless of the orientation. Additionally, the electrical conductivity was used as an indicator of doping and dedoping because it is directly affected by the carrier density.

Self-standing CNT (mixed semiconducting (s-) and metallic (m-) tubes with the diameter of 1.6 ± 0.4 nm) films with good electrical conductivity of ∼1160 S cm−1 and a Seebeck coefficient of ∼+45 μV K−1 were used as the control. The positive sign of the coefficient indicates the p-type nature of the films due to autoxidation in air34. CNT films were doped through immersion into aqueous solutions of protonic acids for 5 min, followed by drying in vacuo for 30 min. As shown in Fig. 2a, the electrical conductivity drastically increased to 2320, 5680, 2920, and 2780 S cm−1, whereas the Seebeck coefficient decreased to +25, +18, +25, and +23 μV K−1 upon doping with HCl, HNO3, CH3COOH, and H2SO4, respectively. The increase in electrical conductivity and decrease in the Seebeck coefficient indicate hole doping by the acids, reflecting the interdependence between these parameters in relation to carrier density35. The outstanding conductivity of HNO3-doped films may be attributed to oxidative effect of proton and NO3. The electrical parameters vary as a function of the protonic acid concentration (Fig. 2b). Higher HNO3 concentrations induce heavier p-doping in CNTs, as evidenced by the increased electrical conductivity and lower Seebeck coefficient values. Although the doping level appears to saturate at an HNO3 concentration of ∼4 M, the thermoelectric properties were continuously modulated within the concentration range of 0–4 M, indicating the tunability of doping level.

Fig. 2: Doping effect of carbon nanotubes by protonic acids.
figure 2

a Variations of electrical conductivity (σ) and Seebeck coefficient (S) of the doped CNT films according to the applied protonic acids. b Variations of σ and S of CNT films doped by aqueous HNO3 solutions with different concentrations (0.1–13 M). c Work function shifts of CNT films after protonic-acid doping. Data statistics: n = 3. Error bars indicate the corresponding standard deviations (SD). d UV-vis-NIR spectra recorded before and after doping. S11 and S22, and M11 indicate that these absorption bands represent the interband transitions in semiconducting and metallic CNTs, respectively.

The shift in the work function measured using the Kelvin probe method (Fig. 2c) further supports the hole doping by the protonic acids. Upon doping, the work functions of CNT samples increased by several hundred meV, indicating that the Fermi levels are deepened because of electron withdrawing. The shift in work function is additionally supported by the absence of the absorption band S11 (first interband transition of semiconducting CNTs) in the ultraviolet-visible near-infrared (UV-vis-NIR) spectrum of the CNTs (mixed s- and m- tubes, Fig. 2d). This suggests that the electron withdrawal from the π-band prevents the corresponding absorption owing to electron excitation36. The decrease in absorption in S22 (second interband transition of s-CNTs) and M11 (first interband transition of m-CNTs) was also observed in s- and m-CNT samples (Supplementary Fig. 1). This indicates that the protonic acids induced p-doped states in CNTs of both types.

Morphological observations through scanning electron microscopy (SEM, Fig. 3a) also indicate that no remarkable structural changes (e.g., orientations and diameters of the tube bundles) were introduced by doping. Therefore, the observed changes in electrical properties due to doping (Fig. 2a, b) are attributable to the increase in carrier density rather than to structural rearrangement. CNT functionalization with hydrophilic groups such as −COOH through harsh acid treatment (e.g., HNO3/H2SO4 reflux at high temperatures or with sonication) was reported37,38. Raman spectra of CNTs before and after HNO3 doping are compared in Fig. 3b to reveal the adsorption nature of protons. The G-band (1550–1580 cm−1), D-band (∼1330 cm−1), and the G+/D ratio (indicating sp2 integrity39, Supplementary Table 1) remain unchanged after doping similar to other protonic acids (Supplementary Fig. 2). Therefore, the applied protons did not cause structural damage on sp2 frameworks of the CNTs (such as the creation of covalent bonding).

Fig. 3: Structural and dedoping characterizations of p-doped carbon nanotube materials.
figure 3

a Scanning electron microscope images of the as-prepared and HNO3-doped CNT films. Scale bars correspond to the length of 1 μm. b Raman spectra of the CNT films before and after HNO3 doping. Spectra of the CNT samples doped with the other protonic acids are shown in Supplementary Fig. 2. Variations of (c) electrical conductivity (σ) and (d) Seebeck coefficient (S) upon repeated doping by HNO3 and dedoping by NaOH. Data statistics: n = 3. Error bars indicate the corresponding SDs.

The presence of reacted protons without chemically adsorbing on the CNTs, may be because they form H2 after charge transfer with the CNTs to be released from the films. However, H2 gas was not detected by gas chromatography measurement during acid doping (Supplementary Fig. 3), by which we could confirm that the protons remained in the CNT films. They likely exist near the CNTs, carrying a partial charge (Hδ+; 0 ≤ δ < 1) due to charge transfer, rather than introducing sp3 defects (through covalent bonding) in the π-conjugated systems of CNTs.

These results align with those of dedoping experiments conducted using a Brønsted base (NaOH, Fig. 3c, d). By immersing the HNO3-doped CNT film with enhanced electrical conductivity (6000–7000 S cm−1) and reduced Seebeck coefficient into an aqueous NaOH solution, the conductivity and the Seebeck coefficient were drastically reduced and increased, respectively. Through this process, we could demonstrate the repeatability of p-doping and dedoping. The dedoping is attributed to the withdrawing of protons from the doped CNTs by OH. Meanwhile, dedoping achieved by immersing the HNO3-doped CNT films in deionized water was less effective (see Supplementary Fig. 4 and Supplementary Table 2). These results indicate that immersing CNTs into protonic acids under mild conditions (without heating or sonication) induced heavily p-doped states in CNTs while preserving their sp2 framework. These molecular systems are valuable for investigating the stability of doped states achieved through noncovalent anionic functionalization of CNTs, as discussed below.

Thermal stability enhancement of doped p-type materials via ion replacement

While doping CNTs using protonic acids efficiently injects holes without significant damage, assessing the thermal stability of the doped state is essential for practical device applications22,23. To investigate the stability of the p-doped CNT materials, we measured the temporary changes in electrical conductivity and Seebeck coefficient after heating them at 100 °C in air. Figure 4a–h illustrates the stability of these properties for 0–70 h (longer periods, spanning 0–7000 h, in Supplementary Fig. 5). The thermal stability of the p-doped CNTs in air varies depending on the type of anion. While the electrical properties of H2SO4-doped CNT film remained stable for over 6000 h (Supplementary Fig. 5), those of CNT samples doped with HCl, HNO3, and CH3COOH rapidly decreased immediately after incubation commenced. The reduction in electrical conductivity and increase in the Seebeck coefficient indicate dedoping following incubation. As SO42− is considered the softest among the tested anions deriving from protonic acid (Fig. 1c), good coordination between the CNT cation and the adsorbed anion is considered responsible for the thermal stability of the doped state.

Fig. 4: Long-term stability of carbon nanotube samples doped with protonic acids.
figure 4

Temporal changes in the electrical conductivity (σ) and Seebeck coefficient (S) of CNT samples doped with (a, b) HCl, (c, d) HNO3, (e, f) CH3COOH, and (g, h) H2SO4 during incubation (up to 70 h) at 100 °C in air. The changes after longer-time incubation are shown in Supplementary Fig. 5. Data statistics: n = 3. Error bars indicate the corresponding SDs.

As shown in Fig. 2b, the modulation of the doping level was achieved by varying the concentration of protonic acids. Especially, HNO3 induced heavily p-doped states in CNTs, resulting in remarkably high conductivity (up to 6000 S cm−1); however, their stability was poor. Optimizing the doping level through acid concentration adjustments, while simultaneously stabilizing the created doped state after the doping process, is essential for developing electronic and energy devices with the desired functions.

The dedoping process of HCl-, HNO3-, or CH3COOH-treated CNTs upon heating can be attributed to the desorption of the dopants and the disappearance of the injected holes40. Suppressing this reaction would lead to the stabilization of the doped states. Specifically, replacing the anions derived from acids with softer anions can enhance the coordination with CNT cations, leading to improved stability. Yamashita et al. recently identified bis(trifluoromethylsulfonyl)imide (TFSI) as a soft anion species in terms of chemical hardness41. In that study, the oxidation of semiconducting polymer poly(2,5-bis(3-tetradecylthiophen-2-yl)thieno[3,2-b]thiophene) (PBTTT) using tetrafluorotetracyanoquinodimethane (F4TCNQ) was accelerated in the presence of Li-TFSI. This was attributed to the creation of an energetically favored [PBTTT•+ TFSI] complex, as compared to [PBTTT•+ F4TCNQ•−], resulting in high doping levels of approximately one charge per monomer unit. Further, the use of a relatively hard cation (Li+) instead of soft organic ones (e.g., imidazolium cations) promoted the doping and anion exchange.

Accordingly, we used several lithium salts comprising bulky, charge-delocalized anions, TFSI, and bis(nonafluorobutanesulfonyl)imide (NFSI), to stabilize the p-doped state of CNTs (Fig. 5a). These anions are chemically softer than Cl, NO3, and CH3COO, with NFSI being even softer than SO42− (Fig. 1c). The suggested anion replacement is supported by quantum calculations of the free energy variation (ΔG) of ion pair formation. Figure 5b shows ΔG values corresponding to the pairing of different anions with Li+, with all values being negative. Ion pairs Li-Cl, Li-NO3, and Li-CH3COO exhibit significantly higher absolute free energies than Li-TFSI and Li-NFSI. Therefore, Li+ creates more stable ion pairs with Cl, NO3, and CH3COO than with TFSI and NFSI, indicating the promotion of anion replacement by applying Li-TFSI and Li-NFSI to CNTs functionalized with Cl, NO3, and CH3COO.

Fig. 5: Long-term stability of anion-replaced carbon nanotube samples.
figure 5

a Schematic of the anion replacing concept for the stabilization of p-doped CNTs using a lithium salt (Li+A) as a stabilizer. b Variations in the free energy (ΔG) of ion pair formation calculated by density functional theory at B3LYP/6-31 G(d,p) GD3 levels. The larger negative value indicates that the ion pair can get larger energetic gain. c Compositional ratios of chlorine to carbon (Cl/C) in CNT films calculated using energy dispersive X-ray spectrometry. Temporal changes in d electrical conductivity (σ) and e Seebeck coefficient (S) of CNT samples doped with HNO3 and applied to anion exchange with Li-TFSI. Data statistics: n = 3. Error bars indicate the corresponding SDs.

Anion replacement was conducted through a facile wet process consisting of simply immersing the acid-treated CNT films into a lithium salt solution. Energy dispersive X-ray spectroscopy (EDS) was employed to confirm the anion replacement before and after immersion of the CNT films into the lithium salts. For the HNO3- and CH3COOH-doped CNTs, H, C, N, and O elements were used as indicators for analyzing the anion replacement. However, as TFSI also comprises these elements, an alternative indicator was required. As TFSI lacks the Cl element, EDS analyses were conducted using HCl-doped CNTs. The compositional ratio of Cl to C is shown in Fig. 5c. Cl is observed in the undoped CNTs, probably owing to the residues of catalysts used during the nanotube synthesis42. The Cl/C value significantly increased after HCl doping due to the coordination of CNT cations by Cl. The subsequent immersion of the HCl-doped CNT films into an acetone solution of Li-TFSI reduced the Cl/C value. Additionally, fluorine and sulfur were observed after the immersion into Li-TFSI solution (Supplementary Fig. 6a). Considering that the observed compositional ratios of fluorine and sulfur to carbon atoms (F/C and S/C) were F/C:S/C ≅ 3:1 (nearly identical to the composition of F and S in TFSI), the decrease in Cl/C and presence of F and S signals indicate that Cl anions were replaced with TFSI on the p-doped CNTs.

Figure 5d, e shows temporary changes in the electrical conductivity and Seebeck coefficient of CNT films doped with HNO3 and subsequently treated with Li-TFSI solutions. In contrast to the as-prepared and acid-treated samples, the properties of these films remained stable over 9000 h (>1 y) at 100 °C in air (we also confirmed long-term stability of thermoelectric power factors as described in Supplementary Note 1 and Supplementary Fig. 14). CNT samples doped with HCl and CH3COOH, and subsequently treated with Li-TFSI also exhibited long-term stability (Supplementary Figs. 7, 8). Further, the thermal stability was improved through the replacement of relatively hard anion species (from protonic acids) with the soft TFSI anion and the resulting enhancement in the coordination with the CNT cation. The treatment with lithium salts comprising NFSI also resulted in enhanced thermal stability (Supplementary Fig. 9). In addition, doping with a protonic acid comprising the TFSI anion (bis(trifluoromethylsulfonyl)imide, H-TFSI) led to an increase in electrical conductivity and a decrease in the Seebeck coefficient, indicating the induction of p-doped states in CNTs (Supplementary Fig. 10). The p-doped states induced using H-TFSI were more stable than those obtained by doping with HCl, HNO3, and CH3COOH, remaining stable for over 2000 h at 100 °C in air. These results further support the contribution of coordination by the TFSI anion to the stabilization of p-doped state of CNTs.

The significance of thermal stability of p-doped CNTs obtained by coordination of TFSI and NFSI anions can be further demonstrated by comparing the temporary changes in electrical conductivity and Seebeck coefficient with those of as-prepared (autoxidized) CNT films. The oxygen molecule in air has been considered an oxidant that induces a relatively stable p-type polarity in CNTs34. However, the observed decrease in electrical conductivity and increase in the Seebeck coefficient (Supplementary Fig. 11) demonstrate that autoxidized CNTs undergo inevitable dedoping under incubation in air because of the desorption of oxygen at high temperature43. Further, the as-prepared CNT films undergo dedoping during temperature-dependent Seebeck coefficient tests as shown in Supplementary Fig. 12a, showing different values (hysteresis) before and after experiencing elevated temperatures, whereas the HNO3-doped and Li-TFSI-treated samples do not show such significant hysteresis (Supplementary Fig. 12b). Therefore, the established anion replacement offers a simple, efficient stabilizing technique of p-doped CNTs.


The dedoping process can be ascribed to the desorption of dopants from the CNT surfaces and the consequent disappearance of hole carriers40. The boiling points of HCl, HNO3, and CH3COOH are −85, 83, and 118 °C, respectively. They possess higher volatilities than H2SO4 (with a boiling point of 337 °C). This low volatility appears to contribute to the good thermal stability of H2SO4-doped CNTs. To verify this contribution, we applied H-TFSI to as-prepared CNTs and examined the doping effect and stability. Despite H-TFSI having a significantly lower boiling point (173 °C) compared to H2SO4, the presence of the TFSI anion on the tube surface enhanced the thermal stability of p-doped CNTs. Therefore, the use of H-TFSI allows for the determination of the dominant contributor (volatility or chemical hardness) to the thermal stability of the CNT complex.

As aforementioned, treatment by H-TFSI induced p-doped states in CNTs with higher stability than HCl-, HNO3-, and CH3COOH-doped CNTs. Elemental analysis (Supplementary Fig. 6a) also suggests that TFSI anions remain in the CNT films after incubation, as evidenced by the minimal change in the F/C and S/C values following heating. Contrastingly, the Cl/C value of the HCl-doped sample (without Li-TFSI-treatment) decreased after heating (Supplementary Fig. 6b). Therefore, the difference in stability among the p-doped materials obtained with different protonic acids is not attributed to the volatility of the acids only. This consideration is further supported by the dedoping properties of the HNO3-doped CNTs at ∼50 °C; the electrical conductivity of HNO3-doped sample decreased for 13% and Seebeck coefficient increased for 21% 2 days after doping, even though the boiling point of HNO3 is relatively high (83 °C). Instead, the energetic stability as a complex involving CNT cations and coordinating anions, contributes significantly to suppress the dedoping process (anion desorption).

The enhanced thermal stability of doped CNT states not only extends the device operational lifetime but also facilitates a better understanding of the physical properties of CNTs. For instance, temperature-dependent electrical properties are often used to provide information on transporting phenomena in conducting materials44,45; however, potentially inaccurate and misleading properties are observed if CNTs are prone to dedoping at elevated temperatures (i.e., dedoping occurring concurrently with the thermal activation of charge carriers). Thus, the developed doping and anion replacement processes enable the reliable evaluation of temperature-dependent properties, with less hysteresis before and after incubations (Supplementary Fig. 12).

In summary, an understanding of the stability of chemically doped CNTs and its enhancement was achieved through complex chemistry. Treatment using protonic acids in moderate conditions induced heavily p-doped states in CNTs without structural damages. The coordination between the soft CNT cation and the applied anions was determined to affect the stability of the p-doped states. Replacing the anions originating from protonic acids with soft counterparts lead to the stabilization of the doped states, which endured high temperatures for extended periods. The ion-replacement process may be extended to oxidants different from protonic acids and even to n-type doping. Overall, these findings represent a significant step toward the development of CNT-based devices and the elucidation of transporting phenomena in doped CNT materials through the enhancement of their thermal stability.


Chemicals and materials

Chemicals and Materials used in this study are listed in Supplementary Tables 3, 4 with their suppliers and purities, all of which were used as received.

Film formation, doping, and anion replacement

Self-standing CNT films for thermoelectric, work function shift, Raman scattering, and EDS characterization were prepared using a method published elsewhere46. In brief, Tuball-CNT powder (∼0.33 mg mL−1) was roughly dispersed in deionized water with Brij L4 nonionic surfactant (1.33 mg mL−1) using an ultrasonic homogenizer (Q500, QSONICA). Self-standing films were fabricated on a polytetrafluoroethylene membrane filter (H020A025A, ADVANTEC) through vacuum filtration. The circular film (∼15 mm in diameter and ∼30 μm in thickness) was detached from the membrane, rinsed with acetone and water, and dried at ∼25 °C in air overnight. CNT thin films for optical absorption characterization were prepared on quartz glass substrates by spray coating for mixed s- and m-SWCNTs (without sorting) or inkjet printing (Pulse Injector with an inkjet nozzle diameter of 25 μm, Cluster Technology) for sorted s- and m-SWCNTs of aqueous dispersions of CNTs. For mixed s- and m-SWCNTs (without sorting), 3 mg of Tuball-CNT powder was ultrasonically dispersed in 15 mL of deionized water containing 20 mg of sodium cholate anionic surfactant. For separated s- and m-SWCNTs, 1 mg of sorted CNT samples were dispersed in 10 mL of deionized water containing 20 mg of Brij L4. After deposition, the CNT thin films were annealed at 350 °C in air overnight (for Tuball-CNT) or 180 °C in vacuo for 2 h (for sorted s- and m-SWCNTs) to remove the residual surfactant. The doping was conducted by immersing the CNT films in 20 mL of dopant solutions for 5 min, and then rinsing by immersion into deionized water for 30 s totally 3 times. The concentrations of protonic acids were 35.0−37.0, 60−61, 99.7, and 64 wt% for HCl, HNO3, CH3COOH, and H2SO4, respectively. For preparing the aqueous HNO3 solutions with different concentrations (Fig. 2b), the 60−61 wt% solution was diluted with deionized water at the specific molar concentrations. H-TFSI was dissolved in deionized water at the concentration of 0.1 M prior to doping. The doped films were dried at ∼25 °C in vacuo for 30 min. Anion replacement was performed by immersing the doped CNT films into an acetone solution of lithium salts (0.1 M) for 5 min, followed by drying at ∼25 °C in vacuo for 30 min.


Thermoelectric, work function shift, Raman scattering, and optical absorption tests were performed in air throughout the measurements. The thickness of self-standing CNT films was measured using a low force measurement system (VL-50, Mitsutoyo). Electrical conductivity was measured by the four-probe method using a resistivity meter (Loresta-GX MCP-T700, Nittoseiko Analytech). For Seebeck measurements, CNT samples were placed between two Peltier devices (VPE20-30S, VICS), and two R-type thermocouples were attached to the film. While providing the temperature difference across the film, temperature difference and potential difference were simultaneously monitored using a data logger (LR8400, HIOKI). Temporary changes in the electrical conductivity and Seebeck coefficient were measured at ∼25 °C after storage at 100 °C in air using an incubator (SU-222, ESPEC). Work function shift was evaluated before and after doping using a Kelvin probe system (KP020, KP Technology). Raman scattering data were collected using a Raman spectroscopy setup (NRS-7100, JASCO). The wavelength of the excitation laser was 532 nm. Absorption spectra were recorded using a UV-vis-NIR spectrometer (V-670, JASCO). SEM observations and EDS measurements were performed under vacuum using commercial systems (JSM-7100 and JED-2300, JEOL).

Computational calculations

All quantum calculations were performed through density functional theory (B3LYP/6-31 G+(d,p) GD3) using the Gaussian 16 package. The total energies (E) and free energies (G) were adjusted for zero-point energy contributions. Anionic chemical hardness was calculated according to Eq. (1) using total energies. Free energies of isolated cations (Gcation) and anions (Ganion), and ion pairs (Gcation/anion) were respectively computed, and ΔG was calculated according to ΔG = Gcation/anion − (Gcation + Ganion). Optimized geometries of ion pairs are shown in Supplementary Fig. 13. Free energy values are listed in Supplementary Table 5.