Quantum programming: a major technological challenge

Quantum programming: a major technological challenge

Ventio is acquiring expertise in quantum programming, and is presenting its vision for the development of predictive models in healthcare with quantum artificial intelligence.

1 –  The rise of quantum processors and their disruptive applications

Quantum computing is undoubtedly the next technological revolution in many digital and industrial sectors. The major economic power, including Europe, and the major digital companies are investing massively in the subject. Microsoft, Google, IBM, Atos, etc… are developing codes capable of interfacing with quantum processors, which are gradually becoming accessible online.

The potential applications of these technologies are various:

  • In cybersecurity with, on the one hand, secure communications with quantum encryption keys, and on the other hand, calculation capacities that enable codes to be broken, including the generation of truly random numbers for data encryption.
  • In industry, it is the possibility of solving complex design problems that would require very large classical computing resources, especially for simulation.
  • In finance, it is, for example, more efficient risk prediction.
  • In healthcare, it is opening up massive simulations for the design of new drugs, or more efficient predictive models of diseases.

Although many challenges remain to be met from the point of view of the processors themselves (particularly with regard to error correction and the ability to store quantum information for a sufficiently long period of time), these technologies can nevertheless be used as they stand.

2 – Quantum is first of all about physics

Since the development of quantum physics at the beginning of the 20th century, this theory has never ceased to be questioned because it defies the classical and conventional observation we have of the world.

The pioneering scientists of that time have themselves had difficulty in accepting and understanding it. However, this did not prevent them from using it and verifying that it can describe extremely varied microscopic phenomena, involving the atom and light for example. Thus quantum physics has various applications involving, for example, optics or magnetic resonance for molecular analysis and imaging.

In quantum physics, a particle can be in several states at once. This is called a superposition of states. The transposition of this property into computer science is the qubit.

Whereas in classical computing, we work with logical bits that are determined because they are “true” or “false”, “0” or “1”; quantum computing is built from the qubit that can be both “0” and “1”. On the other hand, the qubit only provides “0” or “1” when we try to determine its value in a certain way.

If a 4-bit register (4 boxes in which we put a “0” or “1” bit), produces 16 possible states (0000, 0001, 0011 etc.), a 4-qubit register has 16 states in superposition at the same time. A quantum computer therefore does not explore one combination, one path at a time, but all paths at the same time.

The superposition state can be used as a probabilistic model even before making a choice (a measurement)! It is one of the strengths of quantum computing to be able to manipulate undeterminated objects to solve complex statistical problems.

3 – Solving difficult problems statistically with quantum programs

Quantum algorithms can be considered as a set of small classical operations performed on quantum objects. These operations include, for example, the initialisation of qubits, the creation of superposition of states, entanglement between qubits, and measurement. However, the fact remains that quantum programs require a quantum processor on which to run. While States and industry are working on quantum processors as such, simulators are now available to run on classical systems what these programs would look like on a quantum processor. For example, the software packages associated with Microsoft’s Qsharp language allow a quantum computer to be simulated in a classical environment and thus quantum programs to be tested.

At Ventio, we have tested a few algorithms on this environment, including Grover‘s, which is among the most popular. This is an algorithm for finding solutions that match given criteria in a set. Grover’s algorithm isolates solutions matching the criterion with time and resources much less than what is needed by conventional search algorithms.

At Ventio, we have applied this algorithm to the “large number” factorisation problem that poses a threat to current encryption methods. Instead of testing all possible integers to see if they are divisors of a number, we use Grover’s algorithm. This algorithm simultaneously searches for solutions that meet the criterion (in this case, the integers that divide the integer in question). The search is carried out among all the integers below, to the first power of 2 above the integer to be factorised.

For each search with Grover, there is an amplification phase with an optimal number of iterations for which we have the best rate of appearance of these solutions. In each application, the integers that are divisors are therefore most likely to be obtained when the measurement is performed. By doing the experiment several times, it will then be easy to isolate the integers that are divisors by looking at their occurrence. This is illustrated in the figure below extracted from quantum programming experiments that we performed.

Factorisation of the number 21 with Grover’s algorithm. The most probable integers are 1, 3, 7 and 21, which are all divisors and which appear with a greater occurrence than the other integers.

Although this is an approximate picture, it can be considered a game of Yahtzee. In Yahtzee, you take the 5 dice in your hand and the goal is to obtain particular combinations, such as straights, full house, four of a kind, or, supreme objective, 5 identical dice. The quantum algorithm is the possibility to shake your hand in such a way that once thrown on the board, you have a better chance of getting a winning combination. Indeed, the way the dice clash in the hand will allow to introduce this correlation between the dice and to win the game more easily.

For the same factoring problem, we note that there is the Shor algorithm. This algorithm is said to be more efficient for factoring than all classical algorithms and rivals Grover.

In concrete terms, the implementation of these algorithms on a real quantum computer would seriously compromise RSA encryption, which is based on the product of two large prime numbers. The use of quantum programs for probabilistic problems does not stop there, and they are a natural fit for machine learning and artificial intelligence.

4 – Quantum AI – a representation suitable for learning probability densities

One of the major perspectives of quantum computing is its use in the field of artificial intelligence and machine learning, especially deep learning. Indeed, given the performance and the intrinsic probabilistic and statistical aspect of quantum objects, quantum algorithms seem naturally compatible with AI and machine learning, particularly for problems of classification, detection, prediction and analysis.

An example of this is the strategy followed by Google, which recently introduced the quantum extension of its Tensorflow machine learning language. Tensorflow quantum offers the possibility of programming and training hybrid data models, including both parameterisable quantum circuits and classical layers.

To put it simply, the statistical average of a measurement made after the quantum layers links to the rest of the classical model and allows the application of gradient descent methods to progressively update the parameters of the quantum circuit. This amounts to learning the quantum algorithm to perform a given task.

At Ventio, we are working on hybrid models with Tensorflow quantum. To quickly illustrate this, let’s look at the classical problem of character recognition using quantum models and the MNIST database which contains tens of thousands of thumbnails with handwritten digits.

Illustration of the MNIST database of handwritten digits.

The challenge is to classify these images with quantum models. The first step is therefore to convert the MNIST images to qubits. Then, a quantum circuit model is defined and trained by comparing the expectation with the expected value.

To date, the performance of these first quantum models to classify these data does not beat classical models which have many more parameters and therefore a sufficient representation capacity. Nevertheless, it is hoped that quantum will beat classical for certain data and tasks.

At Ventio, we are focusing our R&D efforts on these new disruptive technologies with the development of expertise in quantum programming. The internal challenges cover the processing of sensitive health data. We also offer you an initiation as well as access to private and secure quantum programming environments. Let the wind of innovation carry you along, contact us!