Hardly a day goes by without the announcement of some new breakthrough in quantum technology. Quantum computers can already perform calculations that classical computers would be unable to perform in reasonable lengths of time–quantum supremacy, as it is known. Although current quantum computers have limited power, there are plans for next-generation quantum computers with millions of so-called qubits—the elements of a quantum computer.
This paper was motivated by a comment made by one of our colleagues: “As soon as we have a quantum-Fortran compiler, we’ll be able to start using these computers in meteorology.” Unfortunately, it is not as simple as this—the way quantum computers work is profoundly different from the way classical computers work. Indeed, it is so different that it is very difficult for someone who is not well versed in quantum mechanics to understand what exactly these differences are.
In this paper, we try to answer the question of whether quantum computers will ever take over from classical computers in trying to make weather forecasts, or seasonal predictions, or indeed climate change projections, using the underlying laws of physics. We do this assuming a typical meteorological audience with a good knowledge of fluid mechanics and classical computers but little knowledge of quantum computing theory.
In attempting to answer this question, we have been motivated by the title of the movie The Good, the Bad and the Ugly, but replacing it with the “The Good, the Bad, and the Noisy.” In quantum computing there are certainly good points and bad points. The question is which will win out overall. In this review, we have taken the opportunity to discuss some advances of our own, using quantum algorithms to solve nonlinear differential equations exponentially faster than classical algorithms.
We do not aim to provide a technical review article on the field of quantum computing. For a comprehensive introduction, the interested reader should consult the excellent book by Nielsen and Chuang (2010). A selection of reviews on various quantum computing paradigms and recent developments may be found in Nimbe et al. (2021), Bharti et al. (2022), Montanaro (2016), and Cerezo et al. (2021).
The Good
Key elements of quantum computation.
Do not keep saying to yourself, if you can possibly avoid it, “But how can it be like that?” because you will get ‘down the drain’, into a blind alley from which nobody has escaped. Nobody knows how it can be like that.
The very simplest quantum computer (too simple to be useful) would take as its input state the vector |ψ〉 in Eq. (2) with some initial values α(ti) and β(ti). There would then be a quantum circuit where certain rotations of the vector are performed in hardware. At the end of these rotations, the vector is still in the state (2) but with final values α(tf) and β(tf). These rotations are effected by the governing equation of quantum mechanics, the linear Schrödinger equation. In terms of the complex Hilbert space, the operations that map initial vectors to final vectors can be described by unitary matrices.
There is one final yet utterly critical part of our simple quantum computer. One has to “measure” the qubit. Again, while there is an experimentally well-defined procedure for performing such measurements, no one is quite sure what is going on at a theoretical level when a measurement takes place. For example, 2020 Nobel Laureate Roger Penrose has proposed that the process of measurement occurs when the effects of self gravitation of quantum systems are no longer negligible.
Again, we ignore such deep matters and simply describe the recipe which all students of quantum mechanics know. To perform the measurement, you first choose a vector basis relative to which the measurement takes place. If |0〉 and |1〉 describe this measurement basis, then, after measurement, the qubit will be found to be in the |0〉 state with probability |α(tf)|2 and in the |1〉 state with probability |β(tf)|2. This appearance of probability led Einstein to complain that God does not play dice. However, most physicists today believe that quantum uncertainty is fundamentally encapsulated in the laws of quantum physics, making it different in character to chaotic uncertainty (whose origin is our inability to know about flaps of butterflies wings). One of the authors believes that scientific orthodoxy will ultimately be overturned on this matter (Palmer 2022). However, this is not the topic of this paper.
In practice, it can be arranged so that a bell rings, or a light flashes, when the state evolves to |0〉. We can estimate the modulus of the complex amplitudes by carrying out multiple measurements of the state and counting the number of times the state evolved to |0〉.
Here there are now four basis states, and on measurement the system evolves to one of these basis states with a probability given by the squared modulus of the associated complex amplitude. Figure 1 illustrates and contrasts a two-bit classical and a two-qubit quantum circuit.
In this way, n-qubit states are associated with 2n complex numbers, i.e., 2n+1 real numbers (less 2 for normalization and global phase). This exponential increase in the dimension of the Hilbert space with qubit number n has some remarkable consequences.
Consider a modern numerical weather prediction (NWP) model, with say 1 billion variables. These variables represent the components of wind velocity, temperature, humidity, and other variables, on a grid that covers Earth and extends up into the stratosphere. How many qubits are needed to encode the state of such an NWP model into the complex amplitudes of a multiqubit Hilbert state? A simple estimate is to take the log to base 2 of 1 billion. The answer is 30. By modern quantum computer standards, a 30-qubit quantum computer is not an especially large computer.
Hence, it appears possible to initialize a 30-qubit quantum computer with the initial state of a billion-variable NWP model. So far, so good! The next question is whether it is possible to encode the dynamical equations of an NWP model (e.g., the Navier–Stokes equation) into the unitary transformations that a quantum state evolves through before measurement. It may seem there is a fundamental obstacle here—that the Schrödinger equation is linear, while the Navier–Stokes and other equations in NWP are nonlinear. However, in fact that obstacle can be overcome. This is an area of research in which the authors, in collaboration with a group at the Massachusetts Institute of Technology, are actively engaged. In the subsection below we give a brief summary of this research. As with much in quantum computing, it is impossible to provide a schematic outline without having to give some technical details. The reader not interested in such details can skip to the end of this section.
In addition to the quantum computing paradigm described above which consists of a controlled unitary evolution of quantum states followed by measurements of the qubits, a range of other approaches have been suggested. A type of quantum machine referred to as an annealer, such as the much-reported D-Wave machine, seeks to encode computational tasks as minimization problems of a target function (McGeoch 2020). By carefully tailoring the interaction between the internal qubits, the solution of the minimization is given by the lowest energy state of the machine. It is yet unclear whether this approach offers a quantum advantage and whether it is computationally universal.
Hybrid quantum computing represents yet another quantum computing paradigm, where the quantum hardware is used to evaluate a parameterized target function. The overall task is to find the parameter values which minimize the target function. After each evaluation of the target function on the quantum chip, a classical computer determines a new set of parameters for which the target function will be evaluated until a local optimum has been determined. As with the D-Wave machine, it has yet to be shown that this scheme can offer a scalable quantum advantage.
Nonlinear differential equation quantum solver.
Our way to solve nonlinear differential equations is to encode multiple copies of a quantum state and let these copies interact with each other—via what in quantum theory is known as an interaction Hamiltonian (cf. Lloyd et al. 2020). We then study the evolution of one of the copies. It turns out that the equation of motion for a single copy is itself nonlinear; the nonlinearity originates as the leading-order term in the expression for the interaction between copies. It can be understood and described as an effective mean field that arises from averaging the degrees of freedom of all but one copy. In this framework, however, one finds that higher-order terms give rise to mean-field errors. These errors tend to accumulate during the course of a computation, which will be demonstrated in an example further below. In a recent paper, Lloyd et al. (2020) utilized mean-field nonlinearities to create a quantum nonlinear solver that offers an exponential resource gain over classical solvers. We give a brief description of this quantum algorithm, based on the ideas above, in appendix B.
For the rest of this section we are going to apply the Lloyd et al. algorithm to a simple nonlinear differential equation. Consider the flow of a single dynamical variable subject to
In the left panel, the output of the quantum solver is shown for various different initial values. It is benchmarked by a classical forward Euler integration and the analytic solution. We observe that the output of the quantum solver is in good agreement with the classical output up to about 15 integration steps. This is no mere coincidence. In carrying out the integration, N = 15 identical system copies have been used to run the quantum solver. As mentioned above, the inclusion of nonlinear terms leads to additional mean-field errors which build up during each integration step. As those errors usually are suppressed by a factor of 1/N, the errors limit the range of the integration to
Classical NWP utilizes ensemble methods (cf. Palmer 2022). It is therefore instructive to compare the results of integrating our one dimensional toy model using the quantum solver to a classical ensemble-average solution. As shown in Fig. 3, we find that the quantum solver output is closer to the ensemble average than to a single classical forward Euler solution. If generally true, this would be a remarkable result. Further research will be required to establish whether this observation holds true for arbitrary dynamical systems.
An obvious next step would be to integrate the famous Lorenz (1963) equations with our quantum algorithm. However, there is a difficulty on classical emulators of quantum computers that we are currently working to overcome when the time derivatives are expressed as polynomials of even degree. At this point, we have determined that the problem can be solved by supplying the single copy state vector with additional “dummy” variables. The number of these dummy variables will scale linearly with the number of integration steps T. Although this does not present a problem for a quantum computer per se, it does render the emulation of the quantum solver on a classical computer unfeasible.
The state vector of size N can be encoded in log2[10200] ≈ 655 qubits. In addition, there is a number of ancilla qubits linked to the precision of the matrix inversion which can be estimated to be about 100. Thus, we expect a required circuit width of a few hundred error corrected qubits to be sufficient for addressing the Lorenz system. Currently available quantum hardware such as IBMQ offers about 100 noisy qubits with plans to achieve about 1000 in the coming years. (For a discussion on the impact of noise, section “The Noisy.”)
So far, it thus sounds plausible to expect implementation of the quantum solver in a few years’ time. Another important quantity, however, is the circuit depth, i.e., the number of required elementary gates. Here, it is more difficult to predict the required resources. Scherer et al. (2017) predicted a circuit depth of 1029 gates to invert a matrix of size N ≈ 3 × 109 in the context of scattering cross-section computations. If this is correct, this poses a twofold problem. First, assuming that execution times of the individual gates are of the order of 10−9 s, the runtime of the algorithm would be about 1020 s. Second, in order to keep control of the errors in gate execution, a single gate would need to have a fidelity of
In summary, the circuit depth required for the integration of the Lorenz system crucially depends on parameters such as the connectivity of future quantum hardware. The authors of this paper believe that the benefit of their work lies in informing the design of future quantum hardware such that computational overhead will be kept to a minimum.
The Bad
Readers may be familiar with the parlor game “20 Questions.” One person thinks of some kind of object and the rest of the group have to guess what the object is by asking questions. However, the question must be such that it can only be answered with a “yes” or a “no.” Hence, if it has been ascertained that the object is a piece of fruit, you are not allowed to ask, “What type of fruit is it?” Instead, you must ask, “Is it an orange?”
Something like these two types of question describe well the difference between classical physics and quantum physics. On a classical computer, if you want to know the value of some particular variable, such as temperature in grid box N at time step M, you simply ask the computer to write out that value. On a quantum computer, things are much more nuanced. You might start by asking the quantum computer if the temperature (at grid box N and time step M) is greater or less than 290 K. To do this we have to add to the quantum hardware a unitary operation such that if the temperature is greater than 290 K then the state evolves to the “|0〉,” so that, if this state is measured, the alarm bell, or green light, or whatever, will light with complete certainty.
Here, the fact that the state space of n qubits is exponential in n comes back to bite us. The converse of this remarkable exponential fact of quantum life is that the number of qubits that we can measure, measurements that are needed if we are to discover the results of the unitary transformations between the initial and evolved quantum states, is the logarithm of the dimension of that state space.
If we have a 30-qubit system, then essentially we can ask 30 questions about the weather around the world. Is it raining in Rio tomorrow? Is it stormy in San Francisco next week? Is the monthly outlook for Copenhagen cold?
If we had a proprietorial quantum computer and all we cared about was the weather in our backyard, then perhaps we would be satisfied with such limited information. Perhaps for climate change, all we care about is whether the global-mean temperature will rise above 2°C. However, of course, for any realistic operational weather or climate center, this is far from sufficient. We need to know the value of the many variables in an NWP model—maybe not all billion of them, but certainly millions of values for the many variables at many parts of the world at many times.
Since the output of a quantum computation will be limited to as many bits as it processes qubits, this is an (insurmountable) bottleneck. Therefore, quantum computers are unlikely to entirely replace classical computers for NWP. They may, however, play a role performing specialized tasks within an NWP or climate model. This is consistent with the trend toward more heterogeneous computing architectures (e.g., CPU versus GPU). Quantum computers might offer an advantage in answering questions that require a resolution exceeding classical resources. However, we are a very long way from having both quantum algorithms and quantum hardware that can accomplish such specialized tasks. Indeed, our main conclusion is that quantum computers are not well suited to “big data” problems, where outputs explore the high dimensionality of the big data.
The Noisy
In the first section we have seen that we can encode the state of an NWP model onto a quantum computer and that we can perhaps describe the Navier–Stokes and other nonlinear equations of NWP with the Schrödinger equation, through an interaction Hamiltonian. In this section, we jump to what seems like an “ugly” aspect of quantum computing, but argue it may not be as ugly as we might imagine at first sight.
One of the problems with quantum entanglement is that quantum systems love to get entangled with their environment. However, the environment is typically a messy, noisy system. Hence, when qubits entangle with the environment, they themselves become noisy. Quantum computer manufacturers try to minimize such environmental “decoherence” by enclosing the quantum computer in a supercold superconducting environment. However, this only works to a degree.
As a result, we have to distinguish between hypothetical noise-free “logical qubits” on the one hand, and practical noisy “physical qubits” on the other. It is possible to represent these hypothetical logical qubits if you have enough copies of the noisy physical qubits, by applying error detection and correction algorithms to the copies.
So how many copies do we need? Well the answer depends on what level of accuracy and precision we require in the first place. Furthermore, one might be able to take advantage of the fact that in NWP on classical computers, there are considerable advantages to introducing noise into computational representations of the nonlinear Navier–Stokes equation (cf. Palmer 2019). Is there a quantum analog? Due to interaction with the environment, the evolution of noisy qubits during a computation must be described by a more generalized formalism than the Schrödinger equation. While so-called density matrices are useful in understanding the outcome of several averaged runs of a noisy quantum computer, not-averaged noise encountered in a single run can be captured by the stochastic Schrödinger equation (Bouten et al. 2004). Here, the evolution of the quantum state in a single run of the quantum computer is subject to stochastic Wiener processes. Although the precise form of the stochastic terms critically depends on the design of the quantum hardware, it is plausible that stochastic terms will be injected into the stepwise integration of nonlinear systems when executed by the quantum solver. Further research will be required to establish whether potential future quantum NWP could actually benefit from this feature.
A new insight which resulted from writing this paper is that the integration of stochastic differential equations can in fact be accomplished using an extended form of the quantum solver. Here, the noise terms present at each integration step are inserted during the initial setup of the quantum computer. This means that the noise does not have to be injected at each discretized integration step, but will rather be a part of the initial quantum state.
Early studies (Epstein 1969; Fleming 1971a,b) of the state-dependent predictability of weather focused on solving the classical Liouville equation (so-called stochastic–dynamic prediction). However, in practice this proved impractical due to the large dimensionality of the state space. It is currently unclear whether noisy quantum computers would offer any advantage in solving the classical Liouville equation for such weather forecast problems—at present there is no evidence that it would.
The introduction of noise can help to reduce the dimensionality of a dynamical system. For instance, a suitable variable transformation of the deterministic three-dimensional Lorenz system yields a two-dimensional stochastic system (Palmer 2001). This offers a potential route to gauge the impact of noise in a quantum computer using near-term quantum hardware: by integrating the modified Lorenz system of reduced dimensionality on the quantum solver, the imperfections of the hardware might allow to explore chaotic behavior of the effectively stochastic system and to reproduce the Lorenz attractor.
Conclusions
In writing this paper, the authors hope to shed light on the potential applicability of (future) quantum computing technologies in weather and climate predictions. By making use of an exponentially large state space, quantum computers offer a range of advantages when it comes to processing large sets of data. Recent developments have paved the way to integrating nonlinear systems on quantum computers (Lloyd et al. 2020). We have emulated the behavior of a nonlinear quantum solver and presented encouraging results for a number of toy models.
Unfortunately, quantum computing does not only offer benefits. In the authors’ opinion, the two main challenges for quantum computers to become useful tools for researchers of disciplines involving numerical computations are the limited amount of information that can be read out after a computation, and noise. While a plausibility argument seems to indicate that a certain level of noise could even be beneficial in the integration of nonlinear dynamics, the limitations on the read-out capacity present a seemingly insurmountable problem. However, in some quantum computing paradigms such as, e.g., hybrid quantum computing, reading out the full quantum state might not be required. Unfortunately, it is yet unknown whether in these frameworks there will be a scalable quantum advantage.
With the development of more powerful quantum processors in the upcoming years, it is likely that quantum computers will become useful tools for a range of specialized applications. They, however, are unlikely to replace classical computers for NWP or climate prediction in the foreseeable future.
Henceforth, we shall use 0, 1 and ↑, ↓ synonymously.
In the literature, the short form |ij〉 is often used for |i〉 ⊗ |j〉, etc.
Acknowledgments.
TP was supported by a Royal Society Research Professorship and FT by a Royal Society Research Professorship Enhancement Award. In addition, for this project, because of its relevance to climate modelling, TP and FT have received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (ITHACA, Grant Agreement 741112).
Data availability statement.
Due to confidentiality agreements, supporting data can only be made available to bona fide researchers subject to a non-disclosure agreement. Details of the data and how to request access are available from felix.tennie@physics.ox.ac.uk.
Appendix A: Bits versus qubits
Multiple bits form bit strings. At any point during a computation on a deterministic classical computer those bit strings are in a definite state, e.g.,
The set of qubits can be visualized as a sphere where α = cos(θ/2) and β = sin(θ/2)e(iϕ) for spherical coordinates θ and ϕ as illustrated in Fig. A1. The complex phase of α may be chosen as zero since it has no physical meaning for a single qubit.
Although both states |+〉 and |−〉 give rise to the same probabilities for measuring 0 or 1 (i.e., p = 0.5), they behave very differently when manipulated further as will be seen in subsequent sections.
More specifically, it is not possible to find complex numbers α1, α2, β1, β2 such that
Appendix B: The quantum nonlinear solver
The history state vector (x0, x1, …, xT) encodes the discretized evolution of the dynamical variables. It can be derived by inverting the matrix on the left-hand side. Quantum computers can accomplish this task using the Harrow–Hassedim–Lloyd (HHL) quantum matrix inversion algorithm (cf. Harrow et al. 2009). This quantum algorithm provides an exponential speed-up over classical algorithms and therefore allows for a resource-efficient integration of linear differential equations.
After inverting the matrix on a quantum computer, we yield a history state of N copies of the system state. The dynamical variables can then be evaluated by measuring individual copies.
References
Bharti, K., and Coauthors, 2022: Noisy intermediate-scale quantum algorithms. Rev. Mod. Phys., 94, 015004, https://doi.org/10.1103/RevModPhys.94.015004.
Bouten, M., M. Guta, and H. Maassen, 2004: Stochastic Schrodinger equations. J. Phys., 37A, 3189–3209, https://doi.org/10.1088/0305-4470/37/9/010.
Cerezo, M., and Coauthors, 2021: Variational quantum algorithms. Nat. Rev. Phys., 3, 625–644, https://doi.org/10.1038/s42254-021-00348-9.
Epstein, E. S., 1969: Stochastic dynamic prediction. Tellus, 21, 739–759, https://doi.org/10.3402/tellusa.v21i6.10143.
Fleming, R. J., 1971a: On stochastic dynamic prediction: I. The energetics of uncertainty and the question of closure. Mon. Wea. Rev., 99, 851–872, https://doi.org/10.1175/1520-0493(1971)099<0851:OSDP>2.3.CO;2.
Fleming, R. J., 1971b: On stochastic dynamic prediction: II. Predictability and utility. Mon. Wea. Rev., 99, 927–938, https://doi.org/10.1175/1520-0493(1971)099<0927:OSDP>2.3.CO;2.
Harrow, A. W., A. Hassidim, and S. Lloyd, 2009: Quantum algorithm for solving linear systems of equations. Phys. Rev. Lett., 15, 150502, https://doi.org/10.1103/PhysRevLett.103.150502.
Leyton, S., and T. J. Osborne, 2008: A quantum algorithm to solve nonlinear differential equations. arXiv, 0812.4423v1, https://doi.org/10.48550/arXiv.0812.4423.
Lloyd, S., G. De Palma, C. Gokler, B. Kiani, Z.-W. Liu, M. Marvian, F. Tennie, and T. Palmer, 2020: Quantum algorithm for nonlinear differential equations. arXiv, 2011.06571v2, https://doi.org/10.48550/arXiv.2011.06571.
Lorenz, E. N., 1963: Deterministic nonperiodic flow. J. Atmos. Sci., 20, 130–141, https://doi.org/10.1175/1520-0469(1963)020<0130:DNF>2.0.CO;2.
McGeoch, C. C., 2020: Theory versus practice in annealing-based quantum computing. Theor. Comput. Sci., 816, 169–183, https://doi.org/10.1016/j.tcs.2020.01.024.
Montanaro, A., 2016: Quantum algorithms: An overview. npj Quantum Inf., 2, 15023, https://doi.org/10.1038/npjqi.2015.23.
Nielsen, M. A., and I. L. Chuang, 2010: Quantum Computation and Quantum Information. 10th ed., Cambridge University Press, 704 pp.
Nimbe, P., B. A. Weyori, and A. F. Adekoya, 2021: Models in quantum computing: A systematic review. Quantum Inf. Process., 20, 80, https://doi.org/10.1007/s11128-021-03021-3.
Palmer, T. N., 2001: A nonlinear dynamical perspective on model error: A proposal for non-local stochastic-dynamic parametrization in weather and climate prediction models. Quart. J. Roy. Meteor. Soc., 127, 279–304, https://doi.org/10.1002/qj.49712757202.
Palmer, T. N., 2019: Stochastic weather and climate models. Nat. Rev. Phys., 1, 463–471, https://doi.org/10.1038/s42254-019-0062-2.
Palmer, T. N., 2022: The Primacy of Doubt. Oxford University Press, 320 pp.
Perelshtein, M. R., A. I. Pakhomchik, A. A. Melnikov, A. A. Novikov, A. Glatz, G. S. Paraoanu, V. M. Vinokur, and G. B. Lesovik, 2022: Solving large-scale linear systems of equations by a quantum hybrid algorithm. Ann. Phys., 534, 2200082, https://doi.org/10.1002/andp.202200082.
Scherer, A., B. Valiron, S.-C. Mau, S. Alexander, E. van den Berg, and T. E. Chapuran, 2017: Concrete resource analysis of the quantum linear-system algorithm used to compute the electromagnetic scattering cross section of a 2D target. Quantum Inf. Proc., 16, 60, https://doi.org/10.1007/s11128-016-1495-5.