#### Tales from the Thales International Quantum Hackathon

From the 11th – 14th May April 2023, Cameron, one of our Mathematical Consultants, attended the Thales International Quantum Hackathon organised by QuantX. Ten teams across five countries competed to solve real world problems using quantum computing. Within each country, the two teams tackled two use cases over the four days and presented their solutions to a panel of Thales experts with the winning team from each country advancing to a grand finale to be held later in the year. We asked Cameron to tell us about the use cases and quantum solutions he explored at the event:

### What is Quantum Computing?

Quantum computers use the laws of quantum mechanics to perform calculations and computations on “qubits”. Qubits are like classical bits of information; , except they can be in a “superposition” of both 0 and 1 at the same time. The other key property of quantum mechanics that allows for quantum computing is the principle of entanglement. This means that two qubits can be in a combination of the states 00, 01, 10, or 11 at the same time. Effectively the number of classical bit-strings you can encode with * n* qubits is

**2**. If used correctly it allows for a huge number of calculations to be done effectively in parallel and consequently saving both time and memory.

^{n}Unfortunately, while all of this is possible in theory, putting it into practice is proving quite difficult. The qubits that we can currently produce are very sensitive to interference and are prone to errors while calculations are being performed. We are currently restricted to only performing short calculations with relatively few qubits. This restriction has severely limited the application of quantum computing to real world applications since classical computers can still easily outperform their quantum counterparts.

Things are improving, for instance IBM have a roadmap to develop computers with over 5000 qubits by 2025, at which point we should be able to apply error-correcting techniques. However, in the nearer term, companies need to both understand which of their problems could be improved with quantum computers and quantify the potential benefit to justify investment.

### What was the aim of the Thales International Quantum Hackathon?

The hackathon brought together industry, academia, and quantum computing providers from across the globe to demonstrate the applicability of quantum computing to real world problems. I was invited to participate in one of the UK teams because of Smith Institute’s advanced technical capability when solving industrial mathematics problems and because of our keen and active interest in quantum computing.

### What problems did you solve and where was the quantum advantage?

The UK teams were presented with two very different use cases. The first was to apply quantum computing to detect anomalies in time series data while the second was to use quantum optimisation for mission planning.

*Anomaly detection *

Finding anomalies is essential across all sorts of fields and can be applied to data such as sonar/radar, cardiographs, seismology, rainfall, and many, many more. Most existing techniques for anomaly detection first extract a series of “features” from the data, and then perform some analysis on these features to detect when anomalies occur. In principle the more features you have, the better your anomaly detection should be, but more features mean more computation and these techniques can become quite slow. Our hope was to demonstrate that quantum computers might be able to help speed this up.

We investigated two distinct approaches. The first was based on the RXD algorithm, which classifies anomalies using a statistical technique which involves calculating the inverse of the co-variance matrix of the training data. Classical techniques for inverting matrices and performing multiplication have a complexity of **O(K ^{3}) **where

*is the number of features we are using. However, a quantum algorithm called HHL can invert a matrix with a complexity of only*

**K****O(log(K))**. We were able to implement and use this technique to detect anomalies, but we also found a catch: preparing the quantum state containing the classical features bottlenecks the whole process as this has a complexity of

**O(K)**. One exciting alternative in the future may be to somehow convert the time-series data directly to quantum states or to directly use quantum sensors.

Our second approach was to use a hybrid neural network to classify feature vectors as “anomalous” or “not anomalous”. A hybrid neural network is much the same as a classical deep neural network (DNN) except that some of the classical layers are replaced with quantum layers containing tuneable quantum computations. There is some evidence that hybrid neural networks may perform better than classical DNNs in certain settings, although they also have some problems. It was quite easy to apply a hybrid neural network to solve this problem but given the limitations of quantum hardware it is difficult to evaluate how much quantum advantage this, or similar hybrid deep learning approaches would provide.

*Mission Planning*

Our second use case was to apply quantum computing to plan how to use a team of drones to complete surveillance tasks at several different locations. While our example considered drones, analogous problems can be found in almost all industries with examples including managing supply chains, choosing where to place sensors, dispatching services such police patrols or car breakdown mechanics, or controlling electricity networks. Mathematically these problems can all be cast as mixed integer programs (MIPs), which are optimisation problems containing decisions about both discrete and continuous variables. The challenge with MIPs is that the discrete decision variables make them much harder to solve computationally.

The hope is that quantum computers might be able to help solve this computational challenge. Unfortunately, the quantum algorithms that are available for optimisation problems can only solve binary optimisation problems, where all the decision variables can be either 0 or 1. Therefore to solve our drone problem on a quantum computer we had two options. The first option would have been to express all the continuous variables in our mathematical formulation as a binary representation, in the same way that classical computers store continuous numbers. This works well for classical computing because we have access to plenty of classical bits we can easily store and manipulate when we need to. However, if we were to do this on a quantum computer, we would rapidly run out of qubits for even toy problems with just a few variables.

Instead, we reformulated our problem so that it could be directly cast as a binary optimisation. This involved making some approximations to fit the continuous parts of the problem onto a discrete graph so that we could describe it using binary variables. Mathematical reformulation is an important, and often overlooked, step when solving any real-world problem efficiently, and becomes especially important for quantum computing.

Once we had our reformulation, we were able to solve it using a DWave quantum computer and the results compared well to the solution we obtained classically using a commercial optimization solver. Interestingly, while the quantum processing time was comparable to the classical solve time, the set-up time needed for the quantum computer meant that overall, it took a few seconds, compared to milliseconds for the classical solver. It is reasonable to expect that for larger problems where the set-up overhead represents a smaller fraction of the computation time the quantum computer could prove to be competitive, or possibly quicker than the classical implementation. This problem of overheads feels very similar to the early days of GPUs, and look how revolutionary they turned out to be!

### How does the future look for real world applications of quantum computing?

Following the hackathon, I am cautiously optimistic about the future of quantum computing. Within a very short time, it was possible to design and implement quantum solutions to two real-world problems with wide applicability. While the quantum solutions are not yet competing with classical ones, improvements in hardware over the next five to ten years may see this start to change. I was also impressed at the ease with which we were able to get something working and deploy our implementations on real quantum hardware.

The event illustrated an opportunity that companies from all sectors should take to start engaging with “quantum-readiness”. The first step is to identify which computationally expensive processes within a system might see a quantum advantage. This will vary from system to system, but generally optimisation or machine learning problems are good candidates. Second is to experiment with reformulating the problem and explore what quantum algorithms might be applicable. The final step is to test out these solutions by implementing them using any of the software libraries available such as Qiskit, tket or Pennylane.

The event also highlighted the importance of collaboration between experts from different fields when developing quantum solutions. While experts in quantum computing are clearly important, there is also an important role for mathematicians to play in modelling and reformulating problems so that they can be solved using quantum algorithms. Additionally, since most if not all quantum solutions are going to be hybrid, involving both classical and quantum hardware, experts in data science and AI/ML will continue to be essential. The most important adaptation that all of these experts need to make in order to be part of a successful quantum eco-system is to reach across the boundaries of their own fields and to upskill on the techniques and approaches applied in the other fields. Only with a workforce of experts who are literate in mathematics, data science and quantum will we be able to realise the potential of quantum computing.

Finally, I would like to thank Thales and QuantX for organising such a great event. It is great to see the interest and enthusiasm around quantum computing, and I hope this can develop into a growing annual event.