Introduction

High Entropy Alloys (HEAs), which are alloys comprising four or more elements1,2,3, have received great interest due to their exceptional mechanical properties4,5,6,7,8,9,10 and thermal properties11,12,13,14 under extreme conditions (high temperature and pressure). Researchers have made intense efforts to reveal the underlying mechanisms governing the unique properties, such as lattice distortion15,16, phase transitions17 and solid solution strengthening18, and more importantly, the dominant effect of atomic configurations (i.e., cocktail effect) has become a wide consensus14,19,20. HEAs usually possess a simple phase constitution, and various types of constituent atoms are randomly distributed at the crystallographic lattice sites21. The chemical complexity and component tunability make it possible for HEAs to obtain optimal properties. While traditional alloy development, including more than two atoms, is mostly located at the corner of the phase diagram14, the large area or volume of the phase space near the center of the diagram, which points to the higher entropy systems, is what studying HEAs needs to explore (Fig. 1a).

Fig. 1: Overview of HEA optimization.
figure 1

a Schematic phase diagrams of ternary and quaternary alloy systems. The development of traditional alloys is mainly in the corner regions (yellow regions), while the HEA expands toward the center space of the phase diagram (high-entropy (blue) regions); b Binary embedding for lattice configurations. A 2D M × N binary matrix xM×N is used to represent the cell with M types of elements and N atomic sites. For example, xij = 1 means the i-th element will occupy the j-th site.

Computational simulations, such as density functional theory (DFT)22,23,24 and molecular dynamics (MD) simulations25,26, are widely used to simulate and predict the properties of HEAs. However, due to the high computational cost, using DFT calculations to explore large numbers of atomic configurations of HEA is challenging22. MD simulations, although they can benefit from the development of machine learning potentials (MLPs) to greatly improve efficiency while maintaining DFT accuracy27,28,29,30, still require sampling methods (i.e., Monte Carlo, MC) to explore the phase space of HEAs31,32, which does not guarantee the finding of the ground state. Therefore, existing simulation methods are difficult to complete the high-dimensional search and global optimization for HEA configurations.

Quantum algorithms, especially quantum annealing (QA), have become an emerging strategy for solving practical optimization problems due to their excellent performance33,34,35,36,37,38. QA is a quantum analog of classical simulated annealing, which exploits the quantum tunneling effect to help explore low-energy solutions and ultimately return the ground state of the corresponding quantum system39,40. Compared with quantum algorithms based on universal gate-based quantum hardware in the noisy intermediate-scale quantum (NISQ) era41, QA have become a viable tool for practically solving discrete optimization problems in material science domain42,43. Kitai et al.44, Guo et al.45 and Kim et al.46,47 utilized QA and factorization machine (FM) for designing planar multilayer (PML) and diodes for optical applications. Their algorithms delivered superior optimization speed and precision compared to classical algorithms and hardware. Hatakeyama-Sato et al.48 introduced a quantum physics-inspired annealing machine to tackle the challenge of large search space for material discovery, achieving at least 104 times faster speeds than conventional approaches. For the HEA optimization problems, QA may be leveraged for its quantum advantage to address the challenges posed by the extremely large search space of HEA configurations and find the global minimum.

In this work, we propose a QA-assisted lattice optimization (QALO) algorithm and demonstrate it on HEA configuration optimization. The algorithm is developed based on the active learning framework, in which the field-aware factorization machine (FFM) is trained with data from DFT calculations (and MLP labeling in the following iterations) for converting the lattice configuration optimization problems into quadratic unconstrained binary optimization (QUBO) problems and then solved by a quantum annealer. The algorithm is applied to optimize the bulk lattice configuration of the refractory body-centered cubic (bcc) NbMoTaW alloy system. Our algorithm can quickly obtain optimized structures of the quaternary HEA, and the results successfully reproduce the Nb depletion and W enrichment phenomena in the bulk phase driven by thermodynamics, which are usually observed in experiments and MC/MD simulations. The mechanical properties of the optimized configurations are then calculated and compared with randomly generated alloys. The proposed algorithm may provide a powerful tool for designing and discovering new alloy materials with high stability and exceptional properties.

Results

QUBO representation for lattice optimization problem

All the problems that can be solved by the state-of-the-art QA algorithm need to be formulated as an Ising model or, equivalently, a QUBO model (the details of QA and QUBO problems are in the Methods section). Therefore, mapping the target optimization problem to the QUBO problem as accurately as possible is the prerequisite for the effective use of QA. For the lattice optimization problems, the general process of obtaining a reliable QUBO mapping is to (1) establish a binary representation for lattice configuration and (2) establish a QUBO-like “feature-label” relationship that can accurately represent the properties of interest as the functions of configurations.

