Arxiv:1801.07686V4 [Quant-Ph] 2 Jun 2019

Arxiv:1801.07686V4 [Quant-Ph] 2 Jun 2019

A generative modeling approach for benchmarking and training shallow quantum circuits Marcello Benedetti,1, 2 Delfina Garcia-Pintos,3 Oscar Perdomo,3, 4, 5 Vicente Leyton-Ortega,3, 4 Yunseong Nam,6 and Alejandro Perdomo-Ortiz1, 3, 4, 7, 8, ∗ 1Department of Computer Science, University College London, WC1E 6BT London, UK 2Cambridge Quantum Computing Limited, CB2 1UB Cambridge, UK 3Qubitera, LLC., Mountain View, CA 94041, USA 4Rigetti Computing, 2919 Seventh Street, Berkeley, CA 94710-2704, USA 5Department of Mathematics, Central Connecticut State University, New Britain, CT 06050, USA 6IonQ, Inc., College Park, MD 20740, USA 7Quantum Artificial Intelligence Lab., NASA Ames Research Center, Moffett Field, CA 94035, USA 8Zapata Computing Inc., 439 University Avenue, Office 535, Toronto, ON M5G 1Y8, Canada (Dated: June 2, 2019) Hybrid quantum-classical algorithms provide ways to use noisy intermediate-scale quantum com- puters for practical applications. Expanding the portfolio of such techniques, we propose a quantum circuit learning algorithm that can be used to assist the characterization of quantum devices and to train shallow circuits for generative tasks. The procedure leverages quantum hardware capabilities to its fullest extent by using native gates and their qubit connectivity. We demonstrate that our approach can learn an optimal preparation of the Greenberger-Horne-Zeilinger states, also known as \cat states". We further demonstrate that our approach can efficiently prepare approximate rep- resentations of coherent thermal states, wave functions that encode Boltzmann probabilities in their amplitudes. Finally, complementing proposals to characterize the power or usefulness of near-term quantum devices, such as IBM's quantum volume, we provide a new hardware-independent metric called the qBAS score. It is based on the performance yield in a specific sampling task on one of the canonical machine learning data sets known as Bars and Stripes. We show how entanglement is a key ingredient in encoding the patterns of this data set; an ideal benchmark for testing hardware starting at four qubits and up. We provide experimental results and evaluation of this metric to probe the trade off between several architectural circuit designs and circuit depths on an ion-trap quantum computer. Keywords: quantum-assisted machine learning, generative models, quantum circuit learning I. INTRODUCTION tering synthetic data [10]. Other successful hybrid ap- proaches based on genetic algorithms were proposed for What is a good metric for the computational power approximating quantum adders and training quantum of noisy intermediate-scale quantum [1] (NISQ) devices? autoencoders [11{13]. In all these examples, there is a Can machine learning (ML) provide ways to benchmark clear-cut objective function describing the cost associated the power and usefulness of NISQ devices? How can with each candidate solution. The task is then to opti- we capture the performance scaling of these devices as mize it exploiting both quantum and classical resources. a function of circuit depth, gate fidelity, and qubit con- Although optimization tasks offer a great niche of ap- nectivity? In this work, we design a hybrid quantum- plications, probabilistic tasks involving sampling have classical framework called data-driven quantum circuit most of the potential to prove quantum advantage in learning (DDQCL) and address these questions through the near-term [14{16]. For example, learning probabilis- simulations and experiments. tic generative models is in many cases an intractable arXiv:1801.07686v4 [quant-ph] 2 Jun 2019 Hybrid quantum-classical algorithms, such as the vari- task, and quantum-assisted algorithms have been pro- ational quantum eigensolver [2,3] (VQE) and the quan- posed for both gate-based [17, 18] and quantum annealing tum approximate optimization algorithm [4,5] (QAOA), devices [19{23]. Differently from optimization, the learn- provide ways to use NISQ computers for practical ap- ing of a generative model is not always described by a plications. For example, VQE is often used in quan- clear-cut objective function. All we are given as input is tum chemistry when searching the ground state of the a data set, and there are several cost functions that could electronic Hamiltonian of a molecule [6{8]. QAOA is be used as a guide, each one with their own advantages, used in combinatorial optimization to find approximate disadvantages, and assumptions. solutions of a classical Ising model [9] and it has been Here we present a hybrid quantum-classical approach demonstrated on a 19-qubit device for the task of clus- for generative modeling on gate-based NISQ devices which heavily relies on sampling. We use the 2N am- plitudes of the wave function obtained from a N-qubit quantum circuit to construct and capture the correla- ∗ Correspondence: [email protected] tions observed in a data set. As Born's rule determines 2 the output probabilities, this model belongs to the class II. RESULTS of models called Born machines [24]. Previous imple- mentations of Born machines [25{28] often relied on the The learning pipeline construction of tensor networks and their efficient ma- nipulation through graphical-processing units. Our work In this Section, we present a hybrid quantum-classical differs in that Born's rule is naturally implemented by a algorithm for the unsupervised machine learning task quantum circuit executed on a NISQ hardware. Follow- of approximating an unknown probability distribution ing the notation of subsequent work [29], we refer to our from data. This task is also known as generative model- quantum circuit Born machine generative model as a . ing. First, we describe the data and the model, then we present a training method. By employing the quantum circuit itself as a model for The data set = (x(1); ; x(D)) is a collection of D the data set, we also differentiate from quantum algo- independent andD identically··· distributed random vectors. rithms that target specific probability distributions. For The underlying probabilities are unknown and the target example, in Ref. [30] the authors developed a hybrid al- is to create a model for such distribution. For simplicity, gorithm to approximately sample from a Boltzmann dis- we restrict our attention to N-dimensional binary vectors tribution. The samples are used to update a classical x(d) 1; +1 N , e.g. black and white images. This generative model, which requires running the hybrid al- gives2 us {− an intuitiveg one-to-one mapping between obser- gorithm for each training iteration. In contrast, our work vation vectors and the computational basis of an N-qubit does not assume a Boltzmann distribution and therefore quantum system, that is x x = x1x2 xN . Note does not require a specific sampling beyond Born's rule. that standard binary encodings$ j i canj be used··· toi imple- ment integer, categorical, and approximate continuous Our work is also in contrast with other quantum- variables. assisted ML work (see e.g. Refs. [31{34]) requiring fault- Provided with the data set , our goal is now to tolerant quantum computers, which are not expected to obtain a good approximation toD the target probability be readily available in the near-term [35]. Instead, our distribution PD. A quantum circuit model with fixed circuits are carefully designed to exploit the full power depth and gate layout, parametrized by a vector θ, pre- of the underlying NISQ hardware without the need for a pares a wave function (θ) from which probabilities are j i 2 compilation step. obtained according to Born's rule Pθ(x) = x (θ) . Following a standard approach from generativejh j ma-ij On the benchmarking of NISQ devices, quantum vol- chine learning [39], we can minimize the Kullback- ume [9, 36] has been proposed as an architecture-neutral Leibler (KL) divergence [40] DKL[PD Pθ] from the cir- metric. It is based on the task of approximating a specific cuit probability distribution in the computationalj ba- class of random circuits and estimating the associated ef- sis Pθ to the target probability distribution PD. Min- fective error rate. This is very general and it is indeed imization of this quantity is directly related to the min- useful for estimating the computational power of a quan- imization of a well known cost function: the negative tum computer. In this paper, we propose the qBAS score, 1 PD (d) log-likelihood (θ) = D d=1 ln(Pθ(x )). However, a complementary metric designed for benchmarking hy- there is a caveat;C as− probabilities are estimated from brid quantum-classical systems. The score is based on frequencies of a finite number of measurements, low- the generative modeling performance on a canonical syn- amplitude states could lead to incorrect assignements. (d) (d) thetic data set which is easy to generate, visualize, and For example, an estimate Pθ(x ) = 0 for some x in validate for sizes up to hundreds of qubits. Yet, imple- the data set would lead to infinite cost. To avoid singu- menting a shallow circuit that can uniformly sample such larities in the cost function, we use a simple variant data is hard; we will show that some candidate solutions D require large amount of entanglement. Hence, any mis- 1 X (d) (θ) = ln(max(, Pθ(x ))); (1) calibration or environmental noise will affect this single Cnll −D performance number, enabling comparison between dif- d=1 ferent devices or across different generations of the same where > 0 is a small number to be chosen. Note that the device. Moreover, the score depends on the classical re- number of measurements needed to obtain an unbiased sources, hyper-parameters, and various design choices, estimate of the relevant probabilities may not scale favor- making it a good choice for the assessment of the hybrid ably with the number of qubits N. In the Supplementary system as a whole. Material we suggest alternative cost functions such as the moment matching error and the earth mover's distance.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us