Hydrogen-induced tunable remanent polarization in a perovskite nickelate

Materials with field-tunable polarization are of broad interest to condensed matter sciences and solid-state device technologies. Here, using hydrogen (H) donor doping, we modify the room temperature metallic phase of a perovskite nickelate NdNiO3 into an insulating phase with both metastable dipolar polarization and space-charge polarization. We then demonstrate transient negative differential capacitance in thin film capacitors. The space-charge polarization caused by long-range movement and trapping of protons dominates when the electric field exceeds the threshold value. First-principles calculations suggest the polarization originates from the polar structure created by H doping. We find that polarization decays within ~1 second which is an interesting temporal regime for neuromorphic computing hardware design, and we implement the transient characteristics in a neural network to demonstrate unsupervised learning. These discoveries open new avenues for designing ferroelectric materials and electrets using light-ion doping.


Main
Since the discovery of spontaneous polarization in Rochelle salt 1 , much effort has been made to design new materials with macroscopic polarization at room temperature.Electrets are materials that have quasi-permanent electric field at their surfaces or electric polarization.Ferroelectric materials as one class of electrets with permanent electric dipole, have been developed into practical devices 2 , such as ferroelectric random-access-memory and actuators 3 .Another class of electrets, space-charge electrets, in which the polarization originates from an imbalance of charge due to charge trapping or injection, offers promising applications in xerography, powder coating, and electrostatic precipitation 4,5 .To date, much effort has been made to design materials exhibiting and enhancing ferroelectric polarization or space-charge polarization.For example, bulk and 2D ferroelectric materials are discovered by exploring structures that break centrosymmetry in the polarization direction 6 .Furthermore, multi-component superlattices are proposed to enhance ferroelectric polarization through interfacial coupling 7 .On the other hand, space-charge electrets with a net electrostatic charge, e.g., ionic electrets, result from injecting electrons or ions on the surface or at deeper sites 5 .Hence, the quest to discover novel materials with spontaneous polarization is an active area of research and the application space is continuously evolving with societal grand challenges.At the same time, it is important to understand the polarization mechanisms and distinguish them from leakage current artifacts that might interfere with the measurements.
Here, using proton doping realized via hydrogen intercalation in NdNiO3 (NNO), as a simple and scalable approach, we demonstrate H-NdNiO3 (H-NNO) thin films with both intrinsic dipolar polarization and space-charge polarization starting from electron-conducting metallic NNO thin films.The hydrogen acts as an electron donor thereby residing as protons in the interstitial sites and the electron is anchored to the Ni-O hybridized states strongly suppressing the conductivity.While the metal-to-insulator transition in NNO resulting from H doping has been studied [8][9][10][11] , to our knowledge there have been no reports yet on the polarization properties.Proton doping can render a polar structure that produces a spontaneous dipole moment within the lattice while greatly suppressing electrical conductivity.The long-range movement of protons and trapping further enables a large space-charge polarization.We find that the polarization is metastable and relaxes within ~1 s, which is an interesting temporal regime to design artificial neurons for neuromorphic computing hardware 12 .Moreover, the observed transient differential negative capacitance demonstrates the existence of switchable polarization in H-NNO.