For a HEA system, M types of atoms are randomly distributed at N sites in the 3D lattice for a certain composition. The number and coordinates of sites are pre-defined by the space group of the HEA, and therefore, the configuration of an HEA lattice can be modeled by a discrete approximation. In this approximation, the sites in the 3D lattice are assigned with N indices, and a binary variable x with M × N dimensions can represent the occupation status for all the sites in the lattice. For example, xij = 1 represents an atom of type i occupying site j (as Fig. 1b shows). The solution to this discretization of configuration representation might not provide the true global optimum as it does not consider lattice distortion, but its solution can serve as the initial structure for further lattice relaxation49. For selected systems, we performed additional relaxations before calculating their mechanical properties (see the Method section for details).

The thermodynamic stability of an alloy at a given temperature and pressure results from the Gibbs free energy of mixing14,50,51. Therefore, the target of the HEA lattice optimization is to optimize the Gibbs free energy of the lattice, which includes the enthalpy and the entropy components, ΔGmix = ΔHmix – T∙ΔSconf. Within the binary regular solution model52, the mixing enthalpy ΔHmix of a HEA lattice can be defined as a linear combination of the pair interactions among the constituent elements:

$$\Delta {H}_{{mix}}=\sum _{i}\sum _{j > i}{\Omega }_{{ij}}{c}_{i}{c}_{j}$$
(1)

in which ci and cj represents the fraction of elements i and j, and Ωij is the pair interaction between i and j. The binary interaction is obtained from the enthalpy of mixing of the binary system as

$${\Omega }_{{ij}}=4\Delta {H}_{{ij}}=4\left[{E}_{{ij}}-\frac{1}{2}\left({E}_{i}+{E}_{j}\right)\right]$$
(2)

Where ΔHij is the mixing enthalpy of the binary system made of element i and j, Eij is the ensemble average of the lattice energy of the binary system represented by the special quasirandom structure (SQS)51 composed of element i and j, and Ei is the lattice energy of the reference unary system containing element i in the same lattice structure. As we do not consider lattice distortion of the lattice, the energies of the reference unary systems are constants in Eq. (2), and thus the mixing enthalpy of the alloy expressed by Eq. (1) depends only on ci, cj and Eij. Therefore, the minimization of ΔHmix can be achieved by minimizing the lattice energy. Then, we establish a lattice energy model that can be mapped into a QUBO problem for QA optimization by employing the widely used cluster expansion (CE) method53,54,55. For versatility and simplicity when applying CE to HEA systems, the effective pair interaction (EPI) model is used56. We can convert the EPI model into the Ising model, so it is compatible with QA. The effective energy at lattice site j can be expressed as57:

$$E\left(j\right)={J}_{0}+\sum _{l\ne j}{J}^{X\left(j\right)Y\left(l\right)}{c}_{l}$$
(3)

where JX(j)Y(l) is the pair-wise interatomic potential between element X and Y at sites j and l, respectively, cl is the occupation parameter of site l, and J0 is the concentration-dependent part. Summing up the energy over all the N atomic sites yields the total energy of the lattice:

$$E\left(\sigma \right)=N{J}_{0}+N\sum _{X,\,Y}{J}^{{XY}}{\sigma }^{{XY}}$$
(4)

where σXY is the percentage of XY pairs in the system. Combining the previously defined binary representation of lattice configurations with an explicit expression for the pair interaction energy Uijkl, the energy of the lattice can be written as:

$$E=\sum _{i,\,j,\,k,\,l}{U}_{{ijkl}}{x}_{{ij}}{x}_{{kl}}$$
(5)

where the quadratic term Uijkl xij xkl represents the contribution to the total energy when the atom of type i and atom of type k occupy sites j and l, respectively.

The configurational entropy ΔSconf is described by the Boltzmann’s entropy formula58,59,60:

$${\Delta S}_{{conf}}=-R\mathop{\sum }\limits_{i=1}^{n}{X}_{i}\,{\mathrm{ln}}\,{X}_{i}$$
(6)

where Xi represents the mole fraction of the atom and R is the ideal gas constant. For HEA systems, configurational entropy is a compositional property that assumes that atoms are randomly distributed on the lattice points and is maximum when the alloy composition is equiatomic61 (i.e., the proportion of each element is equal). Therefore, configurational entropy can be considered as an additional constraint on the alloy composition to control the optimized structure to always be in the high entropy region in the middle of the phase diagram (as shown in Fig. 1a). Applying the proposed binary representation for a N-site lattice of M elements, Eq. (6) can be rewritten as

$${\Delta S}_{{conf}}=-R\mathop{\sum }\limits_{i=1}^{M}\frac{1}{N}\mathop{\sum }\limits_{j=1}^{N}{x}_{{ij}}\,{\mathrm{ln}}\left(\frac{1}{N}\mathop{\sum }\limits_{j=1}^{N}{x}_{{ij}}\right)$$
(7)

For the HEA system with M elements, the maximum entropy is obtained at equiatomic distribution (Xi = M-1), and the polynomial approximation of Eq. (7) around M-1 is

