Will quantum computers one day manage international reserves? (Part 1)

Trade – especially the need to keep business and accounting records – has historically been one of the main drivers of the development of computer technology. The need for effective computing tools increased when goods trade was later joined by “money trade” (i.e. banking). For example, Fibonacci’s famous Liber Abaci (The Book of Calculation), which in 1202 introduced Arabic (or Indian) numerals to Europe, served primarily as a guide for traders and bankers on how to solve trade-related numerical problems. Computational procedures and tools have been refined over time, from the mechanical calculators designed, for example, by Pascal and Leibniz, through Babbage’s “difference engine” [1] and Hollerith’s punched cards and tabulating machines, to electronic computing starting in the 1940s. Electronic computers were used initially in military and later also civilian research. They were first deployed in commerce in the 1950s (for example, the Remington Rand UNIVAC computer was used in the Eastern Airlines booking system [2]).

Electronic computers gradually expanded into all sectors of the economy, but their users soon found that some simple-looking tasks were too tough for computers to handle. The classic example of this is the travelling salesman problem.[1] However, this category also includes various other optimisation problems, the factorisation of integers into primes, and the simulation of quantum systems (such systems are used not only in particle physics, but also in pharmacy, and have inspired some models of the functioning of financial markets). In particular, the third group of problems led to the concept of quantum computers, as brilliantly expressed by its originator, physicist Richard Feynman: “Nature isn’t classical, dammit, and if you want to make a simulation of nature, you’d better make it quantum mechanical, and by golly it’s a wonderful problem, because it doesn’t look so easy” [3]. Quantum computers have developed rapidly over the last ten years, turning from purely laboratory equipment into “almost commercially usable” computing tools.

Numerous quantum algorithms have been created and have found applications in the world of finance. Banks such as Goldman Sachs [4] and J.P. Morgan [5] are exploring the potential of quantum computers in derivative pricing. The lively debate about this new type of computing tool in the financial sector was the main incentive for us to pursue this topic more closely. Banks’ interest in quantum computing suggests that it will play an important role in their computational arsenal in the future. Central banks need to be prepared for this literally quantum leap, as their roles include that of market regulator.

Studies are already being developed on quantum versions of the credit models used in loan approval processes [6]. Central banks need to be able to assess the quality of these models, in order, for example, to prevent the emergence of large amounts of non-performing loans and safeguard financial stability. It is also important to remember that central banks’ large international reserves make them major investors, so they need to be aware of instruments that may be able to help them in their investment decisions a few years from now.

In this blog article, we will start by outlining the history and areas of application of quantum computers (with an emphasis on finance), describe the principle of their operation, and briefly analyse their physical implementation. In the second instalment, we will look at our practical experience of experimental applications of quantum algorithms to a number of international reserves management problems, specifically portfolio optimisation and risk measurement.

History and potential applications

As mentioned above, Richard Feynman [7] came up with the idea of quantum computers in the mid-1980s. His aim was to find an efficient tool for simulating quantum systems such as models of the behaviour of elementary particles. In 1992, David Deutsch and Richard Jozsa [8] proposed an algorithm making it possible to determine, in a single computational step, whether a binary function is constant or balanced.[2] On a classical computer (i.e. a standard modern desktop), such a calculation would require function values to be quantified for at least half of the possible inputs. Although of little practical use, this algorithm shows very well that quantum computers can solve certain problems outside the realm of theoretical physics more efficiently than classical ones.

Other algorithms – this time practical ones – were proposed by Peter Shor [9] in 1994 and Lev Grover [10] in 1996. Shor’s algorithm is capable of factoring an integer into primes much more rapidly than classical algorithms. Specifically, it provides exponential speedup – with Shor’s algorithm the computation time increases as the cube of the number of digits factored, while with classical algorithms the number of operations grows exponentially.[3] It will no doubt cross the mind of some readers here that rapid factorisation could lead to the cracking of the RSA encryption mechanism (and asymmetric encryption algorithms more generally). This is an absolutely critical issue for cybersecurity in banking. For the time being, however, quantum computers are not up to the job of factoring the numbers used in RSA encryption. So far, Shor’s algorithm has been used successfully to factor integers such as 15, 21 and 35, not 2,048-bit RSA keys.[4] What is more, besides fast computers, quantum mechanics enables the construction of theoretically unbreakable encryption [11], which has already been implemented in practice [12] and is even being considered in the Czech Republic [13].

