Programming and Simulation of Quantum Agents
Total Page:16
File Type:pdf, Size:1020Kb
Saarland University Faculty of Natural Sciences and Technology I Department of Computer Science Diploma Thesis Programming and Simulation of Quantum Agents submitted by René Schubotz on 03/31/2007 Supervisor Dr. Matthias Klusch German Research Center for Artificial Intelligence Deduction and Multiagent Systems Advisor Dr. Matthias Klusch Reviewers Dr. Matthias Klusch Prof. Dr. Wolfgang Wahlster Statement Hereby I confirm that this thesis is my own work and that I have documented all sources used. Saarbrücken, 03/31/2007 Declaration of Consent Herewith I agree that my thesis will be made available through the library of the Computer Science Department. Saarbrücken, 03/31/2007 Contents 1 Introduction 9 2 A Quantum Computing Primer 11 2.1 Bras and Kets ....................................... 11 2.2 Quantum Bit Registers .................................. 11 2.3 Projective Measurement of Quantum Bits ....................... 12 2.4 Unitary evolution and reversibility ........................... 12 2.5 Quantum Entanglement ................................. 13 2.6 Quantum Computation ................................. 14 2.6.1 Elementary Quantum Gates ........................... 14 2.6.2 Universal Quantum Gates ............................ 15 2.7 Quantum Communication ................................ 16 2.7.1 Quantum Teleportation ............................. 16 2.7.2 Superdense Coding ................................ 18 2.7.3 No-Cloning Theorem ............................... 19 2.8 Quantum Oracles ..................................... 19 2.8.1 The Deutsch Oracle ............................... 19 2.8.2 The State Marker oracle ............................. 20 2.9 Quantum Algorithms ................................... 22 2.9.1 Grover’s Search .................................. 22 2.9.2 Quantum Pattern Matching ........................... 24 2.9.3 Quantum Associative Memory ......................... 25 3 Quantum Computers and Simulators 31 3.1 Hybrid Quantum Computers .............................. 31 3.2 Quantum Computing Design Flow ........................... 32 3.3 Quantum Computer Simulation ............................. 33 3.3.1 QuIDDPro .................................... 35 3.3.2 QCL ........................................ 35 3.3.3 libquantum .................................... 35 4 Quantum Computational Agents 37 4.1 A Conceptual Quantum Computational Agent .................... 37 4.2 QC Agents and QC Multi-Agent Systems ....................... 38 4.3 QC Agent Autonomy ................................... 40 5 Generic QC Agent Architecture QuantumInteRRap 41 6 Type-I Quantum Search Agent 47 6.1 Type-I Quantum Search Agent Architecture ...................... 48 6.2 Simulation and Benchmarking .............................. 50 1 2 CONTENTS 7 Type-II Quantum Agent for Service Selection 51 7.1 Graph Encoding and Quantum Graphs ......................... 52 7.2 I/O Signature Graphs and Service Selection ...................... 52 7.3 I/O Signature Graphs and Semantic Similarity .................... 54 7.4 Type-II Quantum Agent Architecture for Service Selection .............. 55 7.5 Simulation and Benchmarking .............................. 59 8 Conclusions 61 A Appendix 63 A.1 Examplaric Instance of QPM Algorithm ........................ 63 A.2 Examplaric Instance of Associative Quantum Memory ................ 64 A.3 Quantum Pattern Matching Scenarios ......................... 68 A.4 Libquantum Implementation of QPM Algorithm ................... 69 A.5 Libquantum Implementation of Quantum Associative Memory ........... 74 A.6 Libquantum Implementation of Controlled 2-qubit Gate ............... 79 List of Figures 2.1 Quantum teleportation scheme ............................. 16 2.2 Superdense coding scheme ................................ 18 2.3 Deutsch Oracle ...................................... 19 2.4 Circuit of a State Marker oracle ............................. 21 2.5 Reflection along |ai .................................... 21 2.6 Geometry of a Grover iteration ............................. 23 3.1 Master-slave hybrid quantum computer ........................ 31 3.2 Quantum design flow phases on a classical computer ................. 33 4.1 Conceptual QC agent on a hybrid quantum computer ................ 38 4.2 Classification of QC agents ............................... 39 5.1 QuantumInteRRap Knowledge Base .......................... 41 5.2 The QuantumInteRRap Agent Control Unit ...................... 42 5.3 QuantumInteRRap Behaviour-based Layer ....................... 43 5.4 QuantumInteRRap Local Planning Layer ....................... 43 5.5 QuantumInteRRap Cooperative Planning Layer .................... 44 5.6 QuantumInteRRap architecture ............................. 45 6.1 Conceptual hardware scheme of a Type-I QPM agent ................. 47 6.2 QuantumInteRRap architecture of a QPM based type-I quantum search agent ... 48 6.3 Comparing peak memory (a) and runtime (b) of QPM agent on quantum computing simulators ......................................... 50 7.1 Conceptual hardware scheme of a Type-II QSS agent ................. 51 7.2 Example taxonomy (a) and Web service I/O signature graph(b) ........... 52 7.3 Semantic similarity values for example request and advertisements (see how the subsumed service is pruned, although its input concepts perfectly match the request) 54 7.4 QuantumInteRRap architecture of a Type-II QSS agent ............... 55 7.5 Simple use cases for QSS agent ............................. 59 A.1 Example of amplitude distribution ........................... 63 3 4 LIST OF FIGURES List of Tables 3.1 Quantum simulators at a glance ............................. 34 4.1 Comparision of computational agents .......................... 39 6.1 (Quantum) Patterns of Behaviour for type-I QPM agent ............... 48 7.1 (Quantum) Patterns of Behaviour for type-II QSS agent ............... 56 5 6 LIST OF TABLES List of Algorithms 1 Simulated measurement of a n-qubit register ..................... 12 2 Grover’s algorithm in case of a unique solution .................... 22 3 Quantum pattern matching ............................... 24 4 Algorithm for creation of a quantum associative memory ............... 26 5 Algorithm for pattern retrieval from a quantum associative memory ........ 27 6 Building a I/O signature graph from Web service advertisement S ......... 53 7 Building a I/O signature graph from Web service request R ............. 53 7 8 LIST OF ALGORITHMS Chapter 1 Introduction Quantum computing technology based on quantum physics promises to deliver massively more powerful and faster performance for logistics, bioinformatics, cryptographic deciphering, and other applications. Quantum computing devices have been physically implemented since the late 1990’s by use of, for example, nuclear magnetic resonance, and solid state technologies. Rapid progress and current trends in nanoscale molecular engineering, as well as quantum computing research carried out across the globe could make it happen to let us see increasingly sophisticated quantum computing devices in the era 2020 to 2030. Proposed applications of quantum computation mainly focus on computational problems, such as prime factoring and database search, and cryptographic key exchange. However, the ability to distribute and manipulate entangled particles offers a new resource to aid multiparty strategic decision-making. The implied research challenge of agent based computing in such environments is how to make the most of the potential of quantum resources? Any answer to this question at the very moment will be, of course, highly speculative, although work in this direction already started. Building on the idea of quantum computational agents given in (Klu03), this thesis focuses on engineering aspects and proposes a generic architecture for quantum computational agents. Key idea is to appropriately extend one prominent generic agent architecture, namely InteRRap, to the case of computational agents that are supposed to run on a hybrid quantum computer, and that have the ability to perform quantum computation and communication. The principles of the proposed generic architecture for quantum computa- tional agents are demonstrated by means of a quantum search agent based on quantum pattern matching, and by means of a quantum agent for service selection. The remainder of this thesis is structured as follows. Chapter 2 initially delivers a brief, but self-contained introduction to the basic topics of quantum computation, and exposes the quantum circuit model (QRAM), a popular model of quantum computation. Based on QRAM, important quantum communication strategies and algorithms are explained in section 2.7, and in section 2.9 respectively. Quantum algorithms described in section 2.9 suit two purposes. First, they answer the question of how a quantum computer can be of avail for computational problems, and second they deliver the algorithmic foundations for the implementation of quantum computational agents in chapters 6 and 7. Chapter 3 envisions a hybrid quantum computer, i.e., a computing device consisting of a classical assembly that invokes and controls operations carried out on its quantum computational complement. In order to program and control such a computing device, a concep- tual layered software architecture for quantum computing design tools is described in section 3.2. Since sufficient and affordable quantum machinery is not available at the time, quantum computer simulators are indispensable tools for study and design of quantum algorithms.