$$\begin{array}{l}{\Delta S}_{{conf}}\approx -R\mathop{\sum }\limits_{i=1}^{M}\left(\frac{1}{M}{\mathrm{ln}}\frac{1}{M}+\left(1+{\mathrm{ln}}\frac{1}{M}\right)\cdot \left(\frac{1}{N}\mathop{\sum }\limits_{j=1}^{N}{x}_{{ij}}-\frac{1}{M}\right)\right.\\\qquad\qquad\left.+\frac{M}{2}\cdot {\left(\frac{1}{N}\mathop{\sum }\limits_{j=1}^{N}{x}_{{ij}}-\frac{1}{M}\right)}^{2}\right)\end{array}$$
(8)

which also has a second-order form that can be used to construct a QUBO-like formula together with the energy in Eq. (5). Therefore, the objective function for the HEA optimization can be constructed by the energy term in Eq. (5) and entropy term in Eq. (8).

In addition, there are physical constraints that need to be applied to the objective function. The constraint in Eq. (9) is the assignment constraint to ensure that each type of atom can only occupy a certain number of sites, which is determined by the composition. The constraint in Eq. (10) ensures that at most one atom occupies each lattice site. The constraint in Eq. (11) applies extra physical constraints, such as periodic boundary conditions, where f(i,j) is the constraint function for xij on the boundary.

$$\mathop{\sum }\limits_{j=1}^{N}{x}_{{ij}}={c}_{i}$$
(9)
$$\mathop{\sum }\limits_{i=1}^{M}{x}_{{ij}}=1$$
(10)
$${x}_{{ij}}^{b}=f\left(i,\,j\right)$$
(11)

With the energy and entropy in Eqs. (5) and (8), and incorporating all physical constraints from Eq. (9) ~ (11), the QUBO formulation of the Hamiltonian (hQUBO) to be minimized for lattice optimization problem can be written as:

$$\begin{array}{l}{\mathscr{H}}=\mathop{\sum }\limits_{i}^{M}\mathop{\sum }\limits_{j}^{N}\mathop{\sum }\limits_{k}^{M}\mathop{\sum }\limits_{l}^{N}{U}_{{ijkl}}{x}_{{ij}}{x}_{{kl}}-{TR}\mathop{\sum }\limits_{i}^{N}\left(\frac{1}{M}\mathrm{ln}\frac{1}{M}+\left(1+{\mathrm{ln}}\frac{1}{M}\right)\,\cdot\, \left(\frac{1}{N}\mathop{\sum }\limits_{j=1}^{N}{x}_{{ij}}-\frac{1}{M}\right)\right.\\\qquad\qquad\left.+\frac{M}{2}\,\cdot\, {\left(\frac{1}{N}\mathop{\sum }\limits_{j=1}^{N}{x}_{{ij}}-\frac{1}{M}\right)}^{2}\right)+{\lambda }_{1}\mathop{\sum }\limits_{i}^{M}{(\mathop{\sum }\limits_{j}^{N}{x}_{{ij}}-{c}_{i})}^{2}\\\qquad\qquad+{\lambda }_{2}\mathop{\sum }\limits_{j}^{N}(\mathop{\sum }\limits_{i}^{M}{x}_{{ij}}(\mathop{\sum }\limits_{k}^{M}{x}_{{kj}}-1))+{\lambda }_{3}\mathop{\sum }\limits_{j}^{N}\mathop{\sum }\limits_{i}^{M}{\left({x}_{{ij}}-f\left(i,j\right)\right)}^{2}\end{array}$$
(12)

where λi are the weighing factors for the i-th constraint, which are usually much larger than Uijkl to enforce the constraints.

The construction of the hQUBO shown in Eq. (12) requires the knowledge of interaction coefficients Uijkl in the EPI model. Factorization machine (FM), introduced by Rendle et al.62, is a regression model designed for learning sparse feature interactions. Due to the consistency in mathematical form, the 2nd-order FM is often employed as the surrogate model for mapping the original problems to the QUBO formulation63. By training a 2nd-order FM regression model using DFT-calculated energy data and retrieving linear coefficients and interacting coefficients, we can obtain the coefficient Uijkl and construct the EPI energy model shown in Eq. (5), and then use entropy in Eq. (8) and constraints to construct the QUBO model in Eq. (12). In the meantime, based on physical intuition, atomic pairs in the lattice at different sites will show unique interaction behaviors, so FFM is selected as the advanced version of FM to accurately capture different pair interactions by assigning each of the N sites in the lattice to an individual field (See the Methods section for detailed discussion on the FM and FFM).

QALO algorithm