Characterization of proton doped NdNiO3 thin films
Epitaxial NNO films were grown by sputtering on (001)c-oriented Nb:SrTiO3 (Nb:STO) substrates (subscript "c" denotes cubic structure).After the deposition of Pd electrodes on the NNO film, the sample was annealed at 200 °C in H2/N2 (5/95) atmosphere for 0.5 hours.The thickness of H-NNO measured by X-ray reflectivity is ~148 nm (Fig. S2a).Optical images of the H-NNO-based device shown in Fig. S1a, b reveal that the edge areas around Pd electrodes are heavily doped with protons.The thin films were also characterized by the forward scattering elastic recoil detection analysis (ERDA) as shown in Fig. S1e, which indicates the existence of large numbers of H.To further examine the doping effect on the NNO film, spatially resolved synchrotron X-ray microdiffraction and X-ray absorption measurements were taken while scanning the focused beam across the two Pd electrodes.The map in Fig. 1a was acquired with the X-ray absorption ratio of IA/IB at two energies 853:854.2eV near the Ni L3-edge, which is a suitable proxy to spatially resolve the effect of proton doping on the electronic properties.Fig. 1b shows the normalized Ni L3-edge X-ray absorption spectra (XAS) at different micro-regions illustrated in Fig. 1a and from the pristine NNO film (control sample), which are ascribed to a transition from Ni 2p to 3d states at around 853 eV. 13 As compared with the calculated Ni 3+ spectrum adopted from ref. 14 , the A/B peak feature suggests that the majority of nickel ions in the pristine NNO film are in a Ni 3+ state.As proton doping into NNO films is via catalytic spillover 15 , the region adjacent to the Pd electrodes has a higher concentration of protons than the center area between two electrodes due to the diffusive process, which is clearly illustrated in Fig. S1a and Fig. 1a.From XAS spectra at different regions of the H-NNO film, the spectral weight at peak B gradually decreases as the proton concentration increases.The resemblance of the spectrum at heavily doped region with that of NiO from ref. 16 indicates H doping decreases Ni valence gradually from Ni 3+ to Ni 2+ , which is consistent with literature reports. 17cro X-ray diffraction (µXRD) measurements were performed to probe the structural evolution of Hdoped nickelates (H-NNO) with scans around Nb:STO (002) peak.Micro diffraction  −2 scans with focused X-rays across two Pd electrodes are displayed in Fig. 1c as a function of positions.The representative scans at different positions and for the pristine NNO are shown in Fig. 1d.The µXRD of H-NNO at different regions indicate that the injection of protons shifts the (002)pc peak (defined in a pseudocubic cell) towards a low diffraction angle as the crystal lattice expands along out-of-plane direction (c-axis).The largest peak shift occurs in the edge area around Pd electrodes, indicating the edge area has the highest proton concentration.This feature is more obvious in the x-ray diffraction microscopy (XDM) image (Fig. 1e), where a large area of the sample is mapped based on the intensity at L=1.93, the main peak in H-NNO.

