Barclays (and others) strive for machine learning at quantum speed

Embryonic work on quantum neural networks raises hope of faster, more accurate models

  • Quantum computing experts are developing a method to speed up machine learning models in finance.
  • The work has been tested on time series data such as stock prices.
  • Until now, a lack of suitable hardware has slowed progress in real-world applications of quantum computing.
  • The new method converts quantum outputs into binary state and could prove a viable alternative to quantum memory.

Fans of Douglas Adams’ sci-fi work, The Hitchhiker’s Guide to the Galaxy, may be familiar with the Babel fish. The tiny animal can be inserted in the ear and translates any foreign language for its host.

Financial technologists may be on their way to creating their own Babel fish: a circuit that acts as an interpreter between quantum machines and regular computers. Barclays recently used the circuit to develop a quantum version of a neural network. It was able to forecast stock prices more accurately than a traditional machine learning model.

The performance uplift wasn’t huge – but that’s not the point. The experiment was one of the first times that quantum computers have combined with regular ones-and-zeroes machines in finance. The work might bring real-world quantum machine learning a step closer, and help unlock quantum computing’s speed and brainpower for everyday problems like volatility prediction, asset pricing and algorithmic trading.

The circuits – known in full as parameterised quantum circuits (PQCs) – are a familiar concept to students of quantum science. They were devised several years ago to help circumvent a stubborn problem with quantum computers: lack of memory.

A quantum computer is like a Mensa champion with chronic amnesia. The device boasts exponentially more computing power than regular binary machines but quickly forgets its calculations. The memory hardware that technologists are developing for quantum computers, known as quantum random access memory or QRAM, is not yet available for use.

PQCs bypass the need for QRAM because they can translate the output produced by quantum computers into a classical, binary state. This means the data from a quantum neural network can be fed into a traditional computer, which tunes the parameters and then feeds the results back into the quantum circuit, in a repeating cycle.

“A general technical benefit of PQCs is that since the input data and the output results are classical values they can be implemented without QRAM,” says Lee Braine, managing director in Barclays’ chief technology office.

Braine adds that PQCs are especially useful for “noisy intermediate-scale quantum” computers – a term for the current generation of quantum machines. As the name suggests, the outputs of these computers have a lot of unwanted data, or noise. Braine says PQCs have a “technical advantage” when they are used in noisy computers.

Researchers at HSBC agree. The bank is part of a consortium of 12 European companies and laboratories that published a research paper last year, edited by Maria Nogueiras, head of traded risk model development for FX emerging markets and equity at HSBC. The paper notes that recent advances in quantum machine learning algorithms are “exciting, especially because it has been shown that quantum machine learning can be robust when implemented in noisy hardware”.

A team of academics in the US and France also see promise in the use of PQCs. In a recent paper, they note that the technique can help practitioners convert classical data into quantum states and perform fast computations. This is relevant given that QRAM “may be difficult to construct”. The HSBC paper reckons that QRAM is not expected to be physically achievable “in the near future”.

Need for speed

Machine learning is widely used across the financial industry, from credit risk modelling to regulatory stress-testing, anti-money laundering to liquidity risk. The potential for quantum computing to turbo-charge the technique has led banks such as Bank of America, HSBC, JP Morgan and Standard Chartered to explore quantum machine learning for various tasks, including derivatives pricing and fraud detection.

“We are very interested in the machine learning speed-ups from quantum computing,” says Jon Dee, managing director in JP Morgan’s equities quantitative research team. “Those could eventually absolutely see production use.”

JP Morgan’s technologists have deep pockets: the bank has committed to spend $12 billion on fintech in 2022. To aid its efforts, the bank has access to seven quantum computers from seven different companies. JP Morgan is also known for its deployment of deep hedging – sophisticated hedging strategies powered by neural networks, which automatically factor in market frictions such as transaction costs, liquidity constraints and risk limits. Deep hedging eschews risk sensitivities, or Greeks, that are the bedrock of classic financial models, notably Black-Scholes. Instead, it relies on historical data for its hedging strategies.

