Hamiltonian learning with real-space impurity tomography in topological moiré superconductors

Extracting Hamiltonian parameters from available experimental data is a challenge in quantum materials. In particular, real-space spectroscopy methods such as scanning tunneling spectroscopy allow probing electronic states with atomic resolution, yet even in those instances extracting the effective Hamiltonian is an open challenge. Here we show that impurity states in modulated systems provide a promising approach to extracting non-trivial Hamiltonian parameters of a quantum material. We show that by combining the real-space spectroscopy of different impurity locations in a moiré topological superconductor, modulations of exchange and superconducting parameters can be inferred via machine learning. We demonstrate our strategy with a physically-inspired harmonic expansion combined with a fully-connected neural network that we benchmark against a conventional convolutional architecture. We show that while both approaches allow extracting exchange modulations, only the former approach allows inferring the features of the superconducting order. Our results demonstrate the potential of machine learning methods to extract Hamiltonian parameters by real-space impurity spectroscopy as local probes of a topological state.


INTRODUCTION
Learning Hamiltonian parameters from experimental data is one of the most critical open problems in order to bring together experiments with theoretical models [1][2][3][4][5][6][7][8].Conventionally, phenomenological models to account for experimental data are developed on a case by case basis.In certain instances, obtaining the Hamiltonian parameters of the model can be done by fitting specific features of the data [9,10].Many-body Hamiltonians with local interactions can be extracted local observables by exploiting time evolution and quantum Hamiltonian tomography, a strategy demonstrated theoretically and experimentally [11][12][13][14][15][16].However, in some instances, no simple fitting procedure nor time-dependent measurements can be performed to extract Hamiltonian parameters.Machine learning methods have risen as a powerful approach to extract subtle features of data, and in particular they have become successful in tackling inverse problems in quantum materials [17][18][19][20][21][22][23][24][25][26][27][28].
Van der Waals heterostructures are a paradigmatic system in which, thanks to their tunability, a variety of quantum Hamiltonians can be emulated [29].Specifically, the capability of combining two-dimensional materials with radically different properties allows engineering systems simultaneously hosting antagonist order [30,31], with the paradigmatic example of van der Waals heterostructures combining 2D magnets and superconductors [32][33][34][35][36]. Beyond the different coexisting orders, van der Waals materials bring a unique feature to heterostructures, the emergence of a moiré pattern [37][38][39][40][41].The moiré pattern stems from the structural modulation in real space due to a twist angle between lattices.Most importantly, the moiré modulation leads to a spatial modulation of all the Hamiltonian parameters.This modulation is the driving force behind a variety of phenomena, including topological and correlated states in van der Waals heterostructures [42][43][44][45][46][47][48][49][50][51][52][53][54].However, extracting the values of these modulations in moiré system is an open problem, as their effect on the electronic structure is greatly challenging to disentangle.Interestingly, the coexistence of a moiré pattern and local impurities opens up a new strategy to infer electronic parameters due to their non-trivial interplay [55][56][57][58][59].
In our manuscript, we put forward a method to extract Hamiltonian parameters of unconventional moiré superconductors using machine learning and impurity engineering.Specifically, we show that thanks to the moiré pattern, local impurities give rise to dramatically different electronic excitations depending on the location of the moiré pattern.This dependency allows us to directly infer moiré modulations via a machine learning algorithm that takes as input excitations for different impurity locations.We demonstrate that our algorithm allows extracting modulation strengths of exchange proximity and superconducting order, two parameters that cannot be directly extracted from a measured local density of states.We further address the robustness of our algorithm to noise, showing that Hamiltonian parameters can be extracted in an experimentally realistic scenario.