Hydrogen-induced remanent polarization
We first set the framework for studying polarization by using symmetric metal/insulator/metal (MIM) structure shown in Fig. 2a.From the simulation of electric field profile with COSMOL Multiphysics (Fig. 2a), it is seen that most of polarization is induced by out-of-plane electric field due to the small resistivity of 0.003 Ω • cm in the conductive substrate Nb:STO.The electric displacement versus electric field, D-E, hysteresis loops of pristine NNO and H-NNO films are presented in Fig. 2b and Fig. 2c.The elliptical loop for the pristine NNO film (control sample) is the feature of a resistor with the measured resistance of 140 Ω, indicating its metallic phase at room temperature.By proton doping, the shape of D-E loops for H-NNO becomes sloped due to the significantly increased resistance in H-NNO as an insulating phase (resistivity ~ 6x10 8 Ω⋅cm).This is consistent with previous research that proton doping can increase the resistance of perovskite rare-earth nickelates up to several orders of magnitude, such as SmNiO3, 8,9 LaNiO3, 18 and NdNiO3 10,11,15 .When the electric field increases up to a large magnitude, as shown in Fig. S1d the loop becomes more circular as the device is more lossy at higher electric field.No features of ferroelectric saturation are observed by bipolar D-E loops.
To further understand the polarization behavior, a double-wave method (DWM) 19 or PUND measurement was performed by applying a double-triangular waveform voltage (see Fig. 2d inset for the applied waveform).The first positive half-wave 'P' produces a larger remanent displacement at zero applied field than the second positive half-wave 'U'.Similarly, the two negative sweeps produce different remanent displacements as well.The difference between the primary and secondary loops produces PUND loops shown in Fig. 2d inset.In comparison, no remanent polarization is observed in the PUND loop for the pristine NNO (Fig. S2b).As the electric field increases, the remanent polarization  r measured by PUND in H-NNO increases and saturates as shown in Fig. 2e.These characteristics suggest that the remanent polarization originates from intrinsic dipole switching which is the characteristic of ferroelectrics.Interestingly, when the electric field exceeds ~220 kV/cm (see Fig. S3c),  r starts quickly rising again with the electric field.This unconventional  r () behavior at high electric fields can be largely attributed to factors other than intrinsic dipole switching, as discussed below.
To demonstrate the behavior of spontaneous polarization  s with electric field, multiple double-wave measurements were performed with different maximum electric fields and the same field-varying rate (dE/dt), shown in Fig. S3.With the same field-varying rate, the initial part of the primary loops in each measurement is found to coincide well, excluding experimental artifacts shown in Fig. S3b, e.The secondary loops do not overlap in the rising part of each measurement, indicating that non-switching loops are affected by the spontaneous polarization, i.e.,  s from switching loops which can suppress nonremanent displacement.For instance, the effect of spontaneous polarization on electric properties has been observed in many aspects such as electric conduction 20 , and interfacial band structure 21 .We note that due to the suppressed non-switching displacement,  r (or  s ) is overestimated by subtracting the secondary loop from the primary loop.To acquire the accurate relationship between  r and E, the device is modeled with three components in a parallel circuit (Fig. S1c): a spontaneous-polarization-only capacitor causing hysteresis, a parasitic capacitor C, and a nonlinear resistor Rv.Both C and Rv are affected by Pr, i.e., total displacement is,  =  r () +   ( r ) +   ( r ).By deducting the simulated non-remanent displacement, which is detailed in Supplementary Note 1, the extracted Pr(E) is shown in Fig. 2f, red curve.The data in Fig. 2f, plotted in linear scale in the inset, reveal that the modeling method results in the same trend of Pr(E) as the PUND subtraction, but a smaller Pr.When the electric field is less than ~243 kV/cm (local minima of dPr/dE), we observe the 'S'-shaped curve of Pr(E) which is a significant characteristic in ferroelectrics, implying the switching of the proton-involved electric dipole within the lattice.At an electric field larger than 243 kV/cm, the induced Pr follows an exponential relationship with applied electric field.Although many conduction mechanisms exhibit exponential functions with voltage, such as Schottky emission 20,22 , electron hopping conduction 23,24 , in view of the high mobility of protons 25,26 in NNO thin films, here we ascribe the Pr(E) behavior at high electric fields to charge carrier trapping [27][28][29] with an ionic hopping mechanism 23,30 , 31 .In Fig. 2f the black dashed line shows the fit from exponential functions  r =  0 (2  )/( 0 ) exp (−  /(  )) exp (/(2  ) , deduced from the function  =  0 exp (−  /(  ) + /(2  )), where  0 ,  0 is the proportional constant,  is the current density,   is the potential barrier height,  is the charge on the moving ion,   is the Boltzmann constant, T is the temperature, d is the hopping distance.We note that the proton-trapping induced  r can reach up to 158 µC/cm 2 (Fig. S5a), which is unusual by comparing with other charge-trapping induced polarization, for instance, ~4 µC/cm 2 for ZrO2. 32The estimated  r due to the intrinsic dipole switching is around 3.7 µC/cm 2 (Fig. 2f).

Polarization relaxation dynamics in H-NNO thin films
We carried out further studies of the time/frequency dependence of the  r values by PUND loops shown in Fig. S5b for the same 148-nm-thick H-NNO capacitor.The extracted  r as a function of  half , the period for one monopolar wave, is shown in Fig. 2g and exhibits a maximum at 0.15 ms.To investigate the precise relaxation process, we applied double pulses, which are schematically shown in Fig. 2h inset, where ∆ is defined as the difference between the switching and the non-switching displacement.As shown in Fig. 2h and Fig. S6a with normalized ∆, ∆ decreases rapidly following an exponential-law dependence on  relax and down to 20% after ~1 s; furthermore, as shown in Fig. S6a inset, the rate of decay is slower for higher initial values of ∆.Similar polarization relaxation or loss phenomena can be seen in ultrathin ferroelectric BiTiO3 films 33,34 and organic ferroelectric BTA 35 which follows exponential decay.Many ferroelectric materials exhibit polarization relaxations due to the depolarization field.The literature on the polarization relaxation is summarized in Supplementary Note 2.
The relaxation behavior can be well described by a stretched exponential function 35 , ∆( relax ) =  0 exp (− ( relax /)^), where P0 is the initial polarization,  the characteristic relaxation time and  smaller than unity.The fitted parameters are shown in Table S1 where the largest  is 8 ms.Note that such a natural polarization relaxation with millisecond timescale is desirable to emulate the leakyintegrate-fire behavior of neurons for neuromorphic computing. 36e strong polarization relaxation can be related to leakage currents.As shown in Fig. S3, the nonswitching P at zero field accounts for 68% of the total P, which is much larger than that in normal ferroelectrics, such as 6% in organic ferroelectric MBI 37 .The charge owing to the leakage current will neutralize the polarized charge.On the other hand, protons as dopants in the lattice have high mobility 31 , i.e., small energy barrier, which results in small threshold of depolarization field due to incomplete charge screening.The endurance measurements up to ten million cycles on the H-NNO capacitor are shown in Fig. 2i.Polarization does not change significantly after 10 7 cycles which is an encouraging preliminary result.

First principles calculation of the hydrogen-induced polarization
To understand the origin of polarization switching in H-NNO, we performed density-functional-theory (DFT) calculations, with a Hubbard U correction to investigate the non-polar and polar structures and the resulting spontaneous polarization.The details of calculations are given in Methods.The structure was first optimized while accommodating the experimental epitaxial constraint, finding that the structural symmetry in NNO is lowered from Pbnm (space group #62) to P21/m (space group #11) by the epitaxial constraint (Fig. 3a).By adding four H atoms to various combinations of preferential sites to construct several H-NNO cells, lattice parameters a=5.410Å, b = 6.105Å, c = 7.536 Å with a monoclinic angle  = 86°, resulting in a 6.7% increase of the lattice parameter in the epitaxial [001] direction.It is also found that the NiO6 octahedra are, on average, 12% larger than the pristine NNO.This increase in volume stems from the hydrogen-donated electron localizing on the NiO6 octahedra resulting in an enclosed Ni 2+ .S8 show the projected density of states (PDOS).We note that as the donor electrons localize on NiO6 octahedra, there are no hydrogen-like states within 6 eV of the Fermi energy.While the calculated bandgap is always larger than 2.5 eV, we find a variation of ~0.3 eV based on the positions of the hydrogen.The slight differences in the structure and splitting of the peaks in the PDOS, most clearly seen 3-4 eV above the Fermi energy, arise from the local structural differences due to the asymmetric distortion of the NiO6 octahedra around the hydrogen ions.
To investigate the change in polarization as a function of hydrogen positions, a set of structures was constructed in which the atomic positions smoothly evolve, starting from the non-polar structure and visiting the polar structures.The results are summarized in Table 1.The structures "Polar 1 & 6" shown in Fig. 3f, g are the lowest in energy and are nearly degenerate.The change in polarization can be tracked by the movement of the hydrogen ions.This can result in large changes, on the order of a quantum of polarization, when the hydrogen ions are moved across the cell.This is not surprising as the hydrogen ions are quite mobile in similar materials as it exhibits ionic conductivity at higher temperatures. 38

Transient negative differential capacitance (NDC) in H-NNO
To validate the hypothesis of spontaneous polarization in H-NNO and explore potential applications, we have measured the charge switching dynamics in the capacitors.As shown in Fig. 4a inset, square voltage waves are applied to the circuit in which the lossy capacitor is in series with a load resistor of 702 kΩ.The source voltage Vs and the voltage across the capacitor Vf were monitored simultaneously.From Fig. 4b, c, it can be seen that there are two scenarios where the free charge increases (decreases) but the voltage decreases (increases) during the polarization reversal.In Fig. 4c, upon the switching of Vs, the voltage on the capacitor initially rises, then snaps back after which the capacitor resumes a typical charging behavior.
The data are replotted as charge density vs. voltage Vf in Fig. 4d, and the negative slope (

𝑑𝑑𝑑𝑑 𝑑𝑑𝑉𝑉 f
) is identified as differential negative capacitance density shown in Fig. 4d inset.We tested the H-NNO capacitor with different resistors and all exhibited NDC effect (Fig. 4e).We also tested our setup by replacing the H-NNO capacitor with a commercial dielectric capacitor of 529 pF and the results (Fig. S9) indicate that the NDC effect in H-NNO is robust.The physical origin of transient negative differential capacitance is the mismatch in switching rate between the free charge on the metal plate and the bound charge in a ferroelectric (FE) capacitor during the polarization switching 39,40 .The four regions are shown schematically in Fig. 4f, labeled "①" to "④" and are also marked in Fig. 4a, c.When the external positive charges start flowing onto the FE capacitor, the net electric field  �⃗ or electrical potential changes sign.This field consists of two components:  p ����⃗ , created by spontaneous polarization, and  σ ����⃗ , by the surface charge.While  σ ����⃗ changes sign, and  p ����⃗ remains in the same direction as the local field is smaller than the FE coercive field.From the moment ② to ③, the voltage drops quickly, i.e., negative differential capacitance region, as the polarization switching rate is faster than the surface charge supply.When most of the dipoles change the sign, the capacitor resumes normal charging process from ③ to ④.The transient negative differential capacitance phenomenon is evidence of the existence of a switchable spontaneous polarization in H-NNO.

Use case of polarization relaxations in artificial neural networks
Multiple polarization states in ferroelectric capacitors (FeCAP) can be induced by applying voltage pulses of different amplitudes or widths.Such ferroelectric capacitors (FeCAP) are a promising candidate as neuronal devices that can be interfaced with a crossbar array architecture 41 .The transient behavior of our devices enables natural implementation of the leak functionality in neurons.As proof of principle, we measured the potentiation and depression of the polarization in the FeCAP, and designed a neural network hardware-software co-design framework to execute a handwritten digit recognition task on the MNIST dataset.The dataset has 60000 training images and 10000 testing images of handwritten digits from 0 to 9 each having a pixel dimension of 28×28.Following the network structure in ref. 42 , our network comprises of 784 input neurons and 100 excitatory neurons.Each of the input pixels are converted to a Poisson spike train with a pre-defined intensity.The network is operated over 100 timesteps and the output spikes are accumulated in every timestep.The neurons with the highest number of spikes are designated to corresponding recognized classes.The network is equipped with lateral inhibition (winning neuron inhibits other neurons in the network), homeostasis (threshold adjustment such that it becomes more difficult to fire for an over-excited neuron) and Spike-Timing-Dependent Plasticity (STDP) mechanisms 42 .Experimental measurements of our FeCAP devices show an exponential relation between change in polarization (∆P) and applied voltage (Fig. 5a).Necessary hyperparameters for the network are tabulated in Table S2.Based on the experimental measurements, we calibrated our neural network framework where each input to the neuron, analogous to the applied electric field, aggregates exponentially to the corresponding membrane potential which is analogous to the change in polarization.
The membrane potential integration equation is as follows, Where, τ represents the decay rate of membrane potential (polarization) and  1 ,  2 are fitting constants.
The relaxation in polarization is critical to implement the leak functionality in spiking neurons which has been shown to enable robustness and better generalization in brain-inspired algorithm design 43 .Fig. 5b shows the learned weight map of the 100 excitatory neurons in the network with a training accuracy of 83.59% and inference accuracy of 83% on the MNIST test images.Moreover, for 400 neurons, the training and inference accuracies are 90.64% and 89% respectively for 2 repeated representations of the training images.The results for different numbers of neurons are comparable to ideal software accuracies reported in ref. 42 demonstrating potential relevance to design of neural network hardware.

Conclusions
In summary, we report the discovery of tunable and switchable polarization in a perovskite nickelate due to proton doping.Proton doping not only induces a metal-to-insulator transition but also results in a tunable polarization.The relaxations in polarization behavior can be used for design of neural hardware components.The results open avenues for a new knob -namely light-ion doping -in creating polarization properties not seen in parent compounds.Since several oxides also possess magnetic ordering, the study here provides an interesting route to explore discovery of new multiferroic materials, paving the way for devices with simultaneous electrical and magnetic functions.Further, the proton doping techniques presented here can be readily extended to other material families to examine the resulting polarization behavior.

Synthesis of NdNiO3 and H-NdNiO3 films
The NNO-based devices studied here consist of a ~150-nm-thick NNO film epitaxially grown with a highvacuum sputtering system on (001)-oriented conductive Nb:SrTiO3 substrate (Nb doping concentration is 0.5 wt% and the resistivity is 0.003 Ω • cm).The NNO films were deposited by sputtering a NNO ceramic target with radio frequency power at 150 W at room temperature.During the deposition, 10 mTorr pressure of Ar/O2 mixture at 4:1 ratio was used.After the deposition, the film was annealed at 500 °C for 24 h in an ambient atmosphere.Pd electrodes with 50-nm thickness and 150-µm radius were sputtered with a shadow mask onto the NNO film.Pd electrodes serve as a catalyst to incorporate H in the NNO film during annealing for 30 min at 200 °C in the flowing H2/Ar (5%/95%) gas mixture.

Electrical measurements
The P-E loops and PUND loops were measured with the Ferroelectric Tester (Precision Premier II, Radiant Technologies).For low-temperature measurements from 20 to 300 K, the top Pd electrodes were connected using Ag paint and Ag wires and a cryostat (Sumitomo Cryogenics) was used.Resistance was determined by measuring current at 0.1 V, 100 ms pulse.To investigate the NDC transients, voltage pulses created by an arbitrary function generator (Tektronix AFG31000 Series) were applied to a series connection of a resistor and the H-NNO capacitor.Voltage transients of the applied pulses and the voltage over the H-NNO capacitor were acquired using an oscilloscope (Tektronix DSOX4154A).All measurements were carried out at room temperature if not explicitly stated.

Electrical Simulation using COMSOL
The 2D cross section of the H-NNO device has been simulated with the Electrostatics module of COMSOL Multiphysics.The circular Pd electrode has a radius of 150 µm, thickness of 0.05 µm, and the gap size between the two electrodes is 200 µm.The voltage between the two electrodes is 5 V.The H-NNO film has a thickness of 0.15 µm while the Nb: STO layer is 1 µm.Due to the limitation of the computation capability, the bottom Nb:STO layer has been attached to a floating potential boundary condition to mimic a 1000 µm thick Nb:STO layer.The overall size of the simulated cross section has a height of 1.2 µm and a length of 1200 µm and is contained in an air box of size 2.2 µm by 1400 µm.

First-principles calculations of H-NNO
Our first principle DFT + U calculations were carried out using the Perdew-Burke-Enzerhof (PBE) functional 44 as implemented in VASP 45,46 with an energy cutoff of 520 eV and the Nd_3, Ni_pv, O, and H projector augmented wave (PAW) 47 potentials provided with the VASP package.The Nd_3 PAW potential freezes the f-electrons in the core.We include a Hubbard U (within the rotationally invariant method of Liechtenstein et al. 48) with U=4.6 eV and J=0.6 eV following our previous work 49 .All structural relaxations are carried out with Gaussian smearing with = 0.1 eV and a Monkhorst-Pack k-mesh of 6x6x4 such that the forces were less than 0.005eV/Å.The density-of-states calculations are performed using the tetrahedral method with Blöchl corrections 50 .The projected density-of-states (PDOS) plots are generated using a -centered k-point mesh and the site-projected scheme of pymatgen 51 .The polarization is calculated using the Berry phase method, as implemented in VASP 52 .To ensure that the same branch was used in the polarization calculations, the calculated polarization is tracked over a linearly interpolated path starting from a non-polar structure.We use a 20-atom unit cell of NNO to accommodate the a -a -c + tilt pattern of the Pbnm structure.As NNO is either paramagnetic or antiferromagnetic in the temperature range studied here, we do not study ferromagnetic ordering.We choose a G-type antiferromagnetic (AFM) ordering in our spin-polarized DFT calculations as previous work has shown that while the type of AFM ordering affects the bandwidth, it does not affect electron localization with electron doping 49 .To study H-NNO, we add 4 H atoms to the 20-atom cell and relax the cell according to the epitaxial constraint of the experimental set-up using the strained-bulk method 53 .
X-ray absorption spectroscopy and X-ray photoemission electron microscopy XAS, XPEEM measurements have been performed at the XPEEM/LEEM endstation of the Electron Spectro-Microscopy beamline (ESM, 21-ID) at the National Synchrotron Light Source II.XAS measurements were performed in a partial yield mode collecting the secondary electrons, with the 2eV energy analyzer slit centered over the maximum of the secondary electron emission peak.Pixel-wise XAS was obtained by recording a series of XPEEM images at each energy in each absorption edge range at sequential increments of 0.2 eV.Local XAS spectra can be extracted by plotting the intensity of a given spatial region (set of pixels) at each energy.For example, for Ni L-edge, 152 XPEEM images were acquired from a photon energy range of 850 eV-880.2eV.

X-ray reflectivity and synchrotron X-ray microdiffraction measurements
Synchrotron XRR and X-ray microdiffraction measurements of the H-NNO samples were carried out on a five-circle diffractometer with χ -circle geometry (in which the sample can be rotated around the center of the diffractometer), using an X-ray energy of 10 keV (wavelength λ = 1.2398Å) at beamline 12-ID-D of the Advanced Photon Source of Argonne National Laboratory.The X-ray beam is optically focused by a APS developed 3D-printed polymer compound refractive lens onto the electrode patterned sample.The focused X-ray beam profile is 1.3  m (vertical) by 1.8  m (horizontal) so it can probe the positiondependent lattice structure due to protonation distribution across the Pd-Pd electrode gap patterned on the NdNiO3 sample.The actual X-ray footprint onto the sample is enlarged a few times along the X-ray beam direction due to the angle of incidence.The lateral resolution to differentiate position-dependent lattice structure across the gap is defined by the X-ray beam horizontal profile.A high-resolution small pixel EigerX 500K area detector (75 m pixel size) was used to acquire the microdiffracted X-ray beam from the sample.The diffraction signals were integrated by using a selected region of interest of the 2D area detector images.We first used a larger range 2D mesh scan to map out the electrode gap area of interest.And then we performed a series of XRD scans along a line-cut across the electrode gap to obtain position-dependent lattice structures.

Elastic recoil detection analysis
A 2.3 MeV He 2+ ion beam of diameter 2 mm in a 1.7 MV IonexTandetron accelerator was used to probe the hydrogen concentration.The beam was oriented with a scattering angle of 163° and an ERDA detector was utilized to record the arrival of H atoms ejected from the sample through elastic collisions.Only forward-scattered H ions were able to penetrate the detector.The probe depth of ERDA is approximately 1 μm.

Fig
Fig 3b,c,d and Fig.S8show the projected density of states (PDOS).We note that as the donor electrons localize on NiO6 octahedra, there are no hydrogen-like states within 6 eV of the Fermi energy.While the calculated bandgap is always larger than 2.5 eV, we find a variation of ~0.3 eV based on the positions of the hydrogen.The slight differences in the structure and splitting of the peaks in the PDOS, most clearly seen 3-4 eV above the Fermi energy, arise from the local structural differences due to the asymmetric distortion of the NiO6 octahedra around the hydrogen ions.