Dee says if deep hedging worked on a quantum computer “it would be fantastic, but the size of the problem might make that challenging”.

Marco Pistoia, head of JP Morgan’s research and engineering lab, says there is potential for reducing the amount of approximation required in machine learning through quantum computing. But he agrees that “deep hedging is so complex that current quantum computers may not be powerful enough to work on it effectively yet”.

The road hump is the absence of suitable quantum hardware. Quantum computers work differently from regular binary computers. Whereas the computer bit exists as a one or a zero, a quantum bit – or qubit – can be any combination of these two states. The behaviour of one qubit is also linked to that of another in a process known as entanglement.

These properties make quantum computers powerful – but unstable. Qubits are flighty creatures: they need to be stored at exactly the right temperature and shielded from electronic pollution. To improve their reliability, “physical” qubits can be knitted together to form “logical” qubits.

IBM in November announced that its Eagle quantum processor can manage 127 qubits. Its previous Hummingbird device maxed out at 65 qubits. The next iteration due to be released this year, Osprey, will bump that up to 433 qubits with a 1,121 qubit-machine due by the end of next year. But these are “noisy” qubits and not error-corrected. The number of error-free “logical” qubits is a fraction of that total, around five.

Scientists measure the computational capabilities of a quantum machine using a metric known as quantum volume, which is an expression of the number and fidelity of qubits. Honeywell joint venture Quantinuum’s “trapped ion” hardware currently has the largest quantum volume of 2,048 noisy qubits, which translates to 12 logical qubits.

The problem is storing all the outputs of the ever-expanding number of logical qubits. Data in a quantum state cannot be stored on traditional hardware. So far, researchers have been able to run proofs of concept with relatively small input datasets. Even then, there are limits. One example is combinatorial or portfolio optimisation: this can be specified with relatively little input data – for instance, the covariances of the returns and expected returns – but to find the optimal portfolio, an exponential number of combinations will need to be checked, and the qubits will lose their state before that can be done.

The difficulty is magnified with machine learning, which requires large input datasets. QRAM would help by allowing quantum computers to store static data – if only it existed in the required form. Braine says there are two promising types of architecture for QRAM: bucket brigade and quantum forking. Neither has reached construction phase, but quantum forking could be available in five years, Braine estimates.

In the absence of viable quantum memory, researchers have turned to PQCs.

Cases in point

Barclays trained its quantum neural network using three relatively large data sets: Apple stock prices, British Airways owner IAG stock prices, and bitcoin prices. The test showed it was possible to train and update a quantum machine learning model within a few minutes rather than a few hours as is currently the case with traditional machine learning models. That would make the model more adjustable to sudden market changes.

Barclays’ lead data scientist Dimitrios Emmanoulopoulos says: “We see a property of the quantum circuit where they are able to model time series more accurately using much fewer free parameters, in the sense that they need less samples in order to disclose any underlying repetitive patterns or other periodic signals.” The bank published the results of its test in a February paper co-authored by Emmanoulopoulos and Sofija Dimoska, who has since left Barclays to join Goldman Sachs.

As an example, while 1,000 data points might be needed to effectively sample a typical Gaussian distribution in classical machine learning, “using a parameterised quantum circuit would only require 60 or so data points”, says Emmanoulopoulos.

Barclays used Google tools TensorFlow Quantum and Cirq for its experiment, although it also partners with IBM on its Qiskit software.

A quantum computing finance expert says Barclays’ work is noteworthy. He adds that application of PQCs to finance-related problems has become more common, but “the main point is that banks are doing some serious research in this space. Four to five years ago not a single bank would publish a paper like this.”

