Arxiv:1805.11250V2 [Quant-Ph] 9 Jan 2019 J=1 Ilarly to an Analog-Encoding Unitary Transformation, We
Total Page:16
File Type:pdf, Size:1020Kb
Quantum analog-digital conversion Kosuke Mitarai,1, ∗ Masahiro Kitagawa,1, 2 and Keisuke Fujii3, 4, y 1Graduate School of Engineering Science, Osaka University, 1-3 Machikaneyama, Toyonaka, Osaka 560-8531, Japan. 2Quantum Information and Quantum Biology Division, Institute for Open and Transdisciplinary Research Initiatives, Osaka University, 1-3 Machikaneyama, Toyonaka, Osaka 560-8531, Japan. 3Graduate School of Science, Kyoto University, Yoshida-Ushinomiya-cho, Sakyo-ku, Kyoto 606-8302, Japan. 4JST, PRESTO, 4-1-8 Honcho, Kawaguchi, Saitama 332-0012, Japan. (Dated: January 10, 2019) Many quantum algorithms, such as Harrow-Hassidim-Lloyd (HHL) algorithm, depend on oracles that efficiently encode classical data into a quantum state. The encoding of the data can be cat- egorized into two types; analog-encoding where the data are stored as amplitudes of a state, and digital-encoding where they are stored as qubit-strings. The former has been utilized to process classical data in an exponentially large space of a quantum system, whereas the latter is required to perform arithmetics on a quantum computer. Quantum algorithms like HHL achieve quantum speedups with a sophisticated use of these two encodings. In this work, we present algorithms that converts these two encodings to one another. While quantum digital-to-analog conversions have implicitly been used in existing quantum algorithms, we reformulate it and give a generalized protocol that works probabilistically. On the other hand, we propose a deterministic algorithm that performs a quantum analog-to-digital conversion. These algorithms can be utilized to realize high-level quantum algorithms such as a nonlinear transformation of amplitudes of a quantum state. As an example, we construct a \quantum amplitude perceptron", a quantum version of the neural network, and hence has a possible application in the area of quantum machine learning. I. INTRODUCTION since data are encoded into analog quantities, that is, complex amplitudes of a quantum state. Here we define A wide variety of quantum algorithms that potentially an analog-encoding unitary transformation UA(fcjg) by: give quantum speedups over classical computers has been X proposed. The problems that are efficiently solved by ex- UA(fcjg) j0i = cj jji : (2) isting quantum algorithms can be divided into two types: j ones where input data of a problem is relatively small in Another approach is to encode m-bits of binary data size but the problem itself is hard classically, and ones into qubit-strings. Let N and d = fd(k)gm (d(k) = where the input of a problem is exponentially large, mak- j j k=1 j 0; 1, j = 1; ··· ;N) be the number of binary data pro- ing it hard to handle on classical computers. The formers vided and the data bitstrings. In this approach, data are are solved by algorithms such as Shor's factoring [1], or encoded as follows: quantum chemistry calculations [2]. On the other hand, there are algorithms that solve problems categorized as N N 1 X 1 X (m) (1) the latter. They achieve quantum speedups only if an or- p jji jdji = p jji jd ··· d i : (3) N N j j acle that encodes N classical data in O(poly(log N)) time j=1 j=1 exists [3]. A famous example is Harrow-Hassidim-Lloyd We will call this state as a \digital-encoded" state. For (HHL) algorithm [4], which is an algorithm to apply a in- example, quantum algorithms for solving semidefinite verse A−1 of a matrix A to a N = 2n-dimensional vector N programs (SDPs) [11, 12] depends on this encoding. Sim- fcjg . It requires us to construct a quantum state: arXiv:1805.11250v2 [quant-ph] 9 Jan 2019 j=1 ilarly to an analog-encoding unitary transformation, we N define a digital-encoding unitary transformation by X c jji ; (1) j UD(fdj g) jji j0i = jji jdji : (4) j=1 UD is often called quantum random access memory N PN 2 where fcjg normalized to satisfy jcjj = 1. (QRAM). Refs. [13, 14] have provided a protocol which j=1 j=1 2 Data encoding in the format of Eq. (1) is crucial for all employs qutrits to speedup a memory call to O(log N) HHL-based algorithms [5{8], and others [9, 10]. We will two-body interaction gates. Their method is promising call the state of Eq. (1) as an \analog-encoded" state, compared to a conventional method that requires O(N) operations. It might be worth noting that in the context of QRAM, it is usually assumed that we already have \memory cells" which stores data in the form accessible ∗ [email protected] from a quantum computer. The O(log2 N) operations do y [email protected] not include the construction of them. 2 Many quantum algorithms sophisticatedly use these (a) Analog-encoding two types of encodings. For example, in HHL algorithm � [4], an analog-encoded state Eq. (1) is put through quan- �� � tum phase estimation algorithm that digitally encode �=1 eigenvalues fλ g of a matrix A, and then the inverse Classical data j Encode QADC QDAC of them are multiplied to the amplitudes by controlled rotations (Fig. 1 (b)); in quantum metropolis sampling �� , �� Digital-encoding [15], energy eigenvalue fEjg of a Hamiltonian is first dig- itally encoded by the phase estimation, and then the en- � coded energies are transferred to amplitudes in the form 1 � −β(E −E ) � |� ⟩ of e j k , again using controlled rotations. (b) HHL algorithm � �=1 In this paper, we investigate the relation between these two different encoding methods. Specifically, we con- Vector Eigenvalue of matrix centrate on conversions between these two encodings; �� �Phase� estimation� can you go from \digital-encoding" to \analog-encoding" Analog-/ digital- Analog-encoding Analog-encoding (quantum digital-to-analog conversion, QDAC), or the encoding QDAC other way around (quantum analog-to-digital conversion, � � � −1 QADC)? DAC and ADC play important roles in classi- � � � � � � � � � � �=1 � � |� ⟩ �=1 cal information processing, since digitally-stored data are �=1 easier to handle than analog data which physical systems generate and are driven by. QDAC and QADC can be re- FIG. 1. (a) Schematic sketch of analog-encoding and digital- encoding. QDAC and QADC mediates these two encod- garded as quantum analogs of them, and therefore there ings. (b) A brief flowchart of HHL algorithm [4]. fjaj ig de- is a possibility that they stimulate the construction of note eigenvectors of a Hermitian matrix A, each correspond- more sophisticated quantum algorithms. ing to eigenvalues fλj g. χj are complex numbers such that First, we formulate these problems. It is shown that PN PN xj jji = χj jaj i. QDAC can be implemented probabilistically, and QADC j=1 j=1 deterministically. A special case of QDAC, in fact, has implicitly been employed in existing algorithms such as can be constructed in time O(N log2 N) on a classical HHL and quantum metropolis samplings. We unify those computer. With this structure, there exists a quantum techniques and give a generalized procedure. QDAC and algorithm that constructs an analog-encoding unitary QADC algorithms provide an insight into what should be N UA(fxjgj=1) with O(log Npoly(log log N)) single- and done in digital- or analog-encodings. Also, as an applica- two-qubit gates. tion, we show that a QADC-QDAC combined method can be utilized to perform almost arbitrary nonlinear We use the phase estimation algorithm stated below transformations of amplitudes of a quantum state. This as a key ingredient of our QADC algorithm. result can be utilized, for example, for a purpose of con- structing quantum machine learning algorithms. Fact 2 (phase estimation [18]) Let U be a unitary This paper is organized as follows. First in Sec. II, operator acting on M-qubit Hilbert space with eigenstates we summarize the algorithms we use as subroutines and M M fj ig2 and corresponding eigenvalues fe2πiφj g2 define QADC and QDAC problem. In Sec.III, we re- j j=1 j=1 where φ 2 [0; 1). Let = 2−m for some positive view QDAC procedures that have implicitly been utilized j integer m. There exists a quantum algorithm, which in existing algorithms. We also present the generalized consists of O(1/) controlled-U calls and O(log2(1/)) QDAC procedure. Then in Sec.IV, we present an algo- single- and two-qubit gates, that performs transforma- rithm to perform QADC. In Sec. V, we provide appli- P2M ⊗m P2M ~ cations of QADC, and show that QADC combined with tion j=1 aj j ji j0i ! j PEi = j=1 aj j ji jφji QDAC provides us a way to perform a nonlinear trans- ~ ~ (1) ~ (2) ~ (m) where φj denotes a bitstring φj φj ··· φj such that formation of amplitudes of a quantum state. Pm ~(k) −k j k=1 φj 2 − φjj ≤ for all j with state fidelity at least 1 − poly(). II. PRELIMINARY We say that j ~i has fidelity 1−δ with j i when j h ~j i j = 1−δ. The phase estimation algorithm can also be viewed Here we summarize some useful results from existing as a digital-encoding unitary transformation, where the works along with definitions of terms. Throughout this address is replaced by eigenstates of U. paper N = 2n denotes the number of data. Next we state a version of the amplitude amplification technique. Fact 1 (analog encoding unitary [16, 17]) N N For given classical data fxjgj=1 2 R such that Fact 3 (amplitude amplification [19]) Suppose we PN 2 j=1 xj = 1, a binary-tree like classical data structure have a unitary operator U that acts on M-qubit Hilbert 3 space as U j0i⊗M = α j i j0i + β jGi j1i where j i ; jGi A similar title is found on Ref.