The QALO algorithm is developed based on the active learning framework integrating FFM, QA and MLP in an iterative loop for the proper QUBO mapping of the target optimization problem, solving the QUBO and new data production, respectively (Fig. 2). The initial data pool for the active learning is constructed with randomly generated alloy configurations and their energies calculated using DFT (see Methods section for the details of DFT calculations). An ensemble random sampling strategy57 is used to generate initial random configurations, which means several different supercell sizes are considered simultaneously to provide diverse degrees of atomic disorder in the dataset. Large supercells can better capture long-range order, while small supercells help capture short-range order and preserve low computational cost. Both are important in HEAs, which are important factors affecting the mechanical properties of alloys. Therefore, including different supercell sizes in the dataset helps to establish a more comprehensive Hamiltonian by the surrogate model14,64. With the iterations going on, new data points from each QALO loop will be added to the dataset. To maintain the representativeness of the data pool for different degrees of disorders by preventing the algorithm from keeping adding new data of the same supercell size, randomly generated configurations of other sizes that different from the designing target and their energies calculated by MLP are also added to the data pool.

Fig. 2: The schematic of the active machine learning scheme of the QALO algorithm.
figure 2

The details of FFM, QA and ML potential are in the Methods section. The QA module is executed on the D-Wave quantum annealer, and other modules are on the classical computer.

The FFM model, which serves as a surrogate mode for mapping the original optimization problem to the QUBO form, is trained on a sub-dataset randomly sampled from the whole data pool. The FFM models in this work are implemented in the open-source package “xLearn”65. For each training, 70% of the data points are randomly sampled from the data pool and split into the training set, validation set, and test set with a ratio of 8:1:1. After the FFM model is trained, the QUBO model is constructed according to the discussion in the last section. QA is then used to solve the hQUBO to find the ground state. Comparing with classical algorithms, the usage of QA can greatly accelerate the optimization for the high dimensional problems. In this work, we use the hybrid QA (HQA, powered by the hybrid partitioning algorithm66) to address the challenge of high dimensional optimization (see Methods section for the details). The MLP is then used to calculate the energy for this QA-predicted configuration without computationally expensive DFT calculations. The MLP used in this work is the spectral neighbor analysis potential (SNAP)67 and is trained with the entire data pool (see Methods section for the details of SNAP model and the training of MLP). Since the MLP usually has high accuracy and strong interpolation ability, the re-training of the MLP is not necessary in each iteration but is only needed when the root mean squared error (RMSE) of energy on the small test set (randomly sampled from the data pool) is larger than a pre-set threshold (RMSE > 1.0 eV in this work).

The optimization for the HEA lattice should not be limited to obtaining the most stable atomic arrangement but also includes obtaining the optimal composition in the alloy system. The assignment constraint in Eq. (9) ensures that atoms of each type strictly occupy a certain number of sites that are determined by the corresponding composition ci. Therefore, the solution of the hQUBO constructed with the assignment constraint will just be the optimal atomic arrangement under a given elemental composition. However, if the assignment constraint is relaxed during the construction of the hQUBO, the solutions obtained from QA module will have the possibility to break the constraint and move to a different elemental composition. This can lead to the optimization toward better composition. Figure 3 shows how the QA module in the QALO algorithm is designed. As mentioned above, the optimization for composition is realized by a relatively loose constraint, while the optimization for atomic arrangement is realized by a tight constraint. In the QA module, the hybrid quantum annealer will be called multiple times in a serial way and return the solution sets of a series of hQUBOs (as depicted by Si in Fig. 3, each solution set contains all the solutions from multiple QA shots for the same hQUBO) whose assignment constraints are adjusted from loose to tight by the exponential increase of the weighting factor λ1 (as Eq. (13) shows, where r is the increasing rate of constraint weighting factors, λmax is the maximum weighting factor in the loose-to-tight QA deployment, λi is the weighting factor in the i-th HQA run, and n is the total number of HQA calls in one QA module). The optimal composition obtained from the previous solution will be applied to the assignment constraint of the following hQUBO, so that both atomic arrangement and composition can be optimized simultaneously within a single QALO iteration.

$${\lambda }_{1}^{i}={\lambda }_{1}^{max }\times {r}^{1-\frac{i}{n}}$$
(13)
Fig. 3: The deployment strategy of QA in QALO.
figure 3

For each calling of QA, the EPI energy model obtained from FFM coefficients, and the initial composition of the current iteration are passed to the QA module. Then, a series of hQUBO i is constructed based on the EPI energy model with different assignment constraints from loose to tight. D-Wave quantum annealer will return optimal configurations Si for the current hQUBO and pass the composition information of the optimal solution to the next hQUBO construction. Finally, the QA module returns both optimal elemental composition and atomic configurations.

Optimization of NbMoTaW HEA lattice

The established QALO algorithm is then used to optimize the bulk lattice configuration of the refractory NbMoTaW alloy system. The refractory bcc NbMoTaW exhibits outstanding high-temperature mechanical strength6,10, and one of the major limitation is the brittleness, exhibiting limited room-temperature compressive strain32,68,69. Therefore, studying the relationship between the configuration of NbMoTaW and its mechanical property can help improve alloys with better performance, especially the microscopic atomic arrangement is directly related to short-range orders (SROs), which also determines the stability of lattice structure19.