But let’s go back to quantum algorithms. Grover’s algorithm enables rapid search in unstructured databases (such as image data and unstructured documents). It provides quadratic speedup over classical algorithms. For example, instead of 10,000 operations, only 100 (the square root of 10,000) are enough. Unfortunately, there are doubts about the practical use of Grover’s algorithm for working with databases [14], but mutations of it have found applications in solving optimisation problems [15,16]. Such problems often occur in the financial sector and in practical life generally (examples include logistical problems and production planning).

Besides Grover’s algorithm and its variants, there are several other optimisation algorithms [17,18]. These are mainly used in binary optimisation, in which the individual variables of a problem take values of 0 and 1 only. One example is the travelling salesman problem, which can also be modified to find arbitrage opportunities [19]. In the financial area, binary optimisation is also used in the construction of securities portfolios [20].

An interesting quantum algorithm for the financial sector is the HHL algorithm[5] [21], which enables fast solution of linear systems of equations (the speedup even being exponential in some cases). Such systems are often found in statistical data processing (such as linear regression) or its more advanced sibling, machine learning [22]. A purely financial application of the HHL algorithm is portfolio optimisation based on the Markowitz approach [23]. This overview of potential applications of quantum computers in the financial sector is far from exhaustive. Readers with a greater interest in the topic will find summaries of other possible applications in numerous articles [24,25,26].

Principle of operation

Now we have provided a brief overview of the possible uses of quantum computers, we will look at the principles of their operation and explain how they can solve some problems faster than classical computers.

All operations that take place on a classical computer are essentially the result of manipulating strings of bits, i.e. ones and zeros. Analogously, a quantum computer works with quantum bits called qubits. A qubit also takes values of 0 or 1, the same as a classical bit, but can additionally be in both states[6] at the same time. So, a qubit is a kind of mix of zero and one. The two states can be represented in any ratio — we say that a qubit is in a superposition of the 0 and 1 states. A qubit remains in superposition until it is measured or disturbed by an outside influence. At that point, one of the states is randomly selected and the qubit collapses into it. The probability of a qubit being in, say, state 0 after measurement depends on the ratio between states 0 and 1 in the superposition.

Although such behaviour may seem nonsensical (nothing can be in two states at the same time!), the quantum microworld is based on other principles than normal experience. For a better understanding of superposition, we can use the well-known Schrödinger’s cat thought experiment. Consider a cat penned up in a box together with an atom of a radioactive element, a hammer and a flask of poison. If the atom decays (with a probability of 50%, for example), the hammer shatters the flask and the cat dies. However, we don’t know whether or not the cat is alive until we open the box. The cat is simultaneously alive and dead, i.e. in a superposition of these states, until the box is opened (i.e. until measurement).[7]

Let’s go back to quantum computers and the importance of superposition for their functioning. As one qubit can simultaneously be in two states, two qubits can simultaneously be in four states (00, 01, 10 and 11), three qubits in eight states, four in sixteen states, and so on. That’s why it is difficult to simulate quantum systems on a classical computer. With an increasing number of qubits (or particles) forming the system, the number of possible states grows exponentially, and so do the memory demands and the number of computational steps. Superposition is therefore one of the factors that allows quantum computers to outperform classical computers. However, we’d like to draw attention to the common misconception that quantum computers are faster because superposition allows for parallel calculations (for example, that with four qubits it is possible to perform computations on 16 possible inputs at once). If that were the case, all quantum algorithms would show exponential speedup by comparison with classical ones, which, however, is not true (for example, Grover’s algorithm only provides quadratic speedup).