Model
We consider an artificial two-dimensional superconductor obtained by combining a two-dimensional ferromagnet and a two-dimensional superconductor [32][33][34] as shown in Fig. 1a.The electronic structure of the heterostructure is modeled with an atomistic Wannier orbital site forming a triangular lattice, where the moiré pattern is incorporated in the modulation of the Hamiltonian parameters [60][61][62][63][64].The full Hamiltonian takes the form with H kin = t ⟨ij⟩,s c † i,s c j,s + µ i c † i,s c i,s with c † n,s ( c n,s ) the creation (annihilation) fermionic operator with spin s in site n.The combination of exchange coupling, Rashba spin-orbit coupling and superconducting proximity gives rise to topological superconducting state when combined on the right footing [32,[65][66][67][68][69][70].We focus on the regime giving rise to topological superconducting states C = 1, 2, 3, which arise when taking the chemical potential crossing the Γ, K, M points, respectively.The hopping is controlled by t, the chemical potential by µ and ⟨i, j⟩ runs over nearest neighbors.The term i,s c j,s ′ is the Rashba spin-orbit coupling arising from mirror symmetry breaking at the interface [71], with σ the spin Pauli matrices, λ R controls the spin-orbit coupling constant and We now focus on the main terms that we will extract with our procedure, the modulated exchange and modulated superconductivity.The exchange coupling is included in a term and the superconducting order by where J(r) and ∆(r) parameterize the exchange coupling and induced s-wave superconductivity.The competition between the exchange field and the superconducting order leads to an induced modulated superconductivity stemming from the originally modulated exchange [72][73][74].We take a modulation parametrized as f (r) = c 0 + c 1 3 n=1 cos(R n q • r) where q is the moiré superlattice wave vector, and R n is the rotation matrix conserving C 3 symmetry.The parameters c 0 , c 1 are defined so that ⟨f (r)⟩ = 0.The spatial profiles J(r) and ∆(r) are written in terms of the previous spatial dependence as J 0 and ∆ 0 parametrize the average magnitude of the modulated exchange and superconducting profiles, whereas δ J and δ ∆ control the amplitude of the moiré modulation.For the sake of concreteness we take J 0 = λ R and ∆ 0 = λ R /2.The relative signs of f (r) in J(r) and ∆(r) are taken so that when the superconducting order is maximum, the exchange is minimum (Fig. 1bc).
Local non-magnetic impurities are included adding a potential scattering term of the form where H imp defines the impurity Hamiltonian at site n with an on-site potential w.We focus on the strong impurity limit in which the site is effectively removed from the low energy manifold taking W = 100t.The full Hamiltonian of the defective system takes the form The impurity gives rise to an in-gap state both in the absence (Fig. 1d) and presence (Fig. 1(e)) of a moiré modulation.It is important to note that, due to the presence of the moiré pattern, the impact of an impurity depends on its location with respect to the moiré modulation.Specifically, as shown in the local density of states of Fig. 2, the interference between the impurity state and the moiré potential gives rise to different patterns depending on the location.This interference fully disappears when δ J and δ ∆ are switched off.We will show that our machine learning algorithm will use the interference between the different locations of impurities to extract the values of the Hamiltonian modulations.
We finally elaborate on the computational procedure to solve this model in the limit of a single impurity in an otherwise pristine system.For this purpose, we will use Green's function embedding method.[75][76][77].The embedding method relies on extracting the Green's function from the Dyson equation of the defective system where G V (ω) is the Green's function of the defective model, H V the Hamiltonian of the defective unit cell, and Σ(ω) the selfenergy induced by the pristine system.The selfenergy Σ(ω) can be obtained from the Dyson equation for the pristine model Σ(ω) = ω − H 0 − G 0 (ω) −1 + i0 + with H 0 the Hamiltonian of the pristine unit cell, where we take the Bloch's representation of the pristine unit cell Green's function The local density of states used as input for our algorithm is obtained as where s and τ are the spin and Nambu indexes.The in-gap state ϵ imp is located using an iterative algorithm in the energy window of the topological superconducting gap.From an experimental point of view, a finite noise of the spectroscopy will be present, and thus the robustness of our algorithm will be important with regards to its experimental implementation.We emulate the impact of noise in the real-space spectroscopy as adding a noise background χ(r) = χ 0 • R(r) to the local density of states (LDOS) ρ(r) where χ 0 is the noise magnitude and R(r) is a random uniform noise distribution defined in the interval (−⟨ρ(r)⟩, ⟨ρ(r)⟩) with ⟨ρ(r)⟩ as mean value of the LDOS.

Machine Learning
The main idea of our real-space impurity tomography is to extract the underlying Hamiltonian by using the LDOS for different impurity positions as inputs as shown in Fig. 1(f).The extraction of the superconducting and exchange modulation is a non-trivial problem without a simple one-to-one correspondence to a single real-space spectroscopy.
We will use a physics-inspired approach to compress the information contained in the LDOS with a harmonic expansion (see Fig. 3(ab)).The coefficients of the power spectrum for each LDOS are then concatenated and fed into a fully-connected neural network (NN) as depicted in Fig. 3(b).The radial expansion works as follows.First, each individual LDOS is centered around the impurity position.Then, the harmonic expansion for the power spectrum is performed as where c ln are the coefficients of the expansion, r α = r α (cos ϕ α , sin ϕ α , 0) the atomic sites taking as the origin the impurity site, and Λ is the typical localization length of the state.[78] In particular, we expand each LDOS into 24 complex c ln coefficients, i.e. the input dimension of the NN is 144 after concatenating the real and imaginary components of the coefficients for three LDOS.We first train a fully-connected NN to perform classification of the Chern number of a given LDOS image which is compressed again into radial functions.The workflow is shown in Fig. 3(a).The NN architecture is shown in Table I.The loss function for this case is the categorical crossentropy loss and a softmax-activation function is used for the output layer.The training consists of 100 epochs, with a batch size of 16.The optimization is performed with the Adam optimizer and a learning rate of 0.001.Afterward, we create a supervised architecture to predict the Hamiltonian parameter of the exchange and superconducting modulation (δ J , δ ∆ ).For this regression task, the architecture of the NN is shown in Table II.We trained the NN for 100 epochs with a batch size of 16.For the optimization of the weights, we are using the stochastic gradient descent algorithm and the Adam optimizer [79] with a learning rate of 0.001.The loss function is the mean squared error (MSE).For the training and testing, we created LDOS for 2000 Hamiltonians for each Chern number where we varied the parameter δ J ∈ [0, 2λ R ] and δ ∆ ∈ [0, λ R ].This results in 6000 samples which we divided into a training set of 5400 and a test set of 600 examples.Finally, we take as a benchmark of our procedure a convolutional neural network (CNN) [80] architecture.We take an analogous workflow as shown in Fig. 3(c), where three LDOS with different impurity positions are fed into the CNN which predicts the modulation of the exchange or superconductivity as a regression task.The architecture of the CNN is shown in Table III, where three CNN networks are concatenated into a fully-connected NN and trained simultaneously with three input LDOS.For the training, we used 50 epochs with a batch size of 16.
It is finally worth noting that our machine learning approach allows us to exploit the spatial resolution of scanning tunneling microscopy.In the case of unconventional superconductors, the non-trivial interference between bound states provides information about the underlying electronic state, information that is often not accessible with other probes.Other approaches to Hamiltonian learning use the energy and entanglement spectra for Hamiltonian inference [81], or employing time-resolved measurements to extract Hamiltonian parameters [7].However, performing those measurements for unconventional superconductors is greatly challenging, whereas the measurements of the local density of states in our impurity tomography approach are standard in scanning probe experiments in two-dimensional superconductors.

Chern number extraction
The first problem we tackle is to determine the Chern number from one or three LDOS with different impurity locations.The measurement of topological invari- ants in topological superconductors is a practical open challenge [82][83][84][85][86][87], as due to their topological nature, local order parameters cannot be defined for these states.The appearance of in-gap modes alone is not enough to assess the topological invariant of a superconductor, as in-gap states can appear in both trivial and topological superconductors [88].Interestingly, the inclusion of a moiré pattern leads to subtle changes in the spatial distribution of in-gap states [55].As we will show below, the fine structure of the in-gap modes allows for extracting the topological invariant of the underlying state.
In the following, we elaborate on the procedure to extract the topological invariant solely from the real-space spectroscopy images of single impurities.The input of the algorithm consists of the real-space spectroscopy for three impurity locations, and its output is the topological invariant.To extract the topological invariant, we trained a NN to perform the classification into the 3 nontrivial Chern numbers.The results are shown in Fig. 4 in the form of confusion matrices for three Fig.4(a,b) and one LDOS Fig. 4(c,d) as input.For one LDOS as input, we achieve an average accuracy of 96.3% for the test data with zero noise (c) and 88.7% with the maximum noise amplitude of χ 0 = 0.4.The confusion matrix shows that C = 1 can be predicted with 100% accuracy in both cases, the NN is only confused in the prediction between C = 2 and C = 3. Taking three real-space spectroscopies with different impurity positions as input, we obtain a testing accuracy of 100% for zero noise (a) and 99.7% for the maximum noise amplitude.This highlights that combining three real-space spectroscopies for different impurity locations substantially increases the accuracy of the topological invariant predictions.These results show, that it is possible to extract the Chern number by just one LDOS with a random impurity position even in the case of very noisy data.

Exchange field extraction
In the following, we show how the real-space impurity tomography allows extracting the values of the moiré Hamiltonian parameters.We start with the modulation of the exchange coupling, which is intuitively the parameter that will impact the real-space spectroscopy in the strongest way.This stems from the fact that the local exchange coupling creates in-gap Yu-Shiba-Rusinov modes inside the original superconducting gap ∆ [32,34,[89][90][91][92][93][94][95], and these modes form the low energy electronic structure leading to a topological superconducting state.As a result, low energy bands reflect the periodicity of the exchange modulation, and their associated in-gap modes in the presence of impurities inherit the same dependence [34,77].
We take as input the real-space spectroscopy for three impurity locations, leading as output the modulation strength of the exchange coupling in the system.We train different architectures for each Chern number, including convolutional neural networks of the full spectroscopy and the harmonic expansion of the impurity states.The results, shown in Fig. 5 demonstrate that real-space spectroscopy of the impurities allows extracting the modulation of the exchange coupling with both procedures.Specifically, it is shown that both convolutional and harmonic expansion obtain a substantial accuracy in the extraction, specifically leading to a typical error of E[δ J ] = 0.01 for the convolutional algorithm and E[δ J ] = 0.0072 for the harmonic expansion.We observe that the harmonic algorithm becomes slightly more accurate than the convolutional method.Interestingly, the difference between both methods becomes much more dramatic in the extraction of superconducting order values and modulations.

Superconducting order extraction
We now move to consider the extraction of the local superconducting order ∆(r) with real-space impurity tomography.It is interesting to note that the impact of modulation of ∆ in the low energy states is expected to be more subtle than the exchange.While the energy location of a Yu-Shiba-Rusinov strongly depends on J, the value of the superconducting gap only leads to proportional renormalization of the energy [88].
We show in Fig. 6 the extraction of the superconducting modulation using the harmonic expansion with supervised learning (Fig. 6(ace)) and the convolutional neural network architecture (Fig. 6(bdf)), for C = 1 (Fig. 6(ab)), C = 2 (Fig. 6(cd)) and C = 3 (Fig. 6(ef)).In the case C = 3 (Fig. 6(ef)), we observe that both architectures are capable of predicting the superconducting modulation.Interestingly, for C = 1 (Fig. 6ab) and C = 2 (Fig. 6cd), the convolutional architecture is incapable of predicting correct superconducting modulations, whereas the fully-connected harmonic expansion successfully predicts it.Typical errors of the NNs are E[δ ∆ ] = 0.30, 0.29, 0.008 for C = 1, 2, 3 for CNN and E[δ ∆ ] = 0.03, 0.024, 0.008 for C = 1, 2, 3 for harmonic expansion with the fully-connected NN.This phenomenology should be contrasted with the exchange modulation, where both architectures showed similar performance.The success of the fully-connected harmonic expansion and failure the CNN architecture demonstrates that the extraction of superconducting modulations represents a much more challenging problem than the exchange modulation.In particular, our harmonic expansion shows that such a physically-motivated procedure allows extracting Hamiltonian parameters stemming from highly subtle changes in the real-space spectroscopy.

Noisy Hamiltonian extraction
In the following, we address the extraction of the Hamiltonian in the presence of noisy data.For the sake of concreteness, we focus on the harmonic fully-connected architecture, as the superconducting modulation can be predicted with that one.We show in Fig. 7 the evolution of the correlation between predictions and true values as a function of increasing noise.We define prediction fidelity as is defined in the interval F ∈ [0, 1], where F = 1 corresponds to the best prediction accuracy δ pred = δ true and F = 0 corresponds to no predictive accuracy.Focusing first on the exchange modulation shown in Fig. 7, we observe that even substantial noise allows to infer the value of its modulation for the Chern numbers.The robustness of the exchange modulation extraction is consistent with the fact that the neural network architecture was capable of providing faithful predictions of the parameter.This resilience to noise stems from the strong dependence of the Yu-Shiba-Rusinov states on the local exchange, which directly impacts the real-space profile of the spectroscopy.The prediction of the superconducting modulation represents however a bigger challenge as shown in Fig. 7.In the cases C = 1, 2 (Fig. 7(abcd), the most challenging ones, we observe that magnitudes of noise around χ 0 = 0.005 break down the predictions.In stark contrast, systems with C = 3 are resilient to levels of noise magnitudes up to χ 0 = 0.2 as shown in Fig. 7(ef).The difference in the robustness between C = 1, 2 and C = 3 can be rationalized by recalling that the convolutional neural network architecture is not capable of providing predictions for C = 1, 2, but it gave reliable predictions for C = 3.Interestingly, despite the superconducting modulation creating a very subtle impact in the real-space spectroscopy, our algorithm is capable of extracting the modulation amplitude from noisy data for different Chern numbers.Finally, we show in Fig. 8 a comparison between the spectroscopies for the pristine data (Fig. 8abc), the noisy data provided as input to our algorithm (Fig. 8def) and the spectroscopy computed with the parameters predicted by the Hamiltonian extraction (Fig. 8ghi).It is observed that the spectroscopy predictions are nearly indistinguishable from the original ones, showing that our algorithm is capable of solving the inverse problem of inferring the Hamiltonian from the spectroscopy.

CONCLUSIONS
To summarize, we have shown that interference effects of in-gap states allow extracting Hamiltonian moiré parameters and topological invariants in an artificial topological superconductor from real-space spectroscopy patterns.Our approach is based on a supervised learning procedure that exploits the patterns obtained in in-gap states for different impurity locations simultaneously.We showed that our technique can be readily implemented with a convolution neural network architecture that combines several impurity locations simultaneously.Furthermore, we showed that by leveraging an orbital expansion of the impurity modes, a more robust machine-learning approach can be developed.Specifically, our procedure using a harmonic expansion is capable of extracting both parameter values and their modulations even in the presence of noise.We demonstrate that the combination of different locations dramatically increases the accuracy of Hamiltonian parameter inference, exemplifying how parameter inference benefits from features that our algorithm extracts from several impurity locations.Our results establish a machine learning methodology that exploits local impurity engineering to extract non-trivial parameters in artificial topological systems.Our demonstration exploits data directly accessible in scanning tunneling microscopy experiments and is robust in the presence of noise, establishing a realistic method to extract Hamiltonian parameters from readily accessible experimental data in complex quantum materials.

FIG. 1 .
FIG. 1. Schematic of the moiré system (a), where panel (b) denotes the modulation of the superconducting and (c) the modulation of the exchange parameters.In the absence of moiré, impurities induced in-gap states in the topological superconducting state (d), which upon the existence of the moiré pattern gives rise to an interference effect (e).Using the spectroscopy of impurities in different locations, a machine learning algorithm extracts the exchange and superconducting profiles (f).

FIG. 2 .
FIG. 2. Local density of states of the in-gap state for a single impurity in a moiré topological superconductor for different impurity locations (a-d).It is observed that depending on the location of the impurity in the moiré, the in-gap states show different interference patterns with the moiré potential.These different interference patterns reflect the underlying modulations of the Hamiltonian, and allow us to extract Hamiltonian modulation from real-space spectroscopy.In the absence of the moiré pattern, all the impurity locations would show the same profile of the in-gap state.
FIG. 3. Schematic of the machine learning workflows.(a) Classification of the Chern number (C = 1, 2, 3) with the radial expansion method and supervised NNs.(b) Hamiltonian learning (regression) of the exchange and superconducting modulation (δJ and δ∆) with a feed-forward neural network and a radial expansion of the three LDOS.(c) Hamiltonian learning of the exchange and superconducting modulation (δJ and δ∆) with convolutional neural networks (CNNs).

FIG. 4 .
FIG. 4. Extraction of the Chern number.Panels (a) and (b) show the prediction accuracy of C=1,2,3 when using three impurity positions as input for the NN for zero noise (a) and the maximum noise amplitude (b).Panels (c) and (d) show the prediction accuracy of C = 1, 2, 3 when using one impurity position as input for the NN for zero noise (c) and the maximum noise amplitude (d).

FIG. 5 .
FIG. 5. Predictions of δJ with a harmonic expansion fullyconnected architecture (a,c,e) compared to the convolutional architecture predictions (b,d,f) for Chern numbers C = 1 (a,b), C = 2 (c,d), and C = 3 (e,f).It is observed that the harmonic expansion fully-connected architecture provides slightly more accurate predictions than the convolutional architecture.

FIG. 6 .
FIG. 6. Predictions of δ∆ with a harmonic fully-connected architecture (a,c,e) compared to a convolutional architecture (b,d,f) for Chern numbers C = 1 (a,b), C = 2 (c,d), and C = 3 (e,f).It is observed that the harmonic fully-connected architecture provides more accurate predictions than the convolutional architecture, in particular for C = 1, 2 where the convolutional architecture fails.

FIG. 7 .
FIG. 7. Analysis of the correlation between the predicted and real values of the exchange and superconducting modulation as a function of the noise level for C = 1 (a,b), C = 2 (c,d), and C = 3 (e,f).Panels (a,c,e) correspond to a larger noise range, whereas (b,d,f) correspond to the low noise limit.It is observed that exchange modulations δJ are more resilient to noise than superconducting modulation predictions δ∆.

FIG. 8 .
FIG. 8. Local density of states of the in-gap state for a single impurity in a moiré superlattice with C = 3 for three different locations for (a)-(c).Panels (d)-(f) show the real-space spectroscopy with χ0 = 0.2 noise amplitude, which is used as input for the machine learning algorithm.Panels (g)-(i) show the real-space spectroscopy associated to the predicted Hamiltonian by the neural network.

TABLE I .
Architecture of the fully-connected NN of the expansion method.Used for the classification of the Chern num-