As mentioned in the last section, an ensemble random sampling strategy is used to randomly generate configurations with different supercell sizes using DFT calculations for the initial data pool. Table 1 shows the sampling method used in this work. Four different supercell sizes (2 × 2 × 2, 4 × 2 × 2, 4 × 4 × 2 and 4 × 4 × 4) are used, and 200 different configurations for each size are randomly drawn. Our target lattice for optimization is 8 × 8 × 8 supercells to minimize artifacts due to the finite size effect70. During the active learning iterations, as new data for the 8 × 8 × 8 supercell will be continuously added to the data pool, random configurations of the other sizes will be randomly generated and added to the data pool after each iteration to maintain their representativeness in the entire data pool.

Table 1 Ensemble random sampling for NbMoTaW configurations

Before starting the active learning iterations, we trained the FFM and SNAP-MLP with a sub-dataset (400 data points randomly sampled from the initial data pool) for benchmark testing of the two surrogate models. Figure 4 shows the parity plots for FFM and SNAP-MLP models on the training set and a test set (40 data points from the initial data pool not seen in the training). For comparison, the energy values are normalized according to the supercell sizes. It can be seen that FFM can work well on both training set and test set, showing its good performance on describing the energy landscape and interpolation. MLP shows the accuracy comparable to DFT ground truth and higher accuracy than FFM on both the training set and the test set. Therefore, using the active learning strategy to continuously increase the capacity and representativeness of the database to improve the accuracy of FFM is necessary for the high-quality mapping of the original problem to the QUBO form, while the re-training of MLP does not need to be performed frequently due to its high accuracy, by which we can reduce the computational cost for the algorithm.

Fig. 4: Parity plots of FFM and SNAP-MLP models against DFT calculated energy on the training set and test set.
figure 4

(a) Parity plot of FFM model. (b) Parity plot of SNAP-MLP model.

QALO is then used to optimize the configuration of the NbMoTaW lattice. The initial composition for the optimization is set to be equiatomic quantities, i.e., 25% for each of the Nb, Mo, W, and Ta species. The hyperparameters and setups for each module are listed in Table 2. Figure 5a shows the evolution of the Hamiltonian in 700 QALO iterations, within which the energy of the system converges. At the beginning of the optimization, the active learning continuously produces configurations with better atomic arrangements under the equiatomic composition, resulting in a slight but gradual decrease in the lattice total energy. However, after a few cycles, the QALO algorithm starts to explore the phase space under the guidance of the HQA and the loose constraint in hQUBO, leading to the update on the composition ratios of the four elements. Concurrently, the energy of the solution exhibits a precipitous drop after the update of the composition. Such dual modes of energy evolution alternately appear in the subsequent optimization process. Finally, the composition of the four elements tends to converge, and the optimizations further focus on the atomic arrangements. Figure 5b shows the composition evolution during the iterations. Clear depletion of Nb and enrichment of W can be observed during the optimization, and the composition converges to Nb 18.0%, Mo 23.6%, Ta 26.5% and W 31.9%, which are similar to the observations of Li et al.32 on the bulk grain phase (Nb, 15.5%, Mo 24.6%, Ta 28.0% and W 31.9%), where the Nb depletion and W enrichment driven by thermodynamics were simulated by MC/MD simulations. In the real alloy synthesis, the heat treatments that stabilize the alloy’s microstructure, such as annealing or homogenization, are also driven by the thermodynamics, but they are not considered in the present work71.

Table 2 Hyperparameters and setup for different modules in the QALO optimization simulation
Fig. 5: The evolution of results in 700 QALO iterations.
figure 5

a Hamiltonian ( = E – TS) evolution and (b) composition evolution.

The configuration of HEA systems can be characterized by the partial radial pair correlation functions (RDF)32,72. Figure 6 shows the partial RDF for the optimized structure. The RDF curves reveal that the pair correlations between elements from different groups, such as Mo-Ta, Ta-W, and Nb-Mo, are significantly stronger than those between elements within the same group, such as Nb-Ta and Mo-W73. In addition, the SRO parameters are calculated in the lattice to further qualify the local atomic arrangement. The Warren-Cowley SRO parameter is defined as74

$${\alpha }_{k}^{i,j}=1-\frac{{P}_{k}^{i,j}}{{c}_{j}}$$
(14)

in which \({P}_{k}^{i,j}\) is the probability of finding element j at the k-th neighbor shell of element i, and cj is the concentration of element j. A negative \({\alpha }_{k}^{i,j}\) suggests the tendency of element j clustering around the element I, while the positive \({\alpha }_{k}^{i,j}\) indicates the opposite. If \({\alpha }_{k}^{i,j}=0\) for each of the k-th shell, then the distribution can be regarded as completely random. In Fig. 6, we also show the SRO parameters \({\alpha }_{1}^{i,j}\) of each pair of elements, which are consistent with the partial RDF analysis.