Let’s now move on to another phenomenon that plays a role in quantum computers outperforming classical ones, namely quantum entanglement. Like superposition, quantum entanglement has no analogy in the macroworld. If two or more qubits are entangled, the value of one qubit depends on the values of the others. An example of an entangled state is the superposition of the states 00 and 11 in a one-to-one ratio (a Bell state). Obviously, if we measure the first qubit and obtain, for example, a value of 0, the second qubit also automatically collapses to state 0, and if we measure it we obtain this state with a probability of 100% (and analogously for the measurement of state 1). However, the size of the speedup that a quantum algorithm provides relative to the classical approach has to be determined using relatively complicated mathematical procedures based on quantum mechanics and theoretical computer science. The role of superposition and quantum entanglement is by no means intuitive.

As mentioned above, calculations on a classical computer are based on bit manipulation. Likewise, a quantum computer needs to manipulate qubits in some way. Quantum gates analogous to the logic circuits in a classical computer are used for this purpose. Perhaps the simplest gate is the quantum version of logical negation, which changes the state of a qubit from 0 to 1 or vice versa. More interesting, however, is the Hadamard gate, which is capable of turning a qubit in state 0 into one in a superposition of states 0 and 1. The ratio of 0 to 1 in the superposition is equal, i.e. we have an equal chance of obtaining 0 and 1 after measurement. Controlled negation is another very important gate. It works with two qubits. If the first qubit is in state 1, the gate will negate the second one. If the first qubit is in state 0, the second qubit is not changed in any way. Of course, there are a range of other gates that allow any “mixing ratio” of states 0 and 1 to be set or quantum equivalents of logical operations to be implemented, but their description is beyond the scope of this article.[8]

Combining quantum gates creates quantum circuits that represent the quantum algorithm. The initial state of the quantum computer is gradually changed by this circuit until the final state is reached and subsequently measured. This process is repeated several times to obtain a probability distribution describing the final state. This distribution can then be used to derive the solution to the problem using classical computation. We will discuss this in more detail in a second instalment of this blog article about the possible future use of quantum computers in international reserves management.

Practical implementation

We now have a general idea of how a quantum computer works theoretically, but to use one in practice we have to physically implement it. There are various ways of creating a physical qubit. As mentioned above, a qubit can take two states, so we need a system that has at least two distinguishable states. One example is an electron, whose spin (rotation, roughly speaking) can take two values: +1/2 and -1/2.[9] So, the spin of an electron can be our qubit. At present, we also often encounter quantum computers based on superconducting qubits. These are implemented in Josephson junctions – special semiconductor chips containing metal surfaces separated by insulating material. At temperatures close to absolute zero, the metal acquires superconducting properties and the junctions start behaving in such a way that the electromagnetic energy stored in them can only take certain values. These values are distinguishable and thus enable qubit implementation.[10] It is worth noting that the extremely low temperature used (approximately 15 millikelvin) not only allows the qubit to operate, but also protects it from thermal noise, which could interfere with superposition and entanglement.[11]

Maintaining a superposition for the longest possible time (the so-called coherence time of a quantum state) is an important factor for the proper functioning of a quantum computer. The longer this time, the more complex (i.e. more time-consuming) the calculations that can be done on the computer. Extending coherence time is thus one of the biggest engineering problems faced by today’s quantum computers. In addition to qubits, quantum gates must be implemented. In the case of superconducting qubits, they take the form of modulated microwave pulses. There are also qubits based on the properties of photons (light particles), where gates can be implemented using optical elements such as prisms.

In this blog article, we have introduced some possible applications of quantum computers in finance and elsewhere, and above all, we have outlined how these computers work. We have thus explained the necessary theoretical minimum to discuss the possible future use of quantum computers in solving problems connected with the management of international reserves. Specifically, we will focus on algorithms for calculating risk metrics and quantum methods for optimising portfolios. We will perform all our calculations on a real superconducting quantum computer, IBM QuantumTM, which is available free of charge as a cloud service for research and educational purposes [29]. We will also discuss this computer in more detail in the second instalment of this blog article.

References:

[1] MARSHALL, S. J (2015): The Story of the Computer: A Technical and Business History. ISBN: 978-1546849070, pg. 58-69

[2] Ibid [1], pg. 302

[3] TRABESINGER, A. (2012) “Quantum simulation”. Nature Physics

