Panagiotis Kl.
Barkoutsos
a,
Fotios
Gkritsis
ab,
Pauline J.
Ollitrault
ac,
Igor O.
Sokolov
ad,
Stefan
Woerner
a and
Ivano
Tavernelli
*a
aIBM Quantum, IBM Research – Zurich, 8803 Rüschlikon, Switzerland. E-mail: ita@zurich.ibm.com
bKing's College London, London, UK
cLaboratory of Physical Chemistry, ETH Zürich, 8093 Zürich, Switzerland
dDepartment of Chemistry, University of Zürich, Switzerland
First published on 22nd January 2021
The development of tailored materials for specific applications is an active field of research in chemistry, material science and drug discovery. The number of possible molecules obtainable from a set of atomic species grow exponentially with the size of the system, limiting the efficiency of classical sampling algorithms. On the other hand, quantum computers can provide an efficient solution to the sampling of the chemical compound space for the optimization of a given molecular property. In this work, we propose a quantum algorithm for addressing the material design problem with a favourable scaling. The core of this approach is the representation of the space of candidate structures as a linear superposition of all possible atomic compositions. The corresponding ‘alchemical’ Hamiltonian drives the optimization in both the atomic and electronic spaces leading to the selection of the best fitting molecule, which optimizes a given property of the system, e.g., the interaction with an external potential as in drug design. The quantum advantage resides in the efficient calculation of the electronic structure properties together with the sampling of the exponentially large chemical compound space. We demonstrate both in simulations and with IBM Quantum hardware the efficiency of our scheme and highlight the results in a few test cases. This preliminary study can serve as a basis for the development of further material design quantum algorithms for near-term quantum computers.
The vastness of the CCS offers a formidable opportunity for the discovery of new materials, but at the same time, it poses enormous challenges. In fact, while the exponentially large set of possible chemical species enables the potential design of novel molecules and materials with improved properties for numerous applications in physics, chemistry and biology, current experimental and computational techniques are still unable to perform an efficient optimization in such a high-dimensional space.
Classical approaches to molecular design are currently based either on deterministic algorithms to exploit function–structure relationships using first-principle (or force-fields based) solutions of the underlying physical models (e.g., Schrödinger's or Newton's equations of motion) or on machine learning (ML) and regression models, like the quantitative structure–activity relationship (QSAR) techniques.4 Rational design based on the quantum mechanical framework is crucial for the unbiased exploration of CCS since it enables, at least in principle, the exact and deterministic evaluation of system properties through the calculation of expectation values. However, the computational cost associated to this approach hampers a systematic exploration of the complete CCS, limiting drastically its applicability. On the other hand, despite a long tradition of ML methods in pharmaceutical applications5–9 and many successful applications as filters applied to large molecular libraries,10 the overall usefulness of ML for molecular design is still controversial.11,12 Of different nature are the alchemical perturbative approaches13–15 and the more recent ML techniques trained across the CCS and used to predict, among others, reorganization energies,16 chemical reactivity,17 and crystal properties.18,19 The automatic generation of ML models for classical and quantum observables has only recently been accomplished within the rigorous realm of physical chemistry.20 However, even though promising, these methods are still in their infancy and therefore not yet of general applicability.20
In the case of drug discovery, the main goal is often to find the ‘best’ molecular structure that is capable to produce favourable interaction with a given biological target like, for instance, the binding pocket of an enzyme. Also in this case, the number of accessible stable molecules that can potentially lead to a favourable drug–target interaction is immense. In the case of the optimization of the ligands associated to a known molecular motif (a molecular scaffold), the number of possible configurations obtained by associating a given ligand – selected from a ligand species database with ns elements – to each of the np insertion points of a given molecular scaffold grows exponentially as nsnp.
In this work, we introduce a quantum algorithm that enables the efficient simultaneous optimization of the atomic composition and corresponding electronic structure for an exponentially large set of molecules loaded as a linear superposition of structures in the Hilbert space of a N-qubit quantum register. Within this linear combination of all possible drug candidates the quantum optimization algorithm will then select a small subset of stable candidates with a favourable interaction with the external potential. The quantum advantage of this approach is therefore twofold. On one side, we benefit from the favorable scaling for the solution of the Schrödinger equation (SE) in a quantum computer,21,22 and – on the other side – we can exploit the size of the qubit Hilbert space to efficiently scan the properties of an exponential set of potential drugs.
In this perspective, our quantum algorithm falls in the category of ‘inverse design’,23 namely the optimization of molecular structures given a desired target property. As such, this approach is not limited to the design of new drugs that minimize a given ligand–receptor interaction, but it can be easily generalized to the optimization of different properties of interest in chemistry and physics like, for instance, the optical absorption and emission of chromophores, the efficiency of new catalysts, and the prediction of binary alloys. This work is focusing exclusively on those aspects of the design process that determine the exponential cost of simulations and that can be addressed using a quantum computing algorithm. Additional steps including the molecular relaxation of the system and of its environment can be added without altering the scaling properties.
(1) |
ΔE(R,α,,q) = EC(R,α,,q) − E(R,α) | (2) |
(3) |
(4) |
(5) |
The quantum algorithm requires the transformation of the ‘alchemical’ Hamiltonian in the second quantization framework.25–31 This needs the selection of one-electron basis functions, which is commonly assumed to be the set of molecular Hartree–Fock (HF) orbitals. However, this would imply the solution of the HF equations for each of the exponentially many possible structures obtained by assigning different atomic species (characterized by the ‘valence’ atomic number with sI in the set of considered elements) at each atomic position of the molecular scaffold. To avoid this potential pitfall, we prepare the second quantized Hamiltonian in the basis of the atomic functions, that in our case is given by the Gaussian STO-3G basis set.32,33 However, due to the non-orthogonality of the AO basis functions, a transformation into the orthonormal Löwdin's basis is required. Details are given in Section 6. We denote the elements of this basis set with ψp(r) where p is a collective index that runs over all basis functions associated to all atomic species allowed at each atomic position. The total number of such basis functions is therefore Ntb = NnNsNb, when we assume for simplicity that at each atomic position we have the same number of possible alternative atomic species (Ns), each one described by the same number of atomic basis functions . The main drawback of this choice consists in the requirement of a larger number of qubits, N, for the construction of the molecular wavefunction, without, however, modifying the overall scaling of the algorithm, which remains . The Hamiltonian in eqn (3) becomes
(6) |
Note that the ‘alchemical’ Hamiltonian (eqn (3)) has the same complexity as the original electronic structure problem formulated in second quantization, with the only difference that the ground state solution is now evaluated for a superposition of structures characterized by the coefficients . Thanks to the quantization in the atomic basis, we achieve to break down the exponential cost to linear, since each atom in the molecule is contributing to the total wavefunction with a set of independent orbitals of the size NIs.
The optimization of the ‘alchemical’ system wavefunctions Ψ(r;R) and Ψ′(r;R,α,,q), respectively in the absence and in the presence of the external potential generated by the point charges, is performed using the variational quantum eigensolver (VQE) algorithm.34 For an initial set of parameters α, the circuit in Fig. 2(a) evaluates a trial wavefunction for the corresponding linear superposition of molecular Hamiltonians. The wavefunction is parametrized by the single qubit rotation angles, θ = {θ1, …, θM} (where M is the total number of parametrized gates) according to the hardware-efficient Ansatz described in ref. 26 and 27. In the most general case, the total number of the electrons is not fixed during the optimization, but it varies as the atomic composition of the ensemble evolves, in such a way to minimize the molecular potential energy and maximize the interaction with the environment. This is achieved with the use of the so-called hardware efficient wavefunction Ansätze27 that, while providing an efficient way of generating entangled trial states, enable the sampling of the full electronic Fock space without imposing any constraint on the total number of electrons. However, when needed, it is also possible to confine the search within the subspace corresponding to the desired number of electrons or to a given molecular total charge by means of a constraint such as the one given in eqn (5). At each VQE iteration both parameter sets, {θ, α}, are updated in order to minimize the cost function ΔE(R,α,,q) in eqn (2) for fixed values of the charges and corresponding positions (, q). Note that in this application we are dealing with a modified version of the original VQE algorithm in which the optimization is extended to a set of parameters α that defines the cost function. At convergence, the algorithm provides the set of optimized parameters {θopt, αopt}, which defines the ‘alchemical’ state that minimizes the interaction with the environment. This corresponds to a superposition of possible physical states (molecules) weighted by the coefficients αopt. The final step consists in the selection of the most suited atomic species to be located at the atomic site I of the optimized molecule, according to the sampled VQE distributions (see the Results section). The algorithm can converge towards a pool of potential candidates with similar scoring values instead of a single structure. In this case, after imposing a threshold value, it is possible to identify a small subset of molecules that can be further analyzed.
Fig. 1 Point charge distributions. (a) Position of the point charges (blue and orange dots) relative to the molecule to optimize (black dots). Shown is the case of the H2 molecule. The orange charges along z-axis are allowed to change (values reported in panel (e)) whereas the blue charges are kept fixed at the value of 0.06. (b–d) Contour plots of the potential energy generated by the 6 point charges in the xz plane for the three different cases given in the table below (panel e). The potentials are in atomic units. (e) Value of the charges (in the unit of the fundamental electronic charge e) used to generate the 3 different external potentials. For all molecules (A1–A2) in Fig. 2 (panel e) the first atom (A1) is the one with negative z-coordinate. |
Fig. 2 Diatomic molecules in a point charge environment. (a) Variational circuit used to generate the trial alchemical wavefunctions (for this case D = 2). (b) Entanglement block used in the variational form for the hardware runs. In the classical simulations, we used entangler blocks connecting all qubits. (c) Circuit and feedback loop used to update the wavefunction parameters (circuit variables) and the alchemical weights (of the Hamiltonian). (d) Sketch of the molecular superposition state with the contribution of 6 (over N) representative molecules participating to the ensemble, each contributing with the probability . (e) Distribution of the molecular propensities for each of the three charge distributions described in Fig. 1(e). The initial uniform distribution is shown in orange. The converged VQE distributions obtained in simulations and hardware calculations are given in blue and green, respectively. |
For all three elements we used a STO-3G basis set, which amounts to 1, 5, 9 atomic basis functions for H, Li, and Na, respectively. In order to keep the number of qubits and the number of matrix elements hμν(R,α,,q) and gμνκλ(R) constant for all molecules, we extended the active space for every molecule according to the minimum active space requirements of the largest molecule (see also Section 6).
The bond distances used to compute the matrix elements for the potentials and of eqn (1) (which also contribute to hμν(R,α,,q)) are obtained from tabulated values, provided from ref. 35. In the case of more complex molecular scaffolds, the algorithm can be extended to include a geometry optimization step where atomic forces are computed from additional measurements of the gradients of the Hamiltonian performed using the ‘alchemical’ wavefunction Ψ(r;R,α,,q) at each VQE iteration.36,37 The cost of the geometry optimization step does not modify the scaling of the algorithm but only implies additional 6Nn measurements, all performed with the same VQE alchemical wavefunction.
As a second application, we investigate the binding affinity for different diatomic gases in the binding pocket of the hemeprotein H-NOX (PDB entry code: 3TFA). This protein is involved in sensing and signaling the presence of simple gas molecules in the environment. In particular, in H-NOX one can identify a series of apolar channels that connect the exterior of the protein to the buried heme group. The nature of the hydrophobic pockets arranged along the channels favours the selectivity of the gas molecules and their mobility (see Fig. 3(b)). In this study, we compute in a single VQE simulation the binding affinity for all possible diatomic molecules that can be generated from the set {C, N, O, S} (the ones chemically unstable are naturally discarded due to their unfavourable formation energies). The center of mass of all molecules is placed at the position of the Xe atom that occupies the binding pocket in the X-ray structure.38 The optimal orientation of the diatomic molecules in the pocket is determined for a single element of the ensemble (namely the molecule CO) and kept fix during the VQE optimization. The binding energies obtained for all stable molecules are reported in Table VI of the ESI.†
Fig. 3 Diatomic molecules in a protein environment. (a) X-ray crystal structure of the protein H-NOX (PBD entry code 3TFA) showing the main channel with three binding pockets occupied by Xe atoms (orange spheres). (b) Zoom into the first binding pocket with highlighted the apolar residues that favour the selection and diffusion of the gas molecules. The orange spheres indicate the position of the co-crystallized Xe atoms, which mark the center of the binding pockets. (c) Position of the point charges used to mimic the enzyme pocket. The red dot corresponds to the center of the diatomic molecules. (d) Initial and final distributions of the molecular structures obtained with the ‘alchemical’ optimization. |
The VQE is initialized using an unbiased distribution of the atomic weights associated to each atomic position, namely so that . All Ntb qubits are initialized in state ‘1’ (note that the choice of atomic basis functions in place of molecular (HF) ones implies the possible occupation of all orbitals in the generation of the system wavefunction). As a consequence, the circuit used to sample the ‘alchemical’ wavefunction is not required to conserve the total occupation number (i.e., the number of ‘1’ in the qubit register). Fig. 2(e) shows the evolution of the atomic compositions at the two molecular sites of the system in Fig. 2(a) throughout the optimization process for different choices of the external charges (see table in Fig. 1(e)). Starting from the initial equally distributed atomic compositions we observe in all cases a smooth increase of the population of a given atomic species at each of the two atomic positions. As expected, the most probable final structure depends on the choice of the external potential. The correctness of our predictions are confirmed with an a posteriori calculation of the binding energies using an equivalent classical algorithm. The results of this comparison are reported in ESI, Table V.† Note that in the case the algorithm converges in a broad distribution of candidates, L1-regularization techniques can be used to enhance the sampling towards a restricted set of structures (see also ESI†).
In the case of H-NOX simulation, we determined the diatomic molecule obtained combining two elements from the set {C, O, N, S}, which has the best affinity for the first binding pocket exposed to the solvent. The simulation of the ‘alchemical’ quantum algorithm proposed in this work unequivocally selects the molecule SO, independently from the orientation of the molecular axis (see ESI† for the details on the calculation). The solution is in agreement with the ‘classical’ solution obtained by scanning the binding energy of all possible molecules.
The algorithm was successfully applied to the optimization of a diatomic molecule composed by elements from the ensemble {H, Li, Na} placed in an external potential generated by 6 point charges. Simulations and hardware calculations performed on ibmq_singapore chip could unequivocally identify the best fitting molecule over an ensemble of 9 possible structures. To further validate our approach, we also apply the same algorithm for the determination of the diatomic molecules (with elements from the ensemble C, O, N and S) that best fit in the binding pocket of the hemeprotein H-NOX represented by 330 point charges. Also in this case, the simulation correctly selects the most stable molecule, namely SO, as confirmed by electronic structure and DFT calculations shown in ESI (Table VI).†
In conclusion, we propose and demonstrate a quantum algorithm which enables the optimization of chemical structures in a given external potential. The results illustrate the potential of quantum algorithms as a tool for the efficient and accurate sampling of the chemical compound space and open up new perspectives for the use of quantum computers in material design and drug discovery applications.
In this work, we used a localized basis set composed of atom centered orbitals . The main consequences of this choice can be summarized as follows:
(i) Orbitals are not orthogonal to each other
〈ϕAOμ(r)|ϕAOν(r)〉 = Sμν ≠ δμν | (7) |
(ii) The commutation rules for the corresponding creation and annihilation operators: ĉ†μ,ĉμ become
[ĉ†μ,ĉ†ν]+ = 0 | (8) |
[ĉμ,ĉν]+ = 0 | (9) |
(10) |
(iii) Löwdin rules for the calculation of matrix elements are modified as described for instance in ref. 39.
The Hamiltonian in the AO basis has the usual form
(11) |
Points (ii) and (iii) can be demonstrated applying the Löwdin's orthogonalization procedure defined by the new set of orthogonal Löwdin's orbitals
(12) |
In order to circumvent the problem associated to the non-conventional commutation rules of eqn (10), we therefore rewrite the Hamiltonian of eqn (11) in the new orthonormal basis
(13) |
(14) |
(15) |
The operators â†i and âi defined as
(16) |
(17) |
The simulation of the ‘alchemical’ Hamiltonian is executed in the Qiskit40 framework. For the classical optimization procedure, we employed the SLSQP optimizer as integrated in Qiskit Aqua. To ensure that the alchemical parameters remain within the interval [0,1], we implemented in the SLSQP algorithm a constraint of the form . The wavefunction parameters were initialized randomly within the interval [0, π]. After each optimization run, the parameters were re-initialized with the values estimated in the previous step. All qubit angles θ were constrained in the interval 0 to 2π. In the classical simulations of the quantum algorithm we set the maximum number of iterations to 500, while for the calculations on hardware we used 100 iterations.
In the optimization process, we observed that multiplying the binding energies by a factor f allows for a faster convergence of the VQE. For this reason, the minimization was driven by the cost function minθ〈ψ(θ)|f(HC(R,α) − H(R,α))|ψ(θ)〉 while the binding energies were calculated using (〈ψ(θ)|f(HC(R,α) − H(R,α))|ψ(θ)〉)/f. For the results in Fig. 2 a factor f = 103 was used while for the system described in Fig. 3 we chose f = 104. To improve the convergence of the algorithm, we performed several restarts of the VQE algorithm using as initial parameters the ones outputted in the previous optimization loop.
The hardware runs were executed on ibmq_singapore 20-qubit chip via Qiskit.40 The connectivity of the chip is shown in ESI, Fig. 1.† In all runs, we used 8192 measurements and we exploited the natural connectivity of the qubits to implement the variational circuit (Fig. 2(a) and (b)).
Footnote |
† Electronic supplementary information (ESI) available. See DOI: 10.1039/d0sc05718e |
This journal is © The Royal Society of Chemistry 2021 |