Fig. 6
figure 6

Partial radial distribution function (RDF) and the SRO for optimized NbMoTaW lattice structure.

One of the major advantages of HEA is its superior mechanical properties, which are related to the composition and atomic configuration. We perform MD simulations at 300 K with the MLP to study the uniaxial stress-strain responses of a randomly generated equiatomic NbMoTaW configuration, a suboptimal NbMoTaW configuration with the converged composition but random atomic arrangement, and the optimized NbMoTaW configurations from the QALO algorithm, as shown in Fig. 7. The optimized HEA configuration is obtained by selecting the solution from the last QALO iteration. The compressive and tensile deformations are applied on the structure along the x-axis (see Methods section for the details of strain-stress simulations). It can be seen that the optimized configuration exhibits much higher moduli under both compression and tension than the randomly generated alloy structure and the suboptimal structure. From QALO, we see that the optimization of the lattice of bulk grain will lead to special SRO and create regions with varying compositions and local environments formed by elements with strong chemical affinities, which can contribute to the solid solution effect known to enhance the mechanical property of HEAs18. This result suggests that the algorithm we proposed can simultaneously optimize the HEA structure in terms of composition and atomic arrangement, thereby obtaining the structure with excellent mechanical properties and thermodynamical stabilities. The comparison of the mechanical properties of the three alloy systems also illustrates the importance of both composition optimization and configuration optimization for HEA property, highlighting the advantages of our proposed algorithm when facing a large search space.

Fig. 7: Uniaxial stress-strain behavior of NbMoTaW systems.
figure 7

In comparison are a randomly generated equiatomic NbMoTaW configuration (NbMoTaW_Rand), a suboptimal NbMoTaW configuration with the converged composition but random atomic arrangement (NbMoTaW_subOpt), and the optimized NbMoTaW configurations from the QALO algorithm (NbMoTaW_Opt).

Computational efficiency analysis

For comparison with QA, the same lattice optimization problem is also solved by the mixed-integer linear program (MILP) solver Gurobi75 and simulated annealer76, which are classical optimizers that are generally more efficient at escaping local minima compared to traditional MC methods. These two classical optimizers are carried out on the classical computer with Dual 12 core Intel® Xeon® 2.50 GHz CPU and 256 GB RAM. The loose-to-tight deployment strategy (as Fig. 2 depicted) is also used for constructing the hQUBOs for these two optimizers to optimize the compositions and configurations. Table 3 shows the computational time and the minimum configurational energy of the three solvers. The running time is calculated by averaging the wall time of all the loose-to-tight optimization modules during the entire QALO optimization, and the minimum configurational energy is the MLP-calculated energy of the optimized configuration after the iteration converges. For small optimization problems (2 × 2 × 2 supercell), Gurobi shows a faster convergence speed than simulated annealing and QA. In this scenario, the non-negligible charge time (including communication and problem embedding time on quantum devices) on the quantum annealer hardware will become an obstacle to computing efficiency. As the target problem becomes larger (4 × 4 × 4 supercell), the computational efficiency of Gurobi becomes much lower, and the optimization results are also less satisfactory compared to the other two annealing algorithms. At the same time, the advantages of QA in both computational efficiency and global searching accuracy are gradually emerging. As the scale of the problem further increases (8 × 8 × 8 supercell), Gurobi and simulated annealer cannot converge to the optimal solution within 6 hours due to the physical memory limitations of the classical computer. It is foreseeable that as the optimization problem becomes larger and larger, the advantage of the QA algorithm will become more significant. The limitations of quantum hardware (e.g., number of interconnect qubits) still largely limit the size of the problems. However, for the HEA problem in this study, 4x4x4 a cell size is found yielding converged state when considering the per atom energy of the optimized lattice.

Table 3 Computational time and minimum configurational energy of different optimizers for solving the NbMoTaW optimization problem

Discussion

In this work, we explore the possibility of using quantum algorithms for lattice materials design and optimization. The proposed QALO algorithm combines the QA algorithm and the machine learning algorithm to achieve the global search of the large material design space through an active learning scheme. The QALO algorithm achieves simultaneous optimization for composition and atomic arrangement through the proper deployment of QA in a two-tiered optimization strategy. When applied to optimizing the configuration of the refractory NbMoTaW alloy, our algorithm can reproduce the enrichment of W and depletion of Nb in the bulk lattice. At the same time, the optimized alloy configuration also shows higher mechanical strength. With the development of quantum devices in the future, the current optimization framework is expected to be further enhanced. More qubits and more complex architectures of quantum computers will allow for the realization of higher-dimensional and complex optimization problems, which will greatly expand the application potential of the QALO algorithm.

