
Introduction to Machine Learning and Quantum Computing CHEM 584: Lecture Notes Prof. Victor S. Batista Zoom: Meeting ID: 943 8610 8716, Passcode: victor Tuesdays and Thursdays 11:35 am – 12:50 pm Yale University - Department of Chemistry 1 Contents 1 Syllabus 6 2 Feedforward Neural Networks 7 2.1 Gradient Descent . 8 2.1.1 Stochastic Gradient Descent . 9 2.1.2 Exercise: Gradient Descent . 9 2.2 Colab, Python, Tensorflow, Keras and Pytorch . 10 2.3 Activation Functions . 11 2.3.1 Linear Activation . 11 2.3.2 Non-linear Activation . 11 2.3.2.1 Classification and Non-linear Regression Problems . 12 2.3.2.1.1 Optional Exercise: . 12 2.3.3 Vanishing Gradient Problem . 13 2.3.4 Validation, Cross Validation and Bootstrapping . 14 2.3.4.1 Exercise: Bootstrapping . 15 2.4 Tutorial Assignment on Hammett Neural Networks with Keras/TensorFlow . 15 2.5 Tutorial Regressive Models for Chemical Predictions with Scikit-Learn . 15 2.6 Prediction of Molecular Toxicity by Linear Classification with DeepChem . 15 2.6.1 Training . 16 2.6.2 Overfitting Problem . 16 2.6.3 Regularization . 17 3 Clustering and Regression Algorithms 18 3.1 Random Forest . 18 3.1.1 Entropy and Gini . 19 3.2 K-means Algorithm . 19 3.3 K-Nearest Neighbors Algorithm . 20 3.4 Unsupervised Classification Assignment: K-means and Random Forest . 20 4 Convolutional Neural Networks (CNN): Alphafold 21 5 Graph Convolutional Networks (GCN) 24 5.1 Propagation Rules . 25 5.2 Prediction of NMR Chemical Shifts by Graph Convolutional Networks . 25 5.3 Prediction of Solubilities by Graph Convolutional Networks with DeepChem . 26 5.4 Introduction to classification by Graph Convolutional Networks with DeepChem . 26 6 Recurrent Neural Networks (RNN) 27 7 Autoencoders 29 7.1 RNN, CNN and Multi-Head Attention Autoencoders . 30 7.1.1 Attention Mechanism . 31 7.2 Variational Autoencoders (VAE) and Generative Adversarial Networks (GAN) . 32 7.2.1 Maximum Mean Discrepancy Method . 33 7.3 Time Series Prediction: Dynamical Mode Decomposition ............ 34 7.4 Hybrid Quantum-Classical Neural Network ..................... 39 7.5 Variational Optimization with Hybrid Neural Networks . 40 2 7.5.1 Quantum Computation . 40 7.5.2 Hybrid Quantum-Classical Computation . 40 7.5.3 Variational Quantum Eigensolver . 40 8 Qubits and Gates 41 8.1 Single qubit gates . 41 8.2 Rotations . 42 8.3 Multiple qubits . 42 8.4 The CNOT gate . 43 8.5 Hadamard Gate . 43 9 Superconducting Circuits: IBM Quantum Computer 44 9.1 Transmon: Capacitively Shunted Junction . 46 9.2 Kerr Hamiltonian ..................................... 49 9.3 SQUID: Tunable Junction . 51 9.4 Cooper Pair Box: Charge Qubit . 52 9.4.1 CPB Eigenstates . 52 9.4.2 NMR Hamiltonian . 53 9.4.3 State Preparation and Control . 54 9.5 Split Cooper Pair Box . 55 9.6 Transmon Coupled to a Resonator . 56 9.6.1 Quantization . 57 9.6.2 Resonant and Dispersive Limits ........................ 58 9.6.2.1 Resonant Limit: . 58 9.6.2.2 Dispersive Limit: . 58 10 Dicke Model and Jaynes-Cummings Hamiltonian 60 11 Grover’s Algorithm 61 11.1 Supplement I: Average Deviation Caused by the Oracle . 66 11.2 Supplement II: Optimal Number of Queries . 68 11.3 Supplement III: Average Success Probability of Grover’s Algorithm . 70 12 Iterative Power Algorithm: Classical Amplitude Amplification 71 12.1 Convergence . 71 13 Bernstein-Vazirani Algorithm: Exponential Speedup from Superpositions 72 13.1 Hadamard Transform of Arbitrary Strings . 73 14 Phase Kickback 74 15 Hadamard Gate with Beam Splitters: Mach-Zehnder interferometer 74 16 Deutsch Algorithm 79 17 Simon’s Algorithm 80 3 18 Quantum Fourier Transform 85 18.1 Properties of the Fourier transform .......................... 86 18.2 Quantum Phase Estimation .............................. 90 18.3 Period Finding ....................................... 98 18.4 Shor’s Algorithm ..................................... 99 19 Appendix I: Golden Rule 101 19.1 Monochromatic Plane Wave .............................. 101 20 Appendix II: Coherent States 105 20.1 Overlap . 106 20.2 Closure . 106 20.3 Wavefunctions . 107 20.4 Expectation Values . 107 20.4.1 Optical Equivalence Theorem . 108 20.4.2 P-representation of the density operator . 108 20.4.2.1 Pure coherent state . 109 20.4.2.2 Pure number state . 110 20.4.3 P-representation of operators . 111 20.5 Dynamics . 111 20.6 Parity Operator . 112 21 Appendix III: Python 114 21.1 A Brief Note on Python Versions . 114 21.1.1 Basics of Python . 114 21.1.1.1 Basic data types . 114 21.1.1.1.1 Numbers . 115 21.1.1.1.2 Booleans . 115 21.1.1.1.3 Strings . 116 21.1.1.2 Containers . 117 21.1.1.2.1 Lists . 117 21.1.1.2.2 Slicing . 118 21.1.1.2.3 Loops . 118 21.1.1.2.4 List comprehensions: . 119 21.1.1.2.5 Dictionaries . 119 21.1.1.2.6 Sets . 121 21.1.1.2.7 Tuples . 122 21.1.1.3 Functions . 123 21.1.1.4 Classes . 124 21.1.1.5 Modules . 126 21.1.2 Numpy . 126 21.1.2.1 Arrays . 126 21.1.2.2 Array indexing . 128 21.1.2.3 Datatypes . 131 21.1.2.4 Array math . 131 21.1.2.5 Broadcasting . 134 21.1.3 Matplotlib . 137 21.1.3.1 Plotting . 137 4 21.1.3.2 Subplots . 139 21.2 Torch tensor . 140 5 1 Syllabus Machine learning and quantum computing have emerged as leading technologies of the twenty- first century and are expected to be increasingly applied to address a wide variety of chemical and materials science challenges. The goal of this course is to introduce fundamental concepts of machine learning and quantum computing to chemists and materials science students through an overview of algorithms, computational methods, and applications. It is intended to empower students to engage with this emerging field and foster the growing field of artificial intelligence for accelerated scientific discoveries in the molecular and physical sciences. Textbooks. Recommended textbooks for this class are: R1:"Pattern Recognition and Machine Learning" by Christopher M. Bishop (Springer, 2006). (pdf) (matlab) R2: "Deep Learning" by Ian Goodfellow, Yoshua Bengio and Aaron Courville. (pdf) (github). R3: "Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD" by Jeremy Howard and Sylvain Gugger. (github) R4: "Dive into Deep Learning" by Jeremy Howard and Sylvain Gugger. (pdf) R5: "Quantum Computation and Quantum Information" by Michael A Nielsen and Isaac L. Chuang (Cambridge). R6: "An Introduction to Quantum Computing" by Phillip Kaye, Raymond Laflamme and Michele Mosca (Oxford University Press). (pdf) R7: "Learn Quantum Computation Using Qiskit" and notebook. Our lecture notes will be updated according to the pace of the course and suggestions.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages142 Page
-
File Size-