Exploring Information for Quantum Machine Learning Models
Total Page:16
File Type:pdf, Size:1020Kb
University of Louisville ThinkIR: The University of Louisville's Institutional Repository Electronic Theses and Dissertations 12-2020 Exploring Information for Quantum Machine Learning Models Michael Telahun University of Louisville Follow this and additional works at: https://ir.library.louisville.edu/etd Part of the Data Science Commons, Numerical Analysis and Scientific Computing Commons, Other Computer Sciences Commons, and the Quantum Physics Commons Recommended Citation Telahun, Michael, "Exploring Information for Quantum Machine Learning Models" (2020). Electronic Theses and Dissertations. Paper 3433. Retrieved from https://ir.library.louisville.edu/etd/3433 This Master's Thesis is brought to you for free and open access by ThinkIR: The University of Louisville's Institutional Repository. It has been accepted for inclusion in Electronic Theses and Dissertations by an authorized administrator of ThinkIR: The University of Louisville's Institutional Repository. This title appears here courtesy of the author, who has retained all other copyrights. For more information, please contact [email protected]. Exploring Information for Quantum Machine Learning Models By Michael Telahun Master of Engineering Thesis Director: Daniel Sierra-Sosa Co-Director: Adel S. Elmaghraby Department of Computer Science and Engineering J.B. Speed Scientific School of Engineering University of Louisville Louisville KY, USA, 40292 December 2020 1 Exploring Information for Quantum Machine Learning Models Exploring Information for Quantum Machine Learning Models Abstract Quantum computing performs calculations by using physical phenomena and quantum mechanics principles to solve problems. This form of computation theoretically has been shown to provide speed ups to some problems of modern-day processing. With much anticipation the utilization of quantum phenomena in the field of Machine Learning has become apparent. The work here develops models from two software frameworks: TensorFlow Quantum (TFQ) and PennyLane for machine learning purposes. Both developed models utilize an information encoding technique amplitude encoding for preparation of states in a quantum learning model. This thesis explores both the capacity for amplitude encoding to provide enriched state preparation in learning methods and a deep analysis of data properties that provide insights into training data using a Variational Quantum Classifier (VQC). The advent of these new methods begs the question of how to best use these tools, we aim to give some overview explanation for the applicable state of quantum machine learning given actual device constraints. The results show there is a clear advantage for using amplitude encoding over other methods as we show using a hybrid quantum- classical neural network in TFQ. Additionally, there are several steps of preprocessing that can lead to more feature rich data when utilizing a VQC, in essence the no free lunch theorem holds true for quantum learning methods as it does in classical techniques. Information albeit encoded in a quantum form does not change the steps of preparing data but involves new ways to comprehend and appreciate these novel methods. 2 Exploring Information for Quantum Machine Learning Models Acknowledgements I would first like to thank my mother and father for supporting me through my journey in life so far. I would like to thank my advisor, Dr. Adel Elmaghraby for allowing me the opportunity to work in this exciting and innovative field of Quantum Machine Learning. Additionally, I would like to thank my advisor, Dr. Daniel Sierra-Sosa who without his guidance and mentorship I would likely never have working knowledge of this topic let alone have anything tangle to show for my effort. Through the ups and downs I appreciate what you all have done for me. 3 Exploring Information for Quantum Machine Learning Models Table of Contents Abstract ................................................................................................................................... 2 Acknowledgements .................................................................................................................... 3 1. Introduction........................................................................................................................... 6 2. Theoretical Background .......................................................................................................... 8 2.1 Classical Overview of Data Processing ................................................................................. 8 2.1.1 Raw Data as a Whole................................................................................................... 8 2.1.2 Feature Dependent Processing....................................................................................... 9 2.2 Post Analysis...................................................................................................................10 2.3 Machine Learning ............................................................................................................11 2.3.1 Learning Methods ......................................................................................................12 2.3.2 Learning – Optimization and Loss ................................................................................15 2.4 Quantum Computing ........................................................................................................18 2.5 Quantum Machine Learning...............................................................................................21 2.5.1 Parametric Quantum Classifiers ...................................................................................23 3. Background ..........................................................................................................................24 3.1 Literature Review.............................................................................................................24 3.2 Programming & Frameworks .............................................................................................26 3.2.1 TensorFlow Quantum .................................................................................................27 3.2.2 PennyLane ................................................................................................................27 3.2.3 Development & Non-Quantum Packages .......................................................................28 4. Datasets ...............................................................................................................................30 4.1 Scikit-Learn Generator Datasets .........................................................................................30 4.1.1 Make Blobs Dataset....................................................................................................30 4.1.2 Make Circles Dataset ..................................................................................................31 4.1.3 Make Moons Dataset ..................................................................................................31 4.1.4 Make Swiss Role Dataset ............................................................................................32 4.2 Toy Datasets ...................................................................................................................33 4.2.1 Iris Dataset................................................................................................................33 4.2.2 Wine Dataset .............................................................................................................34 5. Experiments .........................................................................................................................35 5.1 Quantum State Preparation ................................................................................................35 5.1.1 Basis Encoding ..........................................................................................................35 4 Exploring Information for Quantum Machine Learning Models 5.1.2 Angle Encoding .........................................................................................................36 5.1.3 Amplitude Encoding...................................................................................................37 5.2 TFQ Experimental Setup ...................................................................................................38 5.3 Analysis of TFQ Experiments – Hybrid Models ....................................................................41 5.3.1 Experiment: Eight-epochs ...........................................................................................42 5.3.2 Experiment: Fifty-epochs ............................................................................................45 5.4 Transformation for Learning in Quantum Models..................................................................49 5.4.1 Analysis of Make Blobs Dataset ...................................................................................49 5.4.2 Additional Analysis Leading to Future Work..................................................................54 6. Conclusion ...........................................................................................................................57 6.1 Future Discussion.............................................................................................................57 Appendix X .............................................................................................................................58