Methods

DFT calculations

We performed the DFT calculations for total energies of randomly generated HEA configurations using the Perdew–Burke–Ernzerhof (PBE)77 exchange-correlation functional and projector-augmented plane wave (PAW)78 potentials as implemented in the Vienne ab initio simulation package (VASP)79. The plane-wave cutoff energy is 520 eV, and the k-point density is 3 × 3 × 3 for the 4 × 4 × 4 supercells. For other supercell sizes, the densities of k-point are scaled according to the size of their lattices in the reciprocal space, which are inversely proportional to the supercell sizes. The energy threshold for self-consistency and the force threshold for structure relaxation are 10−8 eV and 0.02 eV/Å, respectively. The Python Materials Genomics (pymatgen)80 library is used for all structure manipulations and analysis of DFT computations. All the energies calculated by VASP are first normalized according to the supercell sizes and then used to construct the datasets.

SNAP potential and LAMMPS calculations

The SNAP model67 expresses the energies and forces of a collection of atoms as a function of the coefficients of the bispectrum of the atomic neighbor density function. For the linear SNAP model, the energy of atom i is expressed as81:

$${E}_{SNAP}^{i}({B}_{1}^{i},\,\ldots ,\,{B}_{K}^{i})={\beta }_{0}^{{\mu }_{i}}+\mathop{\sum }\limits_{k=1}^{K}{\beta }_{k}^{{\mu }_{i}}{B}_{k}^{i}={\beta }_{0}+{\boldsymbol{\beta }}\cdot {{\boldsymbol{B}}}^{{\boldsymbol{i}}}$$
(15)

where \({B}_{k}^{i}\) is the k-th bispectrum component of atom i, and \({\beta }_{k}^{{\mu }_{i}}\) is the corresponding linear coefficient that depends on \({\mu }_{i}\), which is the SNAP element of atom i. Similarly, the force on each atom j can be written as a weighted sum over the derivatives of the bispectrum components of each atom i:

$${F}_{SNAP}^{j}=-{\nabla }_{j}\mathop{\sum }\limits_{i=1}^{N}{E}_{SNAP}^{i}=-{\boldsymbol{\beta }}\cdot \mathop{\sum }\limits_{i=1}^{N}\frac{\partial {{\boldsymbol{B}}}^{{\boldsymbol{i}}}}{\partial {r}_{j}}$$
(16)

The bispectrum coefficients B are given by32,67,81:

$$\begin{array}{l}{B}_{{j}_{1},{j}_{2},j}=\mathop{\sum }\limits_{{m}_{1},{m{\prime} }_{1}=-{j}_{1}}^{{j}_{1}}\mathop{\sum }\limits_{{m}_{2},{m^{\prime} }_{2}=-{j}_{2}}^{{j}_{2}}\mathop{\sum }\limits_{m^{\prime} ,m^{\prime} =-j}^{j}{({u}_{m,m^{\prime} }^{j})}^{\ast }\cdot {C}_{{j}_{1}{m}_{1}{j}_{2}{m}_{2}}^{jm}\\\qquad\qquad\times {C}_{{j}_{1}{m^{\prime} }_{1}{j}_{2}{m^{\prime} }_{2}}^{jm^{\prime} }{u}_{{m^{\prime} }_{1},{m}_{1}}^{{j}_{1}}{u}_{{m^{\prime} }_{2},{m}_{2}}^{{j}_{2}}\end{array}$$
(17)

where \({C}_{{j}_{1}{m}_{1}{j}_{2}{m}_{2}}^{{jm}}\) and \({C}_{{j}_{1}{m}_{1}^{{\prime} }{j}_{2}{m}_{2}^{{\prime} }}^{j{m}^{{\prime} }}\) are Clebsch-Gordan coupling coefficients82, and \({u}_{m,{m}^{{\prime} }}^{j}\) are the coefficients of four-dimensional hyperspherical harmonics extracted from the Fourier expansion of the atomic density functions (see Thompson et al.67 for more details of the SNAP descriptor). SNAP is employed because it can be trained very efficiently compared to other MLPs while not losing accuracy.

In this work, we used the LAMMPS package83 and the FitSNAP package84 to calculate the bispectrum coefficients for all the training structures67. The key hyperparameters for training a SNAP model are the cutoff radius Rcut for bispectrum computation and the order of the bispectrum coefficients jmax. The values of these parameters have been given in Table 2.

All the MD simulations in this work are also performed by LAMMPS. The relaxations are carried out on the undistorted structures under NPT ensembles at 300 K and 0 pressure. For the stress-strain simulations, the undistorted structures are first enlarged to about 40 × 40 × 40 Å. Then, the enlarged structures are relaxed for 2 ns. Uniaxial tensile deformation and compression deformation are applied on the relaxed structures with a strain rate of 5 × 108 s-1 along the x-direction under NPT ensemble at 1 atm and 300 K. The timestep is set to be 1 fs for the simulation.