[4] CHAKRABARTI S., R. KRISHNAKUMAR R., G. MAZZOLA, N. STAMATOPOULOS, S. WOERNER AND W. J. ZENG (2021): “A Threshold for Quantum Advantage in Derivative Pricing.” arXiv:2012.03819v3 [quant-ph].

[5] STAMATOPOULOS N., D.J. EGGER, Y. SUN, C. ZOUFAL, R. ITEN, N. SHEN AND S. WOERNER (2020): “Option Pricing using Quantum Computers.” Quantum

[6] EGGER, D. J., R. G. GUTIERREZ, J. C. MESTRE, AND S. WOERNER (2020): “Credit Risk Analysis using Quantum Computers.” IEEE Transactions on Computers.

[7] FEYNMAN, R. P. (1985): “Quantum Mechanical Computers.” Optics News, 11(2).

[8] DEUTSCH, D. AND R. JOZSA (1992): “Rapid solutions of problems by quantum computation.” Proceedings of the Royal Society of London A, 439.

[9] SHOR, P. W. (1994): “Algorithms for quantum computation: discrete logarithms and factoring.” Proceedings 35th Annual Symposium on Foundations of Computer Science.

[10] GROVER, L. K. (1996): “A fast quantum mechanical algorithm for database search.” Proceedings of 28th Annual ACM Symposium on the Theory of Computing (STOC).

[11] BENNETT, C. H., F. BESSETTE, G. BRASSARD, L. SALVAIL, AND J. SMOLIN (1992): “Experimental Quantum Cryptography.” Journal of Cryptography, 5(1).

[12] CHEN, Y. A., Q. ZHANG, T. Y. CHEN, W. Q. CAI, S. K. LIAO, J. ZHANG, K. CHEN, J. YIN, J. G. REN, Z. CHEN, S. L. HAN, Q. YU, K. LIANG, F. ZHOU, X. YUAN, M. S. ZHAO, T. Y. WANG, X. JIANG, L. ZHANG, W. Y. LIU, Y. LI, Q. SHEN, Y. CAO, C. Y. LU, R. SHU, J. Y. WANG, L. LI, N. L. LIU, F. XU, X. B. WANG, C. Z. PENG, AND J. W. PAN (2021): “An integrated space-to-ground quantum communication network over 4,600 kilometres.” Nature, 589.

[13] VOTRUBA V. (2021): “Úřady či jaderné elektrárny propojí kvantová síť. Umožní extrémně bezpečný přenos dat bez rizika nabourání zvenčí.” On-line: https://archiv.hn.cz/c1-66965770-urady-ci-jaderne-elektrarny-propoji-kvantova-sit-umozni-extremne-bezpecny-prenos-dat-bez-rizika-nabourani-zvenci

[14] VIAMONTES F.V., I.L. MARKOV, AND J.P. HAYES (2004): “Is Quantum Search Practical?.” arXiv:quant-ph/0405001v1

[15] DURR, C. AND P. HOYER (1996): “A quantum algorithm for finding the minimum.” arXiv:quantph/9607014.

[16] GILLIAM, A., S. WOERNER, AND C. GONCIULEA (2021): “Grover Adaptive Search for Constrained Polynomial Binary Optimization.” Quantum, 5.

[17] FARHI, E., J. GOLDSTONE, AND S. GUTMANN (2014): “A Quantum Approximate Optimization Algorithm.” arXiv:1411.4028v1 [quant-ph].

[18] BARKOUTSOS, P. K., G. NANNICINI, A. ROBERT, I. TAVERNELLI, AND S. WOERNER (2020): “Improving Variational Quantum Optimization using CVaR.” Quantum, 4.

[19] ROSENBERG G. (2016): “Finding optimal arbitrage opportunities using a quantum annealer.” 1QBit.com white paper. On-line: http://1qbit.com/whitepaper/arbitrage/

[20] ELSOKKARY, N., F. S. KHAN, D. L. TORRE, T. S. HUMBLE, AND J. GOTTLIEB (2017): “Financial Portfolio Management using Adiabatic Quantum Optimization: The Case of Abu Dhabi Securities Exchange.” IEEE High-performance Extreme Computing 2017 conference proceedings.

