Quantum Computing Solutions Solving Real-World Problems Using Quantum Computing and Algorithms 1St Ed
Total Page:16
File Type:pdf, Size:1020Kb
Bhagvan Kommadi Quantum Computing Solutions Solving Real-World Problems Using Quantum Computing and Algorithms 1st ed. Bhagvan Kommadi Hyderabad, India Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-6515-4. For more detailed information, please visit www.apress.com/source- code. ISBN 978-1-4842-6515-4 e-ISBN 978-1-4842-6516-1 https://doi.org/10.1007/978-1-4842-6516-1 © Bhagvan Kommadi 2020 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 NY Plaza, New York NY 10004. Phone 1- 800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. Writing a book on quantum computing was harder than I thought and more rewarding than I could have ever imagined. None of this would have been possible without support from my parents. Table of Contents Part I: Introduction Chapter 1: Quantum Solutions Overview Introduction Real-Life Problems and Solutions Solution Benefits Solutions Cryptography Optimization Cybersecurity Summary Chapter 2: Mathematics Behind Quantum Computing Introduction Initial Setup Quantum Operators Code Sample Command for Execution Output Sets Code Sample Command for Execution Output Vectors Code Sample Command for Execution Output Matrices Code Sample Command for Execution Output Tensors Code Sample Command for Execution Output Summary Part II: Quantum Computing Basics Chapter 3: Quantum Subsystems and Properties Introduction Initial Setup Single Qubit System Code Sample Command for Execution Output Multiple Qubit System Quantum States Code Sample Command for Execution Output Quantum Protocols Quantum Entanglement Quantum Teleportation Quantum Operations Code Sample Command for Execution Output Quantum Transformations Kronecker Transformation Measure Gate Transformation Code Sample Command for Execution Output Summary Chapter 4: Quantum Information Processing Framework Introduction Initial Setup Quantum Circuits Quantum Communication Quantum Noise Quantum Error Correction Limitations of Quantum Computing Quantum Algorithms Deutsch–Jozsa Algorithm Simon’s Algorithm Shor’s Algorithm Grover’s Algorithm Quantum Subroutines Summary Chapter 5: Quantum Simulators Introduction Initial Setup Quantum Languages Qubit Measurement Quantum Instruction Sets Code Sample Command for Execution Output Full-Stack Universal Quantum Simulator Code Sample Command for Execution Output Quantum Assembly Programming Code Sample Command for Execution Output Quantum Hardware Platforms Commercially Available Quantum Computers Summary Chapter 6: Quantum Optimization Algorithms Introduction Initial Setup Approximate Optimization Algorithms Semidefinite Programming Code Sample Command Output QAOA Transportation Planning: Factors Code Sample Command Output Combinatorial Optimization Quantum NP (BQNP) Summary Part III: Quantum Solutions Chapter 7: Quantum Algorithms Introduction Initial Setup Quantum Least Squares Fitting Code Sample Command Output Quantum Sort Code Sample Command Output Code Command Output Quantum Eigen Solvers Quantum Semidefinite Programming Summary Chapter 8: Quantum Neural Network Algorithms Introduction Initial Setup Quantum ANN Classical Neural Networks Quantum Analogies to Neural Networks Code Sample Command Output Quantum Associative Memory Quantum Dots Quantum Random Access Memory Quantum GAN Code Sample Command Output Summary Chapter 9: Quantum Classification Algorithms Introduction Initial Setup Classifiers Quantum Classifiers Code Sample Command Output Variational Quantum Classifier Code Sample Command Output Classical SVM Quantum Sparse Support Vector Machines Code Sample Command Output Summary Chapter 10: Quantum Data Processing Introduction Initial Setup Classical K-Means Code Sample Command Output Quantum K-Means Code Sample Command Output Classic K-Medians Code Sample Command Output Quantum K-Medians Classical Clustering Quantum Clustering Code Sample Command Output Quantum Manifold Embedding Summary Chapter 11: Quantum AI Algorithms Introduction Initial Setup Quantum Probability Classic Walks Quantum Walks Code Sample Command Output Code Sample Command Output Classic Search Quantum Search Quantum Deep Learning Code Sample Command Output Quantum Parallelism Summary Chapter 12: Quantum Solutions Introduction Initial Setup Traveling Salesman Problem Scheduling Fraud Detection Distribution Solutions Code Sample Command Input Output Summary Chapter 13: Evolving Quantum Solutions Introduction Initial Setup Quantum Annealing Quantum Key Distribution Quantum Teleportation Code Sample Command Output Code Sample Command Output Code Sample Command Output Summary Chapter 14: Next Steps Best Practices Case Studies Applications Smart Cities Limitations of Quantum Computing Quantum Computing News Sources The Future of Quantumware Enterprise Software and Services for Quantum Computing Quantum Machine Learning Summary Index About the Author Bhagvan Kommadi is the founder of Architect Corner, an AI startup, and he has 20 years of industry experience ranging from large-scale enterprise development to helping incubate software product startups. He has a master’s degree in industrial systems engineering from Georgia Institute of Technology and a bachelor’s degree in aerospace engineering from the Indian Institute of Technology, Madras. He is a member of the IFX forum, a member of Oracle JCP, and a participant in Java Community Process. Bhagvan founded Quantica Computacao, the first quantum computing startup in India. He has engineered and developed simulators and tools in quantum technology using IBM Q, Microsoft Q#, and Google QScript. The company’s focus is developing quantum cryptographic tools to provide quantum proof data security, which will help banking institutions protect their transactions. He is now the director of product engineering at Value Momentum. Value Momentum offers a social network for doctors (White Coats) and provides telehealth support through the Practice Plus suite of products and services. Bhagvan has published papers and presented at IEEE, AstriCon, Avios, DevCon, PyCon, and genomics and biotechnology conferences on topics including adaptive learning, AI Coder, and more. He is a hands-on CTO who has contributed to open source, blogs, and the latest technologies such as Go, Python, Django, node.js, Java, MySQL, Postgres, Mongo, and Cassandra. He was the technical reviewer for the book Machine Learning with TensorFlow and is the author of Hands-on Data Structures and Algorithms with Go and Paytech and The Payment Technology Handbook for Investors, Entrepreneurs, and FinTech Visionaries. About the Technical Reviewer Mr. Nixon Patel is a visionary leader, an exemplary technocrat, and a successful serial entrepreneur with a proven track record for growing 7+ businesses from startup to millions in annual sales and 1,000+ employees with large technology and operations organizations across the globe in the quantum computing, artificial intelligence, deep learning, big data analytics, cloud, IOT, speech recognition, machine learning, renewable energy, information technology, telecom, and pharmaceutical industries, all in a short span of 30 years. Most recently he exited an AI and deep learning company with a 5X valuation; before that he was the chief data scientist at Brillio, a sister company of Collabera, where he was instrumental in starting the big data analytics, cloud, and IOT practices. He has a bachelor’s of technology degree (hons) in chemical engineering from IIT Kharagpur, a master’s of science in computer science from New Jersey Institute of Technology, a data science specialization from Johns Hopkins University, and a certificate in quantum computing and information from the Massachusetts Institute of Technology. He is currently pursuing a second master’s in business and science in analytics from Rutgers University. Currently he holds the positions of adjunct professor and mentor at IIT Hyderabad and NSHM College Kolkata. Part I Introduction © Bhagvan Kommadi 2020 B. Kommadi, Quantum Computing