-
Better than classical? The subtle art of benchmarking quantum machine learning models
Authors:
Joseph Bowles,
Shahnawaz Ahmed,
Maria Schuld
Abstract:
Benchmarking models via classical simulations is one of the main ways to judge ideas in quantum machine learning before noise-free hardware is available. However, the huge impact of the experimental design on the results, the small scales within reach today, as well as narratives influenced by the commercialisation of quantum technologies make it difficult to gain robust insights. To facilitate be…
▽ More
Benchmarking models via classical simulations is one of the main ways to judge ideas in quantum machine learning before noise-free hardware is available. However, the huge impact of the experimental design on the results, the small scales within reach today, as well as narratives influenced by the commercialisation of quantum technologies make it difficult to gain robust insights. To facilitate better decision-making we develop an open-source package based on the PennyLane software framework and use it to conduct a large-scale study that systematically tests 12 popular quantum machine learning models on 6 binary classification tasks used to create 160 individual datasets. We find that overall, out-of-the-box classical machine learning models outperform the quantum classifiers. Moreover, removing entanglement from a quantum model often results in as good or better performance, suggesting that "quantumness" may not be the crucial ingredient for the small learning tasks considered here. Our benchmarks also unlock investigations beyond simplistic leaderboard comparisons, and we identify five important questions for quantum model design that follow from our results.
△ Less
Submitted 14 March, 2024; v1 submitted 11 March, 2024;
originally announced March 2024.
-
An inductive bias from quantum mechanics: learning order effects with non-commuting measurements
Authors:
Kaitlin Gili,
Guillermo Alonso,
Maria Schuld
Abstract:
There are two major approaches to building good machine learning algorithms: feeding lots of data into large models, or picking a model class with an ''inductive bias'' that suits the structure of the data. When taking the second approach as a starting point to design quantum algorithms for machine learning, it is important to understand how mathematical structures in quantum mechanics can lead to…
▽ More
There are two major approaches to building good machine learning algorithms: feeding lots of data into large models, or picking a model class with an ''inductive bias'' that suits the structure of the data. When taking the second approach as a starting point to design quantum algorithms for machine learning, it is important to understand how mathematical structures in quantum mechanics can lead to useful inductive biases in quantum models. In this work, we bring a collection of theoretical evidence from the Quantum Cognition literature to the field of Quantum Machine Learning to investigate how non-commutativity of quantum observables can help to learn data with ''order effects'', such as the changes in human answering patterns when swap** the order of questions in a survey. We design a multi-task learning setting in which a generative quantum model consisting of sequential learnable measurements can be adapted to a given task -- or question order -- by changing the order of observables, and we provide artificial datasets inspired by human psychology to carry out our investigation. Our first experimental simulations show that in some cases the quantum model learns more non-commutativity as the amount of order effect present in the data is increased, and that the quantum model can learn to generate better samples for unseen question orders when trained on others - both signs that the model architecture suits the task.
△ Less
Submitted 6 December, 2023;
originally announced December 2023.
-
Contextuality and inductive bias in quantum machine learning
Authors:
Joseph Bowles,
Victoria J Wright,
Máté Farkas,
Nathan Killoran,
Maria Schuld
Abstract:
Generalisation in machine learning often relies on the ability to encode structures present in data into an inductive bias of the model class. To understand the power of quantum machine learning, it is therefore crucial to identify the types of data structures that lend themselves naturally to quantum models. In this work we look to quantum contextuality -- a form of nonclassicality with links to…
▽ More
Generalisation in machine learning often relies on the ability to encode structures present in data into an inductive bias of the model class. To understand the power of quantum machine learning, it is therefore crucial to identify the types of data structures that lend themselves naturally to quantum models. In this work we look to quantum contextuality -- a form of nonclassicality with links to computational advantage -- for answers to this question. We introduce a framework for studying contextuality in machine learning, which leads us to a definition of what it means for a learning model to be contextual. From this, we connect a central concept of contextuality, called operational equivalence, to the ability of a model to encode a linearly conserved quantity in its label space. A consequence of this connection is that contextuality is tied to expressivity: contextual model classes that encode the inductive bias are generally more expressive than their noncontextual counterparts. To demonstrate this, we construct an explicit toy learning problem -- based on learning the payoff behaviour of a zero-sum game -- for which this is the case. By leveraging tools from geometric quantum machine learning, we then describe how to construct quantum learning models with the associated inductive bias, and show through our toy problem that they outperform their corresponding classical surrogate models. This suggests that understanding learning problems of this form may lead to useful insights about the power of quantum machine learning.
△ Less
Submitted 18 April, 2023; v1 submitted 2 February, 2023;
originally announced February 2023.
-
Generalization despite overfitting in quantum machine learning models
Authors:
Evan Peters,
Maria Schuld
Abstract:
The widespread success of deep neural networks has revealed a surprise in classical machine learning: very complex models often generalize well while simultaneously overfitting training data. This phenomenon of benign overfitting has been studied for a variety of classical models with the goal of better understanding the mechanisms behind deep learning. Characterizing the phenomenon in the context…
▽ More
The widespread success of deep neural networks has revealed a surprise in classical machine learning: very complex models often generalize well while simultaneously overfitting training data. This phenomenon of benign overfitting has been studied for a variety of classical models with the goal of better understanding the mechanisms behind deep learning. Characterizing the phenomenon in the context of quantum machine learning might similarly improve our understanding of the relationship between overfitting, overparameterization, and generalization. In this work, we provide a characterization of benign overfitting in quantum models. To do this, we derive the behavior of a classical interpolating Fourier features models for regression on noisy signals, and show how a class of quantum models exhibits analogous features, thereby linking the structure of quantum circuits (such as data-encoding and state preparation operations) to overparameterization and overfitting in quantum models. We intuitively explain these features according to the ability of the quantum model to interpolate noisy data with locally "spiky" behavior and provide a concrete demonstration example of benign overfitting.
△ Less
Submitted 14 December, 2023; v1 submitted 12 September, 2022;
originally announced September 2022.
-
Is quantum advantage the right goal for quantum machine learning?
Authors:
Maria Schuld,
Nathan Killoran
Abstract:
Machine learning is frequently listed among the most promising applications for quantum computing. This is in fact a curious choice: Today's machine learning algorithms are notoriously powerful in practice, but remain theoretically difficult to study. Quantum computing, in contrast, does not offer practical benchmarks on realistic scales, and theory is the main tool we have to judge whether it cou…
▽ More
Machine learning is frequently listed among the most promising applications for quantum computing. This is in fact a curious choice: Today's machine learning algorithms are notoriously powerful in practice, but remain theoretically difficult to study. Quantum computing, in contrast, does not offer practical benchmarks on realistic scales, and theory is the main tool we have to judge whether it could become relevant for a problem. In this perspective we explain why it is so difficult to say something about the practical power of quantum computers for machine learning with the tools we are currently using. We argue that these challenges call for a critical debate on whether quantum advantage and the narrative of 'beating' classical machine learning should continue to dominate the literature the way it does, and highlight examples for how other perspectives in existing research provide an important alternative to the focus on advantage.
△ Less
Submitted 8 February, 2023; v1 submitted 2 March, 2022;
originally announced March 2022.
-
Quantum computing with differentiable quantum transforms
Authors:
Olivia Di Matteo,
Josh Izaac,
Tom Bromley,
Anthony Hayes,
Christina Lee,
Maria Schuld,
Antal Száva,
Chase Roberts,
Nathan Killoran
Abstract:
We present a framework for differentiable quantum transforms. Such transforms are metaprograms capable of manipulating quantum programs in a way that preserves their differentiability. We highlight their potential with a set of relevant examples across quantum computing (gradient computation, circuit compilation, and error mitigation), and implement them using the transform framework of PennyLane,…
▽ More
We present a framework for differentiable quantum transforms. Such transforms are metaprograms capable of manipulating quantum programs in a way that preserves their differentiability. We highlight their potential with a set of relevant examples across quantum computing (gradient computation, circuit compilation, and error mitigation), and implement them using the transform framework of PennyLane, a software library for differentiable quantum programming. In this framework, the transforms themselves are differentiable and can be parametrized and optimized, which opens up the possibility of improved quantum resource requirements across a spectrum of tasks.
△ Less
Submitted 27 February, 2022;
originally announced February 2022.
-
Differentiable quantum computational chemistry with PennyLane
Authors:
Juan Miguel Arrazola,
Soran Jahangiri,
Alain Delgado,
Jack Ceroni,
Josh Izaac,
Antal Száva,
Utkarsh Azad,
Robert A. Lang,
Zeyue Niu,
Olivia Di Matteo,
Romain Moyard,
Jay Soni,
Maria Schuld,
Rodrigo A. Vargas-Hernández,
Teresa Tamayo-Mendoza,
Cedric Yen-Yu Lin,
Alán Aspuru-Guzik,
Nathan Killoran
Abstract:
This work describes the theoretical foundation for all quantum chemistry functionality in PennyLane, a quantum computing software library specializing in quantum differentiable programming. We provide an overview of fundamental concepts in quantum chemistry, including the basic principles of the Hartree-Fock method. A flagship feature in PennyLane is the differentiable Hartree-Fock solver, allowin…
▽ More
This work describes the theoretical foundation for all quantum chemistry functionality in PennyLane, a quantum computing software library specializing in quantum differentiable programming. We provide an overview of fundamental concepts in quantum chemistry, including the basic principles of the Hartree-Fock method. A flagship feature in PennyLane is the differentiable Hartree-Fock solver, allowing users to compute exact gradients of molecular Hamiltonians with respect to nuclear coordinates and basis set parameters. PennyLane provides specialized operations for quantum chemistry, including excitation gates as Givens rotations and templates for quantum chemistry circuits. Moreover, built-in simulators exploit sparse matrix techniques for representing molecular Hamiltonians that lead to fast simulation for quantum chemistry applications. In combination with PennyLane's existing methods for constructing, optimizing, and executing circuits, these methods allow users to implement a wide range of quantum algorithms for quantum chemistry. We discuss how PennyLane can be used to implement variational algorithms for calculating ground-state energies, excited-state energies, and energy derivatives, all of which can be differentiated with respect to both circuit and Hamiltonian parameters. We provide an example workflow describing how to jointly optimize circuit parameters, nuclear coordinates, and basis set parameters for quantum chemistry algorithms. We discuss a functionality for reducing the number of qubits by using symmetries and explain how PennyLane can be used to estimate quantum resources needed to implement several quantum algorithms. By combining insights from quantum computing, computational chemistry, and machine learning, PennyLane is the first library for differentiable quantum computational chemistry.
△ Less
Submitted 5 January, 2023; v1 submitted 18 November, 2021;
originally announced November 2021.
-
Quantum circuits with many photons on a programmable nanophotonic chip
Authors:
J. M. Arrazola,
V. Bergholm,
K. Brádler,
T. R. Bromley,
M. J. Collins,
I. Dhand,
A. Fumagalli,
T. Gerrits,
A. Goussev,
L. G. Helt,
J. Hundal,
T. Isacsson,
R. B. Israel,
J. Izaac,
S. Jahangiri,
R. Janik,
N. Killoran,
S. P. Kumar,
J. Lavoie,
A. E. Lita,
D. H. Mahler,
M. Menotti,
B. Morrison,
S. W. Nam,
L. Neuhaus
, et al. (14 additional authors not shown)
Abstract:
Growing interest in quantum computing for practical applications has led to a surge in the availability of programmable machines for executing quantum algorithms. Present day photonic quantum computers have been limited either to non-deterministic operation, low photon numbers and rates, or fixed random gate sequences. Here we introduce a full-stack hardware-software system for executing many-phot…
▽ More
Growing interest in quantum computing for practical applications has led to a surge in the availability of programmable machines for executing quantum algorithms. Present day photonic quantum computers have been limited either to non-deterministic operation, low photon numbers and rates, or fixed random gate sequences. Here we introduce a full-stack hardware-software system for executing many-photon quantum circuits using integrated nanophotonics: a programmable chip, operating at room temperature and interfaced with a fully automated control system. It enables remote users to execute quantum algorithms requiring up to eight modes of strongly squeezed vacuum initialized as two-mode squeezed states in single temporal modes, a fully general and programmable four-mode interferometer, and genuine photon number-resolving readout on all outputs. Multi-photon detection events with photon numbers and rates exceeding any previous quantum optical demonstration on a programmable device are made possible by strong squeezing and high sampling rates. We verify the non-classicality of the device output, and use the platform to carry out proof-of-principle demonstrations of three quantum algorithms: Gaussian boson sampling, molecular vibronic spectra, and graph similarity.
△ Less
Submitted 2 March, 2021;
originally announced March 2021.
-
Supervised quantum machine learning models are kernel methods
Authors:
Maria Schuld
Abstract:
With near-term quantum devices available and the race for fault-tolerant quantum computers in full swing, researchers became interested in the question of what happens if we replace a supervised machine learning model with a quantum circuit. While such "quantum models" are sometimes called "quantum neural networks", it has been repeatedly noted that their mathematical structure is actually much mo…
▽ More
With near-term quantum devices available and the race for fault-tolerant quantum computers in full swing, researchers became interested in the question of what happens if we replace a supervised machine learning model with a quantum circuit. While such "quantum models" are sometimes called "quantum neural networks", it has been repeatedly noted that their mathematical structure is actually much more closely related to kernel methods: they analyse data in high-dimensional Hilbert spaces to which we only have access through inner products revealed by measurements. This technical manuscript summarises and extends the idea of systematically rephrasing supervised quantum models as a kernel method. With this, a lot of near-term and fault-tolerant quantum models can be replaced by a general support vector machine whose kernel computes distances between data-encoding quantum states. Kernel-based training is then guaranteed to find better or equally good quantum models than variational circuit training. Overall, the kernel perspective of quantum machine learning tells us that the way that data is encoded into quantum states is the main ingredient that can potentially set quantum models apart from classical machine learning models.
△ Less
Submitted 17 April, 2021; v1 submitted 26 January, 2021;
originally announced January 2021.
-
The effect of data encoding on the expressive power of variational quantum machine learning models
Authors:
Maria Schuld,
Ryan Sweke,
Johannes Jakob Meyer
Abstract:
Quantum computers can be used for supervised learning by treating parametrised quantum circuits as models that map data inputs to predictions. While a lot of work has been done to investigate practical implications of this approach, many important theoretical properties of these models remain unknown. Here we investigate how the strategy with which data is encoded into the model influences the exp…
▽ More
Quantum computers can be used for supervised learning by treating parametrised quantum circuits as models that map data inputs to predictions. While a lot of work has been done to investigate practical implications of this approach, many important theoretical properties of these models remain unknown. Here we investigate how the strategy with which data is encoded into the model influences the expressive power of parametrised quantum circuits as function approximators. We show that one can naturally write a quantum model as a partial Fourier series in the data, where the accessible frequencies are determined by the nature of the data encoding gates in the circuit. By repeating simple data encoding gates multiple times, quantum models can access increasingly rich frequency spectra. We show that there exist quantum models which can realise all possible sets of Fourier coefficients, and therefore, if the accessible frequency spectrum is asymptotically rich enough, such models are universal function approximators.
△ Less
Submitted 9 March, 2021; v1 submitted 19 August, 2020;
originally announced August 2020.
-
Quantum Machine Learning in High Energy Physics
Authors:
Wen Guan,
Gabriel Perdue,
Arthur Pesah,
Maria Schuld,
Koji Terashi,
Sofia Vallecorsa,
Jean-Roch Vlimant
Abstract:
Machine learning has been used in high energy physics for a long time, primarily at the analysis level with supervised classification. Quantum computing was postulated in the early 1980s as way to perform computations that would not be tractable with a classical computer. With the advent of noisy intermediate-scale quantum computing devices, more quantum algorithms are being developed with the aim…
▽ More
Machine learning has been used in high energy physics for a long time, primarily at the analysis level with supervised classification. Quantum computing was postulated in the early 1980s as way to perform computations that would not be tractable with a classical computer. With the advent of noisy intermediate-scale quantum computing devices, more quantum algorithms are being developed with the aim at exploiting the capacity of the hardware for machine learning applications. An interesting question is whether there are ways to apply quantum machine learning to High Energy Physics. This paper reviews the first generation of ideas that use quantum machine learning on problems in high energy physics and provide an outlook on future applications.
△ Less
Submitted 19 October, 2020; v1 submitted 18 May, 2020;
originally announced May 2020.
-
On quantum ensembles of quantum classifiers
Authors:
Amira Abbas,
Maria Schuld,
Francesco Petruccione
Abstract:
Quantum machine learning seeks to exploit the underlying nature of a quantum computer to enhance machine learning techniques. A particular framework uses the quantum property of superposition to store sets of parameters, thereby creating an ensemble of quantum classifiers that may be computed in parallel. The idea stems from classical ensemble methods where one attempts to build a stronger model b…
▽ More
Quantum machine learning seeks to exploit the underlying nature of a quantum computer to enhance machine learning techniques. A particular framework uses the quantum property of superposition to store sets of parameters, thereby creating an ensemble of quantum classifiers that may be computed in parallel. The idea stems from classical ensemble methods where one attempts to build a stronger model by averaging the results from many different models. In this work, we demonstrate that a specific implementation of the quantum ensemble of quantum classifiers, called the accuracy-weighted quantum ensemble, can be fully dequantised. On the other hand, the general quantum ensemble framework is shown to contain the well-known Deutsch-Jozsa algorithm that notably provides a quantum speedup and creates the potential for a useful quantum ensemble to harness this computational advantage.
△ Less
Submitted 29 January, 2020;
originally announced January 2020.
-
Quantum embeddings for machine learning
Authors:
Seth Lloyd,
Maria Schuld,
Aroosa Ijaz,
Josh Izaac,
Nathan Killoran
Abstract:
Quantum classifiers are trainable quantum circuits used as machine learning models. The first part of the circuit implements a quantum feature map that encodes classical inputs into quantum states, embedding the data in a high-dimensional Hilbert space; the second part of the circuit executes a quantum measurement interpreted as the output of the model. Usually, the measurement is trained to disti…
▽ More
Quantum classifiers are trainable quantum circuits used as machine learning models. The first part of the circuit implements a quantum feature map that encodes classical inputs into quantum states, embedding the data in a high-dimensional Hilbert space; the second part of the circuit executes a quantum measurement interpreted as the output of the model. Usually, the measurement is trained to distinguish quantum-embedded data. We propose to instead train the first part of the circuit -- the embedding -- with the objective of maximally separating data classes in Hilbert space, a strategy we call quantum metric learning. As a result, the measurement minimizing a linear classification loss is already known and depends on the metric used: for embeddings separating data using the l1 or trace distance, this is the Helstrom measurement, while for the l2 or Hilbert-Schmidt distance, it is a simple overlap measurement. This approach provides a powerful analytic framework for quantum machine learning and eliminates a major component in current models, freeing up more precious resources to best leverage the capabilities of near-term quantum information processors.
△ Less
Submitted 10 February, 2020; v1 submitted 10 January, 2020;
originally announced January 2020.
-
Transfer learning in hybrid classical-quantum neural networks
Authors:
Andrea Mari,
Thomas R. Bromley,
Josh Izaac,
Maria Schuld,
Nathan Killoran
Abstract:
We extend the concept of transfer learning, widely applied in modern machine learning algorithms, to the emerging context of hybrid neural networks composed of classical and quantum elements. We propose different implementations of hybrid transfer learning, but we focus mainly on the paradigm in which a pre-trained classical network is modified and augmented by a final variational quantum circuit.…
▽ More
We extend the concept of transfer learning, widely applied in modern machine learning algorithms, to the emerging context of hybrid neural networks composed of classical and quantum elements. We propose different implementations of hybrid transfer learning, but we focus mainly on the paradigm in which a pre-trained classical network is modified and augmented by a final variational quantum circuit. This approach is particularly attractive in the current era of intermediate-scale quantum technology since it allows to optimally pre-process high dimensional data (e.g., images) with any state-of-the-art classical network and to embed a select set of highly informative features into a quantum processor. We present several proof-of-concept examples of the convenient application of quantum transfer learning for image recognition and quantum state classification. We use the cross-platform software library PennyLane to experimentally test a high-resolution image classifier with two different quantum computers, respectively provided by IBM and Rigetti.
△ Less
Submitted 8 October, 2020; v1 submitted 17 December, 2019;
originally announced December 2019.
-
Applications of Near-Term Photonic Quantum Computers: Software and Algorithms
Authors:
Thomas R. Bromley,
Juan Miguel Arrazola,
Soran Jahangiri,
Josh Izaac,
Nicolás Quesada,
Alain Delgado Gran,
Maria Schuld,
Jeremy Swinarton,
Zeid Zabaneh,
Nathan Killoran
Abstract:
Gaussian Boson Sampling (GBS) is a near-term platform for photonic quantum computing. Recent efforts have led to the discovery of GBS algorithms with applications to graph-based problems, point processes, and molecular vibronic spectra in chemistry. The development of dedicated quantum software is a key enabler in permitting users to program devices and implement algorithms. In this work, we intro…
▽ More
Gaussian Boson Sampling (GBS) is a near-term platform for photonic quantum computing. Recent efforts have led to the discovery of GBS algorithms with applications to graph-based problems, point processes, and molecular vibronic spectra in chemistry. The development of dedicated quantum software is a key enabler in permitting users to program devices and implement algorithms. In this work, we introduce a new applications layer for the Strawberry Fields photonic quantum computing library. The applications layer provides users with the necessary tools to design and implement algorithms using GBS with only a few lines of code. This paper serves a dual role as an introduction to the software, supported with example code, and also a review of the current state of the art in GBS algorithms.
△ Less
Submitted 16 December, 2019;
originally announced December 2019.
-
A duality at the heart of Gaussian boson sampling
Authors:
Kamil Bradler,
Robert Israel,
Maria Schuld,
Daiqin Su
Abstract:
Gaussian boson sampling (GBS) is a near-term quantum computation framework that is believed to be classically intractable, but yet rich of potential applications. In this paper we study the intimate relation between distributions defined over classes of samples from a GBS device with graph matching polynomials. For this purpose, we introduce a new graph polynomial called the displaced GBS polynomi…
▽ More
Gaussian boson sampling (GBS) is a near-term quantum computation framework that is believed to be classically intractable, but yet rich of potential applications. In this paper we study the intimate relation between distributions defined over classes of samples from a GBS device with graph matching polynomials. For this purpose, we introduce a new graph polynomial called the displaced GBS polynomial, whose coefficients are the coarse-grained photon-number probabilities of an arbitrary undirected graph $G$ encoded in a GBS device. We report a discovery of a duality between the displaced GBS polynomial of $G$ and the matching polynomial of $G\,\square\,P_2(x)$ - the Cartesian graph product of $G$ with a single weighted edge also known as the prism over $G$. Besides the surprising insight gained into Gaussian boson sampling, it opens the door for the new way of classically simulating the Gaussian boson sampling device. Furthermore, it motivates the recent success of a new type of coarse-grained quantum statistics used to construct feature maps in [Schuld et al. 2019].
△ Less
Submitted 9 October, 2019;
originally announced October 2019.
-
Stochastic gradient descent for hybrid quantum-classical optimization
Authors:
Ryan Sweke,
Frederik Wilde,
Johannes Meyer,
Maria Schuld,
Paul K. Faehrmann,
Barthélémy Meynard-Piganeau,
Jens Eisert
Abstract:
Within the context of hybrid quantum-classical optimization, gradient descent based optimizers typically require the evaluation of expectation values with respect to the outcome of parameterized quantum circuits. In this work, we explore the consequences of the prior observation that estimation of these quantities on quantum hardware results in a form of stochastic gradient descent optimization. W…
▽ More
Within the context of hybrid quantum-classical optimization, gradient descent based optimizers typically require the evaluation of expectation values with respect to the outcome of parameterized quantum circuits. In this work, we explore the consequences of the prior observation that estimation of these quantities on quantum hardware results in a form of stochastic gradient descent optimization. We formalize this notion, which allows us to show that in many relevant cases, including VQE, QAOA and certain quantum classifiers, estimating expectation values with $k$ measurement outcomes results in optimization algorithms whose convergence properties can be rigorously well understood, for any value of $k$. In fact, even using single measurement outcomes for the estimation of expectation values is sufficient. Moreover, in many settings the required gradients can be expressed as linear combinations of expectation values -- originating, e.g., from a sum over local terms of a Hamiltonian, a parameter shift rule, or a sum over data-set instances -- and we show that in these cases $k$-shot expectation value estimation can be combined with sampling over terms of the linear combination, to obtain "doubly stochastic" gradient descent optimizers. For all algorithms we prove convergence guarantees, providing a framework for the derivation of rigorous optimization results in the context of near-term quantum devices. Additionally, we explore numerically these methods on benchmark VQE, QAOA and quantum-enhanced machine learning tasks and show that treating the stochastic settings as hyper-parameters allows for state-of-the-art results with significantly fewer circuit executions and measurements.
△ Less
Submitted 20 January, 2021; v1 submitted 2 October, 2019;
originally announced October 2019.
-
A quantum hardware-induced graph kernel based on Gaussian Boson Sampling
Authors:
Maria Schuld,
Kamil Brádler,
Robert Israel,
Daiqin Su,
Brajesh Gupt
Abstract:
A device called a 'Gaussian Boson Sampler' has initially been proposed as a near-term demonstration of classically intractable quantum computation. As recently shown, it can also be used to decide whether two graphs are isomorphic. Based on these results we construct a feature map and graph similarity measure or 'graph kernel' using samples from the device. We show that the kernel performs well co…
▽ More
A device called a 'Gaussian Boson Sampler' has initially been proposed as a near-term demonstration of classically intractable quantum computation. As recently shown, it can also be used to decide whether two graphs are isomorphic. Based on these results we construct a feature map and graph similarity measure or 'graph kernel' using samples from the device. We show that the kernel performs well compared to standard graph kernels on typical benchmark datasets, and provide a theoretical motivation for this success, linking the distribution of a Gaussian Boson Sampler to the number of matchings in subgraphs. Our results contribute to a new way of thinking about kernels as a (quantum) hardware-efficient feature map**, and lead to an interesting application for near-term quantum computing.
△ Less
Submitted 16 October, 2019; v1 submitted 29 May, 2019;
originally announced May 2019.
-
Machine learning and the physical sciences
Authors:
Giuseppe Carleo,
Ignacio Cirac,
Kyle Cranmer,
Laurent Daudet,
Maria Schuld,
Naftali Tishby,
Leslie Vogt-Maranto,
Lenka Zdeborová
Abstract:
Machine learning encompasses a broad range of algorithms and modeling tools used for a vast array of data processing tasks, which has entered most scientific disciplines in recent years. We review in a selective way the recent research on the interface between machine learning and physical sciences. This includes conceptual developments in machine learning (ML) motivated by physical insights, appl…
▽ More
Machine learning encompasses a broad range of algorithms and modeling tools used for a vast array of data processing tasks, which has entered most scientific disciplines in recent years. We review in a selective way the recent research on the interface between machine learning and physical sciences. This includes conceptual developments in machine learning (ML) motivated by physical insights, applications of machine learning techniques to several domains in physics, and cross-fertilization between the two fields. After giving basic notion of machine learning methods and principles, we describe examples of how statistical physics is used to understand methods in ML. We then move to describe applications of ML methods in particle physics and cosmology, quantum many body physics, quantum computing, and chemical and material physics. We also highlight research and development into novel computing architectures aimed at accelerating ML. In each of the sections we describe recent successes as well as domain-specific methodology and challenges.
△ Less
Submitted 6 December, 2019; v1 submitted 25 March, 2019;
originally announced March 2019.
-
Evaluating analytic gradients on quantum hardware
Authors:
Maria Schuld,
Ville Bergholm,
Christian Gogolin,
Josh Izaac,
Nathan Killoran
Abstract:
An important application for near-term quantum computing lies in optimization tasks, with applications ranging from quantum chemistry and drug discovery to machine learning. In many settings --- most prominently in so-called parametrized or variational algorithms --- the objective function is a result of hybrid quantum-classical processing. To optimize the objective, it is useful to have access to…
▽ More
An important application for near-term quantum computing lies in optimization tasks, with applications ranging from quantum chemistry and drug discovery to machine learning. In many settings --- most prominently in so-called parametrized or variational algorithms --- the objective function is a result of hybrid quantum-classical processing. To optimize the objective, it is useful to have access to exact gradients of quantum circuits with respect to gate parameters. This paper shows how gradients of expectation values of quantum measurements can be estimated using the same, or almost the same, architecture that executes the original circuit. It generalizes previous results for qubit-based platforms, and proposes recipes for the computation of gradients of continuous-variable circuits. Interestingly, in many important instances it is sufficient to run the original quantum circuit twice while shifting a single gate parameter to obtain the corresponding component of the gradient. More general cases can be solved by conditioning a single gate on an ancilla.
△ Less
Submitted 27 November, 2018;
originally announced November 2018.
-
PennyLane: Automatic differentiation of hybrid quantum-classical computations
Authors:
Ville Bergholm,
Josh Izaac,
Maria Schuld,
Christian Gogolin,
Shahnawaz Ahmed,
Vishnu Ajith,
M. Sohaib Alam,
Guillermo Alonso-Linaje,
B. AkashNarayanan,
Ali Asadi,
Juan Miguel Arrazola,
Utkarsh Azad,
Sam Banning,
Carsten Blank,
Thomas R Bromley,
Benjamin A. Cordier,
Jack Ceroni,
Alain Delgado,
Olivia Di Matteo,
Amintor Dusko,
Tanya Garg,
Diego Guala,
Anthony Hayes,
Ryan Hill,
Aroosa Ijaz
, et al. (43 additional authors not shown)
Abstract:
PennyLane is a Python 3 software framework for differentiable programming of quantum computers. The library provides a unified architecture for near-term quantum computing devices, supporting both qubit and continuous-variable paradigms. PennyLane's core feature is the ability to compute gradients of variational quantum circuits in a way that is compatible with classical techniques such as backpro…
▽ More
PennyLane is a Python 3 software framework for differentiable programming of quantum computers. The library provides a unified architecture for near-term quantum computing devices, supporting both qubit and continuous-variable paradigms. PennyLane's core feature is the ability to compute gradients of variational quantum circuits in a way that is compatible with classical techniques such as backpropagation. PennyLane thus extends the automatic differentiation algorithms common in optimization and machine learning to include quantum and hybrid computations. A plugin system makes the framework compatible with any gate-based quantum simulator or hardware. We provide plugins for hardware providers including the Xanadu Cloud, Amazon Braket, and IBM Quantum, allowing PennyLane optimizations to be run on publicly accessible quantum devices. On the classical front, PennyLane interfaces with accelerated machine learning libraries such as TensorFlow, PyTorch, JAX, and Autograd. PennyLane can be used for the optimization of variational quantum eigensolvers, quantum approximate optimization, quantum machine learning models, and many other applications.
△ Less
Submitted 29 July, 2022; v1 submitted 12 November, 2018;
originally announced November 2018.
-
Continuous-variable quantum neural networks
Authors:
Nathan Killoran,
Thomas R. Bromley,
Juan Miguel Arrazola,
Maria Schuld,
Nicolás Quesada,
Seth Lloyd
Abstract:
We introduce a general method for building neural networks on quantum computers. The quantum neural network is a variational quantum circuit built in the continuous-variable (CV) architecture, which encodes quantum information in continuous degrees of freedom such as the amplitudes of the electromagnetic field. This circuit contains a layered structure of continuously parameterized gates which is…
▽ More
We introduce a general method for building neural networks on quantum computers. The quantum neural network is a variational quantum circuit built in the continuous-variable (CV) architecture, which encodes quantum information in continuous degrees of freedom such as the amplitudes of the electromagnetic field. This circuit contains a layered structure of continuously parameterized gates which is universal for CV quantum computation. Affine transformations and nonlinear activation functions, two key elements in neural networks, are enacted in the quantum network using Gaussian and non-Gaussian gates, respectively. The non-Gaussian gates provide both the nonlinearity and the universality of the model. Due to the structure of the CV model, the CV quantum neural network can encode highly nonlinear transformations while remaining completely unitary. We show how a classical network can be embedded into the quantum formalism and propose quantum versions of various specialized model such as convolutional, recurrent, and residual networks. Finally, we present numerous modeling experiments built with the Strawberry Fields software library. These experiments, including a classifier for fraud detection, a network which generates Tetris images, and a hybrid classical-quantum autoencoder, demonstrate the capability and adaptability of CV quantum neural networks.
△ Less
Submitted 18 June, 2018;
originally announced June 2018.
-
Circuit-centric quantum classifiers
Authors:
Maria Schuld,
Alex Bocharov,
Krysta Svore,
Nathan Wiebe
Abstract:
The current generation of quantum computing technologies call for quantum algorithms that require a limited number of qubits and quantum gates, and which are robust against errors. A suitable design approach are variational circuits where the parameters of gates are learnt, an approach that is particularly fruitful for applications in machine learning. In this paper, we propose a low-depth variati…
▽ More
The current generation of quantum computing technologies call for quantum algorithms that require a limited number of qubits and quantum gates, and which are robust against errors. A suitable design approach are variational circuits where the parameters of gates are learnt, an approach that is particularly fruitful for applications in machine learning. In this paper, we propose a low-depth variational quantum algorithm for supervised learning. The input feature vectors are encoded into the amplitudes of a quantum system, and a quantum circuit of parametrised single and two-qubit gates together with a single-qubit measurement is used to classify the inputs. This circuit architecture ensures that the number of learnable parameters is poly-logarithmic in the input dimension. We propose a quantum-classical training scheme where the analytical gradients of the model can be estimated by running several slightly adapted versions of the variational circuit. We show with simulations that the circuit-centric quantum classifier performs well on standard classical benchmark datasets while requiring dramatically fewer parameters than other methods. We also evaluate sensitivity of the classification to state preparation and parameter noise, introduce a quantum version of dropout regularisation and provide a graphical representation of quantum gates as highly symmetric linear layers of a neural network.
△ Less
Submitted 2 April, 2018;
originally announced April 2018.
-
Quantum machine learning in feature Hilbert spaces
Authors:
Maria Schuld,
Nathan Killoran
Abstract:
The basic idea of quantum computing is surprisingly similar to that of kernel methods in machine learning, namely to efficiently perform computations in an intractably large Hilbert space. In this paper we explore some theoretical foundations of this link and show how it opens up a new avenue for the design of quantum machine learning algorithms. We interpret the process of encoding inputs in a qu…
▽ More
The basic idea of quantum computing is surprisingly similar to that of kernel methods in machine learning, namely to efficiently perform computations in an intractably large Hilbert space. In this paper we explore some theoretical foundations of this link and show how it opens up a new avenue for the design of quantum machine learning algorithms. We interpret the process of encoding inputs in a quantum state as a nonlinear feature map that maps data to quantum Hilbert space. A quantum computer can now analyse the input data in this feature space. Based on this link, we discuss two approaches for building a quantum model for classification. In the first approach, the quantum device estimates inner products of quantum states to compute a classically intractable kernel. This kernel can be fed into any classical kernel method such as a support vector machine. In the second approach, we can use a variational quantum circuit as a linear model that classifies data explicitly in Hilbert space. We illustrate these ideas with a feature map based on squeezing in a continuous-variable system, and visualise the working principle with $2$-dimensional mini-benchmark datasets.
△ Less
Submitted 19 March, 2018;
originally announced March 2018.
-
Quantum ensembles of quantum classifiers
Authors:
Maria Schuld,
Francesco Petruccione
Abstract:
Quantum machine learning witnesses an increasing amount of quantum algorithms for data-driven decision making, a problem with potential applications ranging from automated image recognition to medical diagnosis. Many of those algorithms are implementations of quantum classifiers, or models for the classification of data inputs with a quantum computer. Following the success of collective decision m…
▽ More
Quantum machine learning witnesses an increasing amount of quantum algorithms for data-driven decision making, a problem with potential applications ranging from automated image recognition to medical diagnosis. Many of those algorithms are implementations of quantum classifiers, or models for the classification of data inputs with a quantum computer. Following the success of collective decision making with ensembles in classical machine learning, this paper introduces the concept of quantum ensembles of quantum classifiers. Creating the ensemble corresponds to a state preparation routine, after which the quantum classifiers are evaluated in parallel and their combined decision is accessed by a single-qubit measurement. This framework naturally allows for exponentially large ensembles in which -- similar to Bayesian learning -- the individual classifiers do not have to be trained. As an example, we analyse an exponentially large quantum ensemble in which each classifier is weighed according to its performance in classifying the training data, leading to new results for quantum as well as classical machine learning.
△ Less
Submitted 7 April, 2017;
originally announced April 2017.
-
Implementing a distance-based classifier with a quantum interference circuit
Authors:
Maria Schuld,
Mark Fingerhuth,
Francesco Petruccione
Abstract:
Lately, much attention has been given to quantum algorithms that solve pattern recognition tasks in machine learning. Many of these quantum machine learning algorithms try to implement classical models on large-scale universal quantum computers that have access to non-trivial subroutines such as Hamiltonian simulation, amplitude amplification and phase estimation. We approach the problem from the…
▽ More
Lately, much attention has been given to quantum algorithms that solve pattern recognition tasks in machine learning. Many of these quantum machine learning algorithms try to implement classical models on large-scale universal quantum computers that have access to non-trivial subroutines such as Hamiltonian simulation, amplitude amplification and phase estimation. We approach the problem from the opposite direction and analyse a distance-based classifier that is realised by a simple quantum interference circuit. After state preparation, the circuit only consists of a Hadamard gate as well as two single-qubit measurements, and computes the distance between data points in quantum parallel. We demonstrate the proof-of-principle using the IBM Quantum Experience and analyse the performance of the classifier with numerical simulations, showing that it classifies surprisingly well for simple benchmark tasks.
△ Less
Submitted 28 August, 2017; v1 submitted 31 March, 2017;
originally announced March 2017.
-
Quantum gradient descent and Newton's method for constrained polynomial optimization
Authors:
Patrick Rebentrost,
Maria Schuld,
Leonard Wossnig,
Francesco Petruccione,
Seth Lloyd
Abstract:
Optimization problems in disciplines such as machine learning are commonly solved with iterative methods. Gradient descent algorithms find local minima by moving along the direction of steepest descent while Newton's method takes into account curvature information and thereby often improves convergence. Here, we develop quantum versions of these iterative optimization algorithms and apply them to…
▽ More
Optimization problems in disciplines such as machine learning are commonly solved with iterative methods. Gradient descent algorithms find local minima by moving along the direction of steepest descent while Newton's method takes into account curvature information and thereby often improves convergence. Here, we develop quantum versions of these iterative optimization algorithms and apply them to polynomial optimization with a unit norm constraint. In each step, multiple copies of the current candidate are used to improve the candidate using quantum phase estimation, an adapted quantum principal component analysis scheme, as well as quantum matrix multiplications and inversions. The required operations perform polylogarithmically in the dimension of the solution vector and exponentially in the number of iterations. Therefore, the quantum algorithm can be beneficial for high-dimensional problems where a small number of iterations is sufficient.
△ Less
Submitted 17 August, 2018; v1 submitted 6 December, 2016;
originally announced December 2016.
-
Prediction by linear regression on a quantum computer
Authors:
Maria Schuld,
Ilya Sinayskiy,
Francesco Petruccione
Abstract:
We give an algorithm for prediction on a quantum computer which is based on a linear regression model with least squares optimisation. Opposed to related previous contributions suffering from the problem of reading out the optimal parameters of the fit, our scheme focuses on the machine learning task of guessing the output corresponding to a new input given examples of data points. Furthermore, we…
▽ More
We give an algorithm for prediction on a quantum computer which is based on a linear regression model with least squares optimisation. Opposed to related previous contributions suffering from the problem of reading out the optimal parameters of the fit, our scheme focuses on the machine learning task of guessing the output corresponding to a new input given examples of data points. Furthermore, we adapt the algorithm to process non-sparse data matrices that can be represented by low-rank approximations, and significantly improve the dependency on its condition number. The prediction result can be accessed through a single qubit measurement or used for further quantum information processing routines. The algorithm's runtime is logarithmic in the dimension of the input space provided the data is given as quantum information as an input to the routine.
△ Less
Submitted 4 August, 2016; v1 submitted 28 January, 2016;
originally announced January 2016.
-
Quantum computing for pattern classification
Authors:
Maria Schuld,
Ilya Sinayskiy,
Francesco Petruccione
Abstract:
It is well known that for certain tasks, quantum computing outperforms classical computing. A growing number of contributions try to use this advantage in order to improve or extend classical machine learning algorithms by methods of quantum information theory. This paper gives a brief introduction into quantum machine learning using the example of pattern classification. We introduce a quantum pa…
▽ More
It is well known that for certain tasks, quantum computing outperforms classical computing. A growing number of contributions try to use this advantage in order to improve or extend classical machine learning algorithms by methods of quantum information theory. This paper gives a brief introduction into quantum machine learning using the example of pattern classification. We introduce a quantum pattern classification algorithm that draws on Trugenberger's proposal for measuring the Hamming distance on a quantum computer (CA Trugenberger, Phys Rev Let 87, 2001) and discuss its advantages using handwritten digit recognition as from the MNIST database.
△ Less
Submitted 11 December, 2014;
originally announced December 2014.
-
Simulating a perceptron on a quantum computer
Authors:
Maria Schuld,
Ilya Sinayskiy,
Francesco Petruccione
Abstract:
Perceptrons are the basic computational unit of artificial neural networks, as they model the activation mechanism of an output neuron due to incoming signals from its neighbours. As linear classifiers, they play an important role in the foundations of machine learning. In the context of the emerging field of quantum machine learning, several attempts have been made to develop a corresponding unit…
▽ More
Perceptrons are the basic computational unit of artificial neural networks, as they model the activation mechanism of an output neuron due to incoming signals from its neighbours. As linear classifiers, they play an important role in the foundations of machine learning. In the context of the emerging field of quantum machine learning, several attempts have been made to develop a corresponding unit using quantum information theory. Based on the quantum phase estimation algorithm, this paper introduces a quantum perceptron model imitating the step-activation function of a classical perceptron. This scheme requires resources in $\mathcal{O}(n)$ (where $n$ is the size of the input) and promises efficient applications for more complex structures such as trainable quantum neural networks.
△ Less
Submitted 11 December, 2014;
originally announced December 2014.
-
An introduction to quantum machine learning
Authors:
M. Schuld,
I. Sinayskiy,
F. Petruccione
Abstract:
Machine learning algorithms learn a desired input-output relation from examples in order to interpret new inputs. This is important for tasks such as image and speech recognition or strategy optimisation, with growing applications in the IT industry. In the last couple of years, researchers investigated if quantum computing can help to improve classical machine learning algorithms. Ideas range fro…
▽ More
Machine learning algorithms learn a desired input-output relation from examples in order to interpret new inputs. This is important for tasks such as image and speech recognition or strategy optimisation, with growing applications in the IT industry. In the last couple of years, researchers investigated if quantum computing can help to improve classical machine learning algorithms. Ideas range from running computationally costly algorithms or their subroutines efficiently on a quantum computer to the translation of stochastic methods into the language of quantum theory. This contribution gives a systematic overview of the emerging field of quantum machine learning. It presents the approaches as well as technical details in an accessable way, and discusses the potential of a future theory of quantum learning.
△ Less
Submitted 10 September, 2014;
originally announced September 2014.
-
The quest for a Quantum Neural Network
Authors:
M. Schuld,
I. Sinayskiy,
F. Petruccione
Abstract:
With the overwhelming success in the field of quantum information in the last decades, the "quest" for a Quantum Neural Network (QNN) model began in order to combine quantum computing with the striking properties of neural computing. This article presents a systematic approach to QNN research, which so far consists of a conglomeration of ideas and proposals. It outlines the challenge of combining…
▽ More
With the overwhelming success in the field of quantum information in the last decades, the "quest" for a Quantum Neural Network (QNN) model began in order to combine quantum computing with the striking properties of neural computing. This article presents a systematic approach to QNN research, which so far consists of a conglomeration of ideas and proposals. It outlines the challenge of combining the nonlinear, dissipative dynamics of neural computing and the linear, unitary dynamics of quantum computing. It establishes requirements for a meaningful QNN and reviews existing literature against these requirements. It is found that none of the proposals for a potential QNN model fully exploits both the advantages of quantum physics and computing in neural networks. An outlook on possible ways forward is given, emphasizing the idea of Open Quantum Neural Networks based on dissipative quantum computing.
△ Less
Submitted 29 August, 2014;
originally announced August 2014.
-
Quantum walks on graphs representing the firing patterns of a quantum neural network
Authors:
Maria Schuld,
Ilya Sinayskiy,
Francesco Petruccione
Abstract:
Quantum walks have been shown to be fruitful tools in analysing the dynamic properties of quantum systems. This article proposes to use quantum walks as an approach to Quantum Neural Networks (QNNs). QNNs replace binary McCulloch-Pitts neurons with a qubit in order to use the advantages of quantum computing in neural networks. A quantum walk on the firing states of such a QNN is supposed to simula…
▽ More
Quantum walks have been shown to be fruitful tools in analysing the dynamic properties of quantum systems. This article proposes to use quantum walks as an approach to Quantum Neural Networks (QNNs). QNNs replace binary McCulloch-Pitts neurons with a qubit in order to use the advantages of quantum computing in neural networks. A quantum walk on the firing states of such a QNN is supposed to simulate central properties of the dynamics of classical neural networks, such as associative memory. It is shown that a biased discrete Hadamard walk derived from the updating process of a biological neuron does not lead to a unitary walk. However, a Stochastic Quantum Walk between the global firing states of a QNN can be constructed and it is shown that it contains the feature of associative memory. The quantum contribution to the walk accounts for a modest speed-up in some regimes.
△ Less
Submitted 1 April, 2014;
originally announced April 2014.