Barclays is looking at applying the research to areas such as predicting volatility, pricing assets and algo trading. The bank also believes quantum computers could help weed out fraud using advanced algorithms to scrape transaction data, although the big datasets needed – covering at least a year of activity consisting of a few billion transactions – means it will be a challenging use case. Large datasets are required because fraudulent transactions are rare: one in every 200,000 transactions on average.

Braine at Barclays says: “In future it’s likely our quantum computing research will delve further into machine learning. We will be considering particular business applications such as fraud detection, rather than looking at abstract quantum computing problems.”

Pistoia at JP Morgan says fraud detection using traditional machine learning techniques is hindered by the scarcity of data for training purposes. “So the algorithms have to be more clever to avoid false positives and false negatives,” he says. “For this reason, quantum computing may lend itself very well to fraud detection.”

Bank of America sees potential uses for quantum computing in portfolio asset selection and collateral optimisation. But real-world application of the technology is some way off, says Brice Rosenzweig, co-head of Bank of America’s quantitative strategies and data group.

“My guess is in five to 10 years’ time, some of this technology will be more efficient than existing technology in running optimisation,” he says.

Braine says Barclays’ work is still in “research mode”. He adds: “It’s genuine voyage of discovery and so we’re not looking to put into production the research that we’re currently doing in the quantum computing space.”

A quantum step for derivatives pricing

In its latest work on quantum computing, Goldman Sachs has introduced a quantum algorithm to compute the market risk of derivatives. The bank is applying quantum amplitude estimation (QAE), an algorithm with the potential to achieve a quadratic speed-up for applications classically solved through Monte Carlo simulations.

In a paper published in November, Goldman Sachs and IBM researchers use a quantum method to calculate Greeks. The method looks to assess the advantage gained from using quantum computing, and finds that QAE can reduce the required computer clock rate by about 50 times.

Together with academic and industry collaborators, the bank’s previous research includes developing two new designs of algorithms for amplitude estimation. The work delivered improvements to a key subroutine of these algorithms called low depth amplitude estimation, reducing hardware requirements. The subroutine was benchmarked on quantum hardware available today – a trapped ion quantum computer.

Nikitas Stamatopoulos, vice-president in quantum computing research and development at Goldman Sachs, says the bank’s research “connects theoretical quantum advantages to large and valuable problems across finance”.

For example, he says, “we published an end-to-end algorithm for path-dependent derivative pricing and estimated the quantum computer specifications that would be needed for that problem.” Pricing of autocallables and target accrual redemption forward derivatives were the benchmark use cases.

HSBC has also focused on derivatives pricing applications of quantum computing. Its paper edited by Maria Nogueiras describes “concrete applications” to the problem of pricing European vanilla options, and like Goldman Sachs the use case employs QAE.

However, HSBC and its co-authors propose an alternative to QAE – a ‘quantum coin’ algorithm belonging to the same family of Grover algorithms – which they say maintains the promise of quadratic speed-up with a simpler implementation at the hardware level.

Steve Suarez, HSBC global head of innovation for global functions, says: “Quantum computing could be a game-changing technology for financial services and is an important part of our innovation agenda.”

He adds the bank is investing in upskilling staff through internal training programmes as well as actively recruiting quantum computing research scientists, to build out a dedicated quantum capability within its innovation team. It is also looking at quantum start-up companies for potential strategic investments and collaboration opportunities.

Additional reporting by Mauro Cesa. Editing by Alex Krohn

  • LinkedIn  
  • Save this article
  • Print this page  

Only users who have a paid subscription or are part of a corporate subscription are able to print or copy content.

To access these options, along with all other subscription benefits, please contact [email protected] or view our subscription options here: http://subscriptions.risk.net/subscribe

You are currently unable to copy this content. Please contact [email protected] to find out more.

You need to sign in to use this feature. If you don’t have a Risk.net account, please register for a trial.

Sign in
You are currently on corporate access.

To use this feature you will need an individual account. If you have one already please sign in.

Sign in.

Alternatively you can request an individual account here: