
How to Efficiently Handle Complex Values? Implementing Decision Diagrams for Quantum Computing Alwin Zulehner, Stefan Hillmich, and Robert Wille Institute for Integrated Circuits, Johannes Kepler University Linz, Austria [email protected] [email protected] [email protected] Abstract—Quantum computing promises substantial speedups ples of the potential of those representations. Corresponding by exploiting quantum mechanical phenomena such as superpo- implementations (usually denoted DD packages) as provided sition and entanglement. Corresponding design methods require by Fabio Somenzi’s CUDD package [8], the Word-level-DD efficient means of representation and manipulation of quantum functionality. In the classical domain, decision diagrams have package [9], or Donald Knuth’s BDD package [10] affect been successfully employed as a powerful alternative to straight- the development of design tools and methods until today. forward means such as truth tables. This motivated extensive Motivated by that, in the past years, researchers spent con- research on whether decision diagrams provide similar potential siderable efforts in the investigation of whether decision in the quantum domain—resulting in new types of decision diagrams can also be utilized in the quantum computing diagrams capable of substantially reducing the complexity of representing quantum states and functionality. From an imple- realm. This led to several theoretical and mathematical con- mentation perspective, many concepts and techniques from the cepts of decision diagrams such as X-decomposition Quan- classical domain can be re-used in order to implement deci- tum Decision Diagrams (XQDDs, [11]), Quantum Decision sion diagrams packages for the quantum realm. However, new Diagrams (QDDs, [12]), Quantum Information Decision Dia- problems—namely how to efficiently handle complex numbers— grams (QuIDDs, [13]), or Quantum Multiple-valued Decision arise. In this work, we propose a solution to overcome these problems. Experimental evaluations confirm that this yields Diagrams (QMDDs, [14], [15])—leading to more efficient improvements of orders of magnitude in the runtime needed methods for the design tasks outlined above, i.e., synthe- to create and to utilize these decision diagrams. The resulting sis [16]–[18], simulation [19]–[21], or verification [11], [22], implementation is publicly available as a quantum DD package [23]. at http://iic.jku.at/eda/research/quantum dd. However, besides the mathematical concepts, efficient im- I. INTRODUCTION plementations of the corresponding decision diagrams for quantum computing are needed in order to eventually utilize Quantum computing [1] promises significant speedups for them for design automation at large scale—an issue that certain problems, e.g., integer factorization [2], database has not explicitly been addressed thus far. Key concepts search [3], and quantum chemistry [4]. Unlike bits in a required for implementing DD packages—such as unique classical computer, which can only assume one of the two tables, garbage collection with reference counts, or compute basis states 0 and 1, qubits in a quantum computer can be in an tables—are already known from the classical domain (which, (almost) arbitrary superposition of both. Superposition in com- also in the ’90s, have explicitly been investigated, e.g., in [24]– bination with other quantum phenomena such as entanglement [26]). While these implementation techniques can be directly and phase shifts allows for an exponential speedup compared incorporated into decision diagrams addressing quantum com- to classical computers in the best case. Not surprisingly, this puting, the quantum realm additionally requires an efficient triggered a huge interest in the utilization of quantum devices handling of complex numbers. These complex numbers intro- which, recently, led to first realizations provided by large duce several new problems such as how to keep numerical commercial players such as IBM and Google. stability, how to efficiently store nodes in unique tables, as These developments are currently progressing to a point well as how to store reoccurring operations in compute tables. arXiv:1911.12691v1 [quant-ph] 28 Nov 2019 where straightforward automated approaches for, e.g., syn- None of these issues have explicitly been considered thus far. thesis, simulation, or verification, become indispensable since corresponding quantum states as well as quantum operations In this work, we provide details on how to efficiently are mathematically described through state vectors and unitary implement a DD package for quantum computing addressing matrices which grow exponentially in size with respect to the these problems. Established concepts known from decision number of involved qubits. diagrams in the classical domain are re-used where applicable, In the classical domain, the design automation commu- while new implementation techniques for handling complex nity successfully addressed such challenges by introducing values efficiently are described in detail. Experimental results decision diagrams which, in many cases, allow for a com- confirm that these efficient implementation techniques yield pact representation of functionality. Impressive accomplish- improvements of orders of magnitude with respect to runtime ments in the ’90s, e.g., with Binary Decision Diagrams compared to the best known implementations available today. (BDDs, [5]), Binary Moment Diagrams (BMDs, [6]), or An implementation of the resulting DD package is publicly Zero-suppressed Decision Diagrams (ZDDs, [7]), are exam- available at http://iic.jku.at/eda/research/quantum dd. The remainder of this paper is structured as follows: Sec- jq0i H jq0i H tion II briefly reviews the basics of quantum computing and applicable decision diagrams. In Section III, we recapitulate jq1i jq1i implementation techniques used for classical DD packages before discussing problems related to the extension of them (a) Circuit with H and CNOT gate (b) Single Hadamard operation into the quantum domain. Based on that, Section IV describes Fig. 1: Quantum circuits in detail how the corresponding problems can efficiently be handled—yielding an efficient implementation of a DD B. Decision Diagrams for Quantum Computing package for quantum computing. Eventually, the contributions Since the unitary matrices representing quantum function- of this work have been incorporated into an implementation ality grow exponentially with respect to the number of qubits, of a DD package for quantum computing whose performance i.e., the size of the quantum system, representations based on is evaluated and compared to the state of the art in Section V. two-dimensional arrays quickly become infeasible. However, Finally, the paper is concluded in Section VI. the structure of many explicitly used matrix instances offers the potential to exploit redundancies and, by this, allow for a II. BACKGROUND drastically more compact representation (while still preserving In this section, we review the basics of quantum computing an efficient manipulation). As in the classical realm, this is and decision diagrams for representing quantum functionality. exploited by decision diagrams such as [11]–[15]. These deci- sion diagrams represent the matrix as a directed acyclic graph, A. Quantum Computing where identical sub-matrices are combined in a shared graph Computations in the quantum realm use qubits, which can structure. Further potential for redundancies can be achieved assume more states than the basis states (here, written as j0i by sharing (sub-)graphs which are structurally equivalent and and j1i using Dirac-notation) used in classical computations. only differ by a common factor (to be annotated as a weight A quantum state j i is given by α · j0i + β · j1i with to the corresponding edges). The following example illustrate complex-valued amplitudes α; β. Following this description, the main ideas: jαj2 and jβj2 are the probabilities to measure the base state j0i or j1i, respectively, and, therefore, their sum jαj2 + jβj2 Example 2. Figure 2 shows different representations of the has to be equal to 1. quantum functionality shown in Figure 1b, i.e., described Manipulation of a quantum state is achieved by a sequence by the Kronecker-product H ⊗ I2. In Figure 2a, the corre- of “simple” quantum operations (also denoted quantum gates) sponding unitary matrix is shown, while Figure 2b shows that are described by unitary matrices acting on one or a corresponding decision diagram structure. In this graph, more qubits each. Such sequences of quantum operations are the root node labeled q0 represents the whole matrix, while represented by circuit diagrams that indicate (from left to right) the four outgoing edges point to nodes that represent the which operations are applied to which qubits. top-left, top-right, bottom-left, and bottom-right sub-matrices (from left to right, hinted in the matrix by dashed lines). These Example 1. Common operations performed on single qubits 2 × 2 sub-matrices (representing functionality with respect are the NOT operation X, the Hadamard operation H to set a to q1 only and, hence, represented by nodes labeled q1) are qubit into superposition, and the phase shift operation T. The further decomposed—yielding single complex values (or 1 × 1 corresponding unitary matrices are defined as sub-matrices) represented by terminal nodes. As shown in Figure 2a, the top-left, top-right, and bottom-left sub-matrices 0 1 1 1 1 1 0 X = ;H = p , and T = iπ : are identical
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-