Current state-of-art tools putting together quantum physics and artificial intelligence
Data science and machine learning are definitely among the buzz words nowadays. At startup competitions and conferences I have seen too much. AI-trained beer draft to give you the perfect taste, plastic bag with sensor training IoT systems based on machine learning on how much people swing them, toilets with machine learning based system to optimize lights usage. Seriously? Is this innovation?
Either people just put this technology anywhere to sound cool, or machine learning is the “new electricity” and therefore there is nothing cool anymore about it.
About 10–15 years ago, there was another buzz word which was popping up a lot, it had a more esoteric association and it was more difficult to use in everyday application: quantum (the fundamental theory describing nature at the scale of atoms and subatomic particles). Ever seen anyone with a quantum-based coffee machine? Or quantum based-toilet?
Well, maybe things will change as we are on the edge of merging both technologies.
Quantum machine learning is the intersection between quantum computing and AI that might change what the future of computing looks like.
Before we continue, to make things friendly let’s brush up what we are talking about:
- Machine Learning is a subset of artificial intelligence (AI), which allows systems to learn and to improve from experience, without being explicitly programmed. It is generally used for classification tasks.
- Quantum computing:is the use of quantum mechanical phenomena to perform computations.
The rest of this article comprises
- a brief introduction to quantum machine learning,
- a summary of the current used programming languages,
- a summary of the available services.
In classical computers, bits are stored as either a 0 or a 1 in binary notation. Quantum computers use quantum bits — or qubits — which can be both 0 and 1, this is called superimposition. Last year Google and NASA claimed to have achieved quantum supremacy, raising some controversies though. Quantum supremacy means that a quantum computer can perform a single calculation that no conventional computer, even the biggest supercomputer can perform in a reasonable amount of time. Indeed, according to Google, the “Sycamore” is a computer with a 54-qubit processor, which is can perform fast computations.
Machines like Sycamore can speed up simulation of quantum mechanical systems, drug design, the creation of new materials through molecular and atomic maps, the Deutsch Oracle problem and machine learning.
When data points are projected in high dimensions during machine learning tasks, it is hard for classical computers to deal with such large computations (no matter the TensorFlow optimizations and so on). Even if the classical computer can handle it, an extensive amount of computational time is necessary.
In other words, the current computers we use can be sometime slow while doing certain machine learning application compared to quantum systems.
Indeed, superposition and entanglement can come in hand to train properly support vector machine or neural networks to behave similarly to a quantum system.
How we do this in practice can be summarized as
- Log into your IBM, Xanadu or whatever quantum cloud.
- Set up the number of shots (or attempts) your algorithm will take
- Set up the number of qubits the circuit will have (the number of qubits should be equivalent to the number of features in your dataset)
- run the machine learning algorithm having some quantum computing behaviour.
In practice, quantum computers can be used and trained like neural networks, or better neural networks comprises some aspects of quantum physics. More specifically, in photonic hardware, a trained circuit of quantum computer can be used to classify the content of images, by encoding the image into the physical state of the device and taking measurements. If it sounds weird, it is because this topic is weird and difficult to digest. Moreover, the story is bigger than just using quantum computers to solve machine learning problems. Quantum circuits are differentiable, and a quantum computer itself can compute the change (rewrite) in control parameters needed to become better at a given task, pushing further the concept of “learning”.
2. PROGRAMMING LANGUAGES
The most common libraries are Qiskit and Pennylane
Qiskit [quiss-kit] is an open source SDK for working with quantum computers at the level of pulses, circuits and algorithms. It provides tools for creating and manipulating quantum programs and running them on prototype quantum devices. It is available in Python. The way how it works is implemented is having a hidden layer for a neural network using a parameterized quantum circuit, in this way creating a quantum neural networks.
Another popular tool is Pennylane. This is also written in Python and multi-platform. It is also easily integrable with Qiskit. Among the possibilities, this library can perform parameter-shift within a gradient descent optimization, leading to a quantum gradient descent.
There are several services that allow you to perform quantum machine learning. Mostly from 2 big corporations (Google and IBM) and 2 very promising startups (Rigetti and Xanadu).
IBM has launched The IBM Q Experience. It is an online platform that gives users in the general public access to a set of IBM’s prototype quantum processors via the Cloud. The service is complete of a circuit composer, Python support and Qiskit.
Forest by Rigetti Computing, is a toolsuite for quantum computing. It includes a programming language and development tools.
Xanadu is the first phonotic hardware based cloud from a Canadian start-up. The Photonic quantum processors can handle 8-, 12 and 24-qubit chips While the Rigetti’s and IBM’s system use the qubit model, Xanadu is developed a continuous variable hardware. Continuous variables is the area of quantum information science that makes use of physical observables (quantity that can be measured). In simpler words it means that Xanadu cloud measures photons and therefore its hardware is truly photon based.
The field of quantum machine learning is still in its infancy, but already some successful applications have been published and it is expected that will provide more opportunity in the future.
This article was originally published in Medium.