[21] HARROW, A. W., A. HASSIDIM, AND S. LLOYD (2009): “Quantum Algorithm for Linear Systems of Equations.” Physical Review Letters, 103(15).

[22] DUAN, B., J. YUAN, C.-H. YU, J. HUANG, AND C.-Y. HSIEH (2020): “A survey on HHL algorithm: From theory to application in quantum machine learning.” Physical Letters A, 384(24).

[23] REBENTROST, P. AND S. LLOYD (2018): “Quantum computational finance: quantum algorithm for portfolio optimization.” arXiv:1811.03975 [quant-ph].

[24] ORÚS, R., S. MUGEL, AND E. LIZASO (2019): “Quantum computing for finance: Overview and prospects.” Reviews in Physics, 4.

[25] EGGER, D. J., C. GAMBELLA, J. MARECEK, S. MCFADDIN, M. MEVISSEN, R. RAYMOND, A. SIMONETTO, S. WOERNER, AND E. YNDURAIN (2020): “Quantum computing for Finance: state of the art and future prospects.” IEEE Transactions on Quantum Engineering, 1.

[26] HULL, I., O. SATTATH, E. DIAMANTI, AND G. WENDIN (2020): “Quantum Technology for Economists.” Sverige Riksbank Working Paper Series, 398.

[27] BARENCO, A., C. H. BENNETT, R. CLEVE, D. P. DIVINCENZO, N. MARGOLUS, P. SHOR, T. SLEATOR, J. A. SMOLIN, AND H. WEINFURTER (1995): “Elementary gates for quantum computation.” Physical Review A, 52.

[28] KJAERGAARD, M., M. E. SCHWARTZ, J. BRAUMULLER, P. KRANTZ, J. I.-J. WANG, S. GUSTAVSSON, AND W. D. OLIVER (2020): “Superconducting Qubits: Current State of Play.” Annual Review of Condensed Matter Physics, 11.

[29] https://quantum-computing.ibm.com/docs/

[30] https://azure.microsoft.com/en-us/solutions/quantum-computing/#microsoft-approach


Keywords

Quantum computers, international reserves, portfolio optimisation, risk measurement

JEL Classification

C61, C63, G11


[1] This involves finding the shortest route (in terms of distance, time or cost) that visits each of a series of cities just once and returns to the starting point. In terms of graph theory, we are seeking a Hamiltonian cycle. The complexity of the task increases with the factorial of the number of cities. For instance, for four cities there are no more than 24 (1·2·3·4) possible routes, but for ten cities the figure is as high as 3,628,800 (1·2...9·10).

[2] A constant binary function returns the same value – either 0 or 1 – for all its inputs. A balanced function returns 0 for half of the inputs and 1 for the other half.

[3] More accurately, it grows exponentially with the cube root of the number of digits of the number factored.

[4] There are also quantum algorithms that enable factorisation using binary optimisation, but the highest integer factored to date is in the order of millions, still much lower than needed to break RSA encryption.

[5] The name of the algorithm is the abbreviation of the names of its designers, Harrow, Hassidim and Lloyd.

[6] In the “quantum industry”, the term state is used more often than value..

[7] Mrs Schrödinger to Mr Schrödinger: Oh Erwin, what did you do to that cat? It is half-dead!

[8] Readers wishing to know more about quantum gates can refer to quite an extensive literature, for example [27].

[9] We should point out that spin is a purely quantum property of elementary particles and the analogy with rotation is inaccurate. An electron (or any other elementary particle) is not a rotating sphere as often depicted in high school textbooks.

[10] This description of the operation of a superconducting qubit is rather approximate. Readers interested in this topic should consult the literature, for example [28].

[11] It is interesting to note that the temperature of interstellar space is 2.7 K (2,700 mK), i.e. very high compared with the requirements of superconducting quantum computers. We should add that Microsoft [30], for example, is working on the concept of a topological quantum computer, which should theoretically work at room temperature and be noise-resistant. However, its construction is contingent on the discovery of so far only theoretically predicted particles called anyons.