Evolution of a Human-Competitive Quantum Fourier Transform Algorithm Using Genetic Programming Paul Massey John A. Clark Susan Stepney Department of Computer Science, University of York, Heslington, York, UK, YO10 5DD {psm111 | jac | susan}@cs.york.ac.uk ABSTRACT In this paper, we show how genetic programming (GP) can be used to evolve system-size-independent quantum algorithms, and present a human-competitive Quantum Fourier Transform (QFT) algorithm evolved by GP. Categories and Subject Descriptors D.1.m [Programming Techniques]: Miscellaneous, J.2 [Physical Sciences and Engineering]: Physics. General Terms Algorithms, Experimentation. Keywords Genetic Programming, Genetic Algorithms, Evolutionary Computing, Quantum Computing, Quantum Fourier Transform. 1. INTRODUCTION Quantum Computing [4],[12] is a radical new paradigm that has the potential to bring a new class of previously intractable problems within computational reach. Harnessing the phenomena of superposition and entanglement, a quantum computer can perform certain operations more efficiently than classical (non- quantum) computers. The earliest example of a ‘faster than classical’ quantum algorithm was Deutsch’s quantum solution to the binary promise algorithm. Here a single quantum evaluation suffices to reveal whether a binary function f is constant (f(0) = f(1) = 0 or f(0) = f(1) = 1) or balanced (f(0) = 0, f(1) = 1 or f(0) = 1, f(1) = 0). (This can be extended to n-input binary functions.) Various other faster than classical algorithms followed, but real excitement was generated in 1994 by Peter Shor with a specific application of the Quantum discrete Fourier Transform. The Quantum Fourier Transform (QFT) is perhaps the most important building block in the quantum algorithm designer’s armoury. It has a variety of applications (Chapter 5 of [10] gives a variety of specific solvable instances of the hidden subgroup problem such as Deutsch’s problem, Simon’s problem, period finding, order finding, hidden linear function finding), but the most important application is undoubtedly its use by Shor to provide a polynomial time quantum algorithm for factorisation of composite integers and the calculation of discrete logarithms in a finite field [14][15]. Some of the best-known and widely respected encryption algorithms in the world rely on these problems being computationally intractable. Shor had provided what is regarded by most as the ‘killer application’ for quantum computing. The field began to attract huge interest. One might imagine that there would be a flood of new algorithms to harness the power of this rapidly emerging means of computation. However, this has not been the case. It is generally agreed that there are still very few distinct quantum algorithms (see [10]). This motivates our investigation of genetic programming in the quantum algorithm field. Genetic programming has discovered new artefacts in other domains. Indeed, its use has produced various patentable outputs. Can it exhibit human-competitive performance for quantum algorithm design? In this paper we show how GP has been used to evolve a human competitive algorithm for the Quantum Fourier Transform (QFT). We show how circuits can be evolved using GP that implement the QFT for 1, 2, and 3 qubits. This is, however, the prelude to the main result of this paper: the evolution of an algorithm for the QFT, which when executed with specific system size (i.e. number of qubits) generates a circuit that implements the corresponding QFT. We believe this is the most significant quantum artefact yet evolved using evolutionary computing. It would appear to compete (in this instance) with the efforts of professional quantum specialists. The power of the result comes from its generality. The drive to ever-increasing levels of abstraction goes hand in hand with increases in design sophistication in many domains (most notably software engineering). The need to handle things at a higher level is recognised by quantum specialists. It informs the evolutionary frameworks in the pioneering work of Spector and co-researchers (see below), from which we freely draw inspiration. In Section 3 we detail the software framework we have used to evolve quantum artefacts, indicating how solutions are represented and manipulated. In Section 4 we provide details of the various fitness functions used. In Section 5 we provide details of the QFT and known implementations. In section 6, we provide some of the circuits we have evolved together with the system size independent algorithm for generating QFT circuits. Section 7 concludes. First, we review current applications of meta-heuristic search to the design and exploration of quantum artefacts. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. GECCO’05, June 25-29, 2005, Washington, DC, USA. Copyright 2005 ACM 1-59593-010-8/05/0006…$5.00. 1657