FM and QUBO problem

FM is a machine learning model that extends traditional linear regression models by incorporating interactions between different input features62. The 2nd order FM can be written as:

$$y(x)={\omega }_{0}+\mathop{\sum }\limits_{i=1}^{n}{\omega }_{i}{x}_{i}+\mathop{\sum }\limits_{i=1}^{n}\mathop{\sum }\limits_{j=i+1}^{n}\langle {v}_{i},{v}_{j}\rangle {x}_{i}{x}_{j}$$
(18)

where xi is the i-th feature of the input variable, ω are linear coefficients, and \({v}_{i},{v}_{j}\) represents the inner product of the latent vectors associated with features i and j.

However, the simple mathematical form of FM sometimes cannot capture more complex or nuanced interactions between features, such as the pair atomic interactions in the lattice. These interactions are usually related to the context of features85. FFM is an improved version of FM, which allows each feature to have multiple latent vectors, one for each field with which it interacts. The 2nd order FFM can be written as86:

$$y(x)={\omega }_{0}+\mathop{\sum }\limits_{i=1}^{n}{\omega }_{i}{x}_{i}+\mathop{\sum }\limits_{i=1}^{n}\mathop{\sum }\limits_{j=i+1}^{n}\langle {v}_{i,{f}_{j}},{v}_{j,{f}_{i}}\rangle {x}_{i}{x}_{j}$$
(19)

where fi and fj denote the fields of features i and j, respectively, and \({v}_{i,{f}_{j}}\) represents the latent vector of feature i when interacting with a feature from field fj. In the lattice with N sites and M types of elements, each of the N × M features will correspond to N fields, so that the 2nd order coefficients in the FFM will accurately describe spatially dependent atomic pair interactions. By introducing field-wise latent vectors, the complexity of the latent space is highly increased.

QUBO problems are a class of optimization problems that involve finding the binary variable assignment that minimizes a quadratic objective function87. Mathematically, the QUBO problem can be written as:

$$\mathop{\min }\limits_{x}({x}^{T}Qx)=\mathop{\min }\limits_{x}\left(\mathop{\sum }\limits_{i=1}^{n}\mathop{\sum }\limits_{j=i}^{n}{Q}_{ij}{x}_{i}{x}_{j}\right)$$
(20)

where x is a binary variable with N components and Q is the hQUBO. The consistency between QUBO and factorization machines (FM and FFM) lies in the structure of their formulations, both of which involve the interactions between features (as Eqs. (18)~(20) shown). Therefore, FM and FFM are always regarded as an efficient way for mapping a general combinatorial optimization problem to QUBO form44,46.

Quantum annealing

Quantum annealing is a quantum analog of classical simulated annealing that permits quantum tunneling to facilitate the efficient exploring of energy landscapes and find the global minimum (as shown in Fig. 8a)39. Compared with simulated annealing, quantum annealing always exhibits a stronger ability to converge to the ground state (global minimum of the energy landscape). In quantum annealing, the system is initialized in the lowest-energy eigenstate of the initial Hamiltonian. The annealing process then proceeds by evolving the quantum state adiabatically towards a target problem Hamiltonian for the system. If the annealing took place slowly, the adiabatic theorem88,89,90 ensures that in all the transformation phases, the system will be kept at the ground state of the Hamiltonian91.

Fig. 8: Schematic of quantum annealing.
figure 8

a Mechanism of quantum annealing; b Chimera graph for problem embedding.

The D-Wave system is the pioneer in the development of commercial quantum annealers. In order to be solved on the D-Wave system, all the problems need to be formulated as an Ising model or, equivalently, a QUBO model. These models can be further represented by a graph comprising a collection of nodes and edges between them, while the corresponding quantum processing unit is expressed as a lattice of qubits interconnected in a design known as a Chimera graph92,93 (as shown in Fig. 8b), which is typical for D-Wave quantum annealers and their operations. The nodes and edges of the objective function graph are mapped to the qubits and couplers of the Chimera graph by a minor-embedding process94,95,96,97.

However, due to the limitation of the QPU size, large-scale QUBO problems (such as the 8 × 8 × 8 optimization problem in this work) cannot be directly fit on a modest-sized chimera lattice. The hybrid-QA algorithm is proposed as a bridge to larger applications66, in which the full QUBO problem is partitioned into sub-QUBOs that fit QPU lattice size98. Each iteration of the hybrid-QA algorithm comprises multiple calls to the quantum annealer to solve each sub-QUBO, and the solution of the original QUBO problem is constructed from the sub-solutions. In this work, all the QA optimizations are implemented by the Leap’s hybrid binary quadratic model solver on the D-Wave Quantum Annealer (Advantage system 4.1), which incorporates the 5000-qubit Advantage (QPU) that can handle up to 20,000 fully connected variables.