100% found this document useful (1 vote)
33 views

Supervised Learning with Quantum Computers Maria Schuld download

The document discusses the book 'Supervised Learning with Quantum Computers' by Maria Schuld and Francesco Petruccione, which aims to explore the intersection of quantum computing and machine learning. It highlights the growing interest in quantum technologies and machine learning, emphasizing the need for interdisciplinary research in quantum machine learning. The book serves as an introduction to key concepts, ideas, and algorithms in this emerging field, targeting readers with a background in physics or computer science.

Uploaded by

feltstrixy1i
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
33 views

Supervised Learning with Quantum Computers Maria Schuld download

The document discusses the book 'Supervised Learning with Quantum Computers' by Maria Schuld and Francesco Petruccione, which aims to explore the intersection of quantum computing and machine learning. It highlights the growing interest in quantum technologies and machine learning, emphasizing the need for interdisciplinary research in quantum machine learning. The book serves as an introduction to key concepts, ideas, and algorithms in this emerging field, targeting readers with a background in physics or computer science.

Uploaded by

feltstrixy1i
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Supervised Learning with Quantum Computers Maria

Schuld download

https://textbookfull.com/product/supervised-learning-with-
quantum-computers-maria-schuld/

Download more ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Quantum Computation and Logic How Quantum Computers


Have Inspired Logical Investigations Maria Luisa Dalla
Chiara

https://textbookfull.com/product/quantum-computation-and-logic-
how-quantum-computers-have-inspired-logical-investigations-maria-
luisa-dalla-chiara/

Supervised Learning with Python: Concepts and Practical


Implementation Using Python Vaibhav Verdhan

https://textbookfull.com/product/supervised-learning-with-python-
concepts-and-practical-implementation-using-python-vaibhav-
verdhan/

Machine Learning Foundations: Supervised, Unsupervised,


and Advanced Learning Taeho Jo

https://textbookfull.com/product/machine-learning-foundations-
supervised-unsupervised-and-advanced-learning-taeho-jo/

Supervised machine learning: optimization framework and


applications with SAS and R First Edition Kolosova

https://textbookfull.com/product/supervised-machine-learning-
optimization-framework-and-applications-with-sas-and-r-first-
edition-kolosova/
Supervised Learning with Python Concepts and Practical
Implementation Using Python 1st Edition Vaibhav Verdhan

https://textbookfull.com/product/supervised-learning-with-python-
concepts-and-practical-implementation-using-python-1st-edition-
vaibhav-verdhan/

Machine Learning Paradigms: Advances in Learning


Analytics Maria Virvou

https://textbookfull.com/product/machine-learning-paradigms-
advances-in-learning-analytics-maria-virvou/

Programming Quantum Computers Essential Algorithms and


Code Samples 1st Edition Eric R. Johnston

https://textbookfull.com/product/programming-quantum-computers-
essential-algorithms-and-code-samples-1st-edition-eric-r-
johnston/

Supervised Machine Learning in Wind Forecasting and


Ramp Event Prediction 1st Edition Harsh S. Dhiman

https://textbookfull.com/product/supervised-machine-learning-in-
wind-forecasting-and-ramp-event-prediction-1st-edition-harsh-s-
dhiman/

Quantum Computing Program Next Gen Computers for Hard


Real World Applications 1st Edition Nihal Mehta

https://textbookfull.com/product/quantum-computing-program-next-
gen-computers-for-hard-real-world-applications-1st-edition-nihal-
mehta/
Quantum Science and Technology

Maria Schuld · Francesco Petruccione

Supervised
Learning with
Quantum
Computers
Quantum Science and Technology

Series editors
Raymond Laflamme, Waterloo, ON, Canada
Gaby Lenhart, Sophia Antipolis, France
Daniel Lidar, Los Angeles, CA, USA
Arno Rauschenbeutel, Vienna University of Technology, Vienna, Austria
Renato Renner, Institut für Theoretische Physik, ETH Zürich, Zürich, Switzerland
Maximilian Schlosshauer, Department of Physics, University of Portland, Portland,
OR, USA
Yaakov S. Weinstein, Quantum Information Science Group, The MITRE
Corporation, Princeton, NJ, USA
H. M. Wiseman, Brisbane, QLD, Australia
Aims and Scope

The book series Quantum Science and Technology is dedicated to one of today’s
most active and rapidly expanding fields of research and development. In particular,
the series will be a showcase for the growing number of experimental implemen-
tations and practical applications of quantum systems. These will include, but are
not restricted to: quantum information processing, quantum computing, and
quantum simulation; quantum communication and quantum cryptography; entan-
glement and other quantum resources; quantum interfaces and hybrid quantum
systems; quantum memories and quantum repeaters; measurement-based quantum
control and quantum feedback; quantum nanomechanics, quantum optomechanics
and quantum transducers; quantum sensing and quantum metrology; as well as
quantum effects in biology. Last but not least, the series will include books on the
theoretical and mathematical questions relevant to designing and understanding
these systems and devices, as well as foundational issues concerning the quantum
phenomena themselves. Written and edited by leading experts, the treatments will
be designed for graduate students and other researchers already working in, or
intending to enter the field of quantum science and technology.

More information about this series at http://www.springer.com/series/10039


Maria Schuld Francesco Petruccione

Supervised Learning
with Quantum Computers

123
Maria Schuld Francesco Petruccione
School of Chemistry and Physics, School of Chemistry and Physics
Quantum Research Group University of KwaZulu-Natal
University of KwaZulu-Natal Durban, South Africa
Durban, South Africa
and
and
National Institute for Theoretical
National Institute for Theoretical Physics (NITheP)
Physics (NITheP) KwaZulu-Natal, South Africa
KwaZulu-Natal, South Africa
and
and
School of Electrical Engineering
Xanadu Quantum Computing Inc Korea Advanced Institute of Science
Toronto, Canada and Technology (KAIST)
Daejeon, Republic of Korea

ISSN 2364-9054 ISSN 2364-9062 (electronic)


Quantum Science and Technology
ISBN 978-3-319-96423-2 ISBN 978-3-319-96424-9 (eBook)
https://doi.org/10.1007/978-3-319-96424-9

Library of Congress Control Number: 2018950807

© Springer Nature Switzerland AG 2018


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, express 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.

This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
For Chris and Monique
Preface

Quantum machine learning is a subject in the making, faced by huge expectations


due to its parent disciplines. On the one hand, there is a booming commercial
interest in quantum technologies, which are at the critical point of becoming
available for the implementation of quantum algorithms, and which have exceeded
the realm of a purely academic interest. On the other hand, machine learning along
with artificial intelligence is advertised as a central (if not the central) future
technology into which companies are bound to invest to avoid being left out.
Combining these two worlds invariably leads to an overwhelming interest in
quantum machine learning from the IT industry, an interest that is not always
matched by the scientific challenges that researchers are only beginning to explore.
To find out what quantum machine learning has to offer, its numerous possible
avenues first have to be explored by an interdisciplinary community of scientists.
We intend this book to be a possible starting point for this journey, as it introduces
some key concepts, ideas and algorithms that are the result of the first few years of
quantum machine learning research. Given the young nature of the discipline, we
expect a lot of new angles to be added to this collection in due time. Our aim is not
to provide a comprehensive literature review, but rather to summarise themes that
repeatedly appear in quantum machine learning, to put them into context and make
them accessible to a broader audience in order to foster future research.
On the highest level, we target readers with a background in either physics or
computer science that have a sound understanding of linear algebra and computer
algorithms. Having said that, quantum mechanics is a field based on advanced
mathematical theory (and it does by no means help with a simple physical intuition
either), and these access barriers are difficult to circumvent even with the most
well-intended introduction to quantum mechanics. Not every section is therefore
easy to understand for readers without experience in quantum computing. However,
we hope that the main concepts are within reach and try to give higher level
overviews wherever possible.

vii
viii Preface

We thank our editors Aldo Rampioni and Kirsten Theunissen for their support
and patience. Our thanks also go to a number of colleagues and friends who have
helped to discuss, inspire and proofread the book (in alphabetical order): Betony
Adams, Marcello Benedetti, Gian Giacomo Guerreschi, Vinayak Jagadish, Nathan
Killoran, Camille Lombard Latune, Andrea Skolik, Ryan Sweke, Peter Wittek and
Leonard Wossnig.

Durban, South Africa Maria Schuld


March 2018 Francesco Petruccione
Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Merging Two Disciplines . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 The Rise of Quantum Machine Learning . . . . . . . . . . . . . . 4
1.1.3 Four Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.4 Quantum Computing for Supervised Learning . . . . . . . . . . 6
1.2 How Quantum Computers Can Classify Data . . . . . . . . . . . . . . . . 7
1.2.1 The Squared-Distance Classifier . . . . . . . . . . . . . . . . . . . . 8
1.2.2 Interference with the Hadamard Transformation . . . . . . . . . 9
1.2.3 Quantum Squared-Distance Classifier . . . . . . . . . . . . . . . . 13
1.2.4 Insights from the Toy Example . . . . . . . . . . . . . . . . . . . . 16
1.3 Organisation of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2 Machine Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1 Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.1 Four Examples for Prediction Tasks . . . . . . . . . . . . . . . . . 23
2.1.2 Supervised Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.2.1 How Data Leads to a Predictive Model . . . . . . . . . . . . . . . 30
2.2.2 Estimating the Quality of a Model . . . . . . . . . . . . . . . . . . 32
2.2.3 Bayesian Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.2.4 Kernels and Feature Maps . . . . . . . . . . . . . . . . . . . . . . . . 35
2.3 Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.3.1 Cost Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.3.2 Stochastic Gradient Descent . . . . . . . . . . . . . . . . . . . . . . . 42
2.4 Methods in Machine Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.4.1 Data Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.2 Artificial Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . 48

ix
x Contents

2.4.3 Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60


2.4.4 Kernel Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3 Quantum Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.1 Introduction to Quantum Theory . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.1.1 What Is Quantum Theory? . . . . . . . . . . . . . . . . . . . . . . . . 76
3.1.2 A First Taste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.1.3 The Postulates of Quantum Mechanics . . . . . . . . . . . . . . . 84
3.2 Introduction to Quantum Computing . . . . . . . . . . . . . . . . . . . . . . 91
3.2.1 What Is Quantum Computing? . . . . . . . . . . . . . . . . . . . . . 91
3.2.2 Bits and Qubits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
3.2.3 Quantum Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
3.2.4 Quantum Parallelism and Function Evaluation . . . . . . . . . . 101
3.3 An Example: The Deutsch-Josza Algorithm . . . . . . . . . . . . . . . . . 103
3.3.1 The Deutsch Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 103
3.3.2 The Deutsch-Josza Algorithm . . . . . . . . . . . . . . . . . . . . . . 104
3.3.3 Quantum Annealing and Other Computational Models . . . . 106
3.4 Strategies of Information Encoding . . . . . . . . . . . . . . . . . . . . . . . 108
3.4.1 Basis Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
3.4.2 Amplitude Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
3.4.3 Qsample Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
3.4.4 Dynamic Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
3.5 Important Quantum Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.5.1 Grover Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.5.2 Quantum Phase Estimation . . . . . . . . . . . . . . . . . . . . . . . . 117
3.5.3 Matrix Multiplication and Inversion . . . . . . . . . . . . . . . . . 119
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4 Quantum Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.1 Computational Complexity of Learning . . . . . . . . . . . . . . . . . . . . 127
4.2 Sample Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.2.1 Exact Learning from Membership Queries . . . . . . . . . . . . 133
4.2.2 PAC Learning from Examples . . . . . . . . . . . . . . . . . . . . . 134
4.2.3 Introducing Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
4.3 Model Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5 Information Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
5.1 Basis Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
5.1.1 Preparing Superpositions of Inputs . . . . . . . . . . . . . . . . . . 142
5.1.2 Computing in Basis Encoding . . . . . . . . . . . . . . . . . . . . . 145
5.1.3 Sampling from a Qubit . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Contents xi

5.2 Amplitude Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148


5.2.1 State Preparation in Linear Time . . . . . . . . . . . . . . . . . . . 150
5.2.2 Qubit-Efficient State Preparation . . . . . . . . . . . . . . . . . . . . 154
5.2.3 Computing with Amplitudes . . . . . . . . . . . . . . . . . . . . . . . 159
5.3 Qsample Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
5.3.1 Joining Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
5.3.2 Marginalisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
5.3.3 Rejection Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
5.4 Hamiltonian Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
5.4.1 Polynomial Time Hamiltonian Simulation . . . . . . . . . . . . . 164
5.4.2 Qubit-Efficient Simulation of Hamiltonians . . . . . . . . . . . . 166
5.4.3 Density Matrix Exponentiation . . . . . . . . . . . . . . . . . . . . . 167
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
6 Quantum Computing for Inference . . . . . . . . . . . . . . . . . . . . . . . . . . 173
6.1 Linear Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
6.1.1 Inner Products with Interference Circuits . . . . . . . . . . . . . . 174
6.1.2 A Quantum Circuit as a Linear Model . . . . . . . . . . . . . . . 179
6.1.3 Linear Models in Basis Encoding . . . . . . . . . . . . . . . . . . . 182
6.1.4 Nonlinear Activations . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
6.2 Kernel Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
6.2.1 Kernels and Feature Maps . . . . . . . . . . . . . . . . . . . . . . . . 189
6.2.2 The Representer Theorem . . . . . . . . . . . . . . . . . . . . . . . . 191
6.2.3 Quantum Kernels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
6.2.4 Distance-Based Classifiers . . . . . . . . . . . . . . . . . . . . . . . . 196
6.2.5 Density Gram Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 201
6.3 Probabilistic Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
6.3.1 Qsamples as Probabilistic Models . . . . . . . . . . . . . . . . . . . 204
6.3.2 Qsamples with Conditional Independence Relations . . . . . . 205
6.3.3 Qsamples of Mean-Field Approximations ........ . . . . . 207
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . 209
7 Quantum Computing for Training . . . . . . . . . . . . . . . . . . . . . . . . . . 211
7.1 Quantum Blas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
7.1.1 Basic Idea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
7.1.2 Matrix Inversion for Training . . . . . . . . . . . . . . . . . . . . . . 213
7.1.3 Speedups and Further Applications . . . . . . . . . . . . . . . . . . 218
7.2 Search and Amplitude Amplification . . . . . . . . . . . . . . . . . . . . . . 219
7.2.1 Finding Closest Neighbours . . . . . . . . . . . . . . . . . . . . . . . 220
7.2.2 Adapting Grover’s Search to Data Superpositions . . . . . . . 221
7.2.3 Amplitude Amplification for Perceptron Training . . . . . . . 223
7.3 Hybrid Training for Variational Algorithms . . . . . . . . . . . . . . . . . 224
7.3.1 Variational Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
7.3.2 Variational Quantum Machine Learning Algorithms . . . . . 230
xii Contents

7.3.3 Numerical Optimisation Methods . . . . . . . . . . . . . . . . . . . 233


7.3.4 Analytical Gradients of a Variational Classifier . . . . . . . . . 236
7.4 Quantum Adiabatic Machine Learning . . . . . . . . . . . . . . . . . . . . . 238
7.4.1 Quadratic Unconstrained Optimisation . . . . . . . . . . . . . . . 239
7.4.2 Annealing Devices as Samplers . . . . . . . . . . . . . . . . . . . . 240
7.4.3 Beyond Annealing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8 Learning with Quantum Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
8.1 Quantum Extensions of Ising-Type Models . . . . . . . . . . . . . . . . . 248
8.1.1 The Quantum Ising Model . . . . . . . . . . . . . . . . . . . . . . . . 249
8.1.2 Training Quantum Boltzmann Machines . . . . . . . . . . . . . . 251
8.1.3 Quantum Hopfield Models . . . . . . . . . . . . . . . . . . . . . . . . 253
8.1.4 Other Probabilistic Models . . . . . . . . . . . . . . . . . . . . . . . . 255
8.2 Variational Classifiers and Neural Networks . . . . . . . . . . . . . . . . . 256
8.2.1 Gates as Linear Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
8.2.2 Considering the Model Parameter Count . . . . . . . . . . . . . . 259
8.2.3 Circuits with a Linear Number of Parameters . . . . . . . . . . 261
8.3 Other Approaches to Build Quantum Models . . . . . . . . . . . . . . . . 263
8.3.1 Quantum Walk Models . . . . . . . . . . . . . . . . . . . . . . . . . . 263
8.3.2 Superposition and Quantum Ensembles . . . . . . . . . . . . . . . 266
8.3.3 QBoost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
9 Prospects for Near-Term Quantum Machine Learning . . . . . . . . . . . 273
9.1 Small Versus Big Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
9.2 Hybrid Versus Fully Coherent Approaches . . . . . . . . . . . . . . . . . . 276
9.3 Qualitative Versus Quantitative Advantages . . . . . . . . . . . . . . . . . 277
9.4 What Machine Learning Can Do for Quantum Computing . . . . . . 278
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Acronyms

xm Training input/feature vector


ym Training output/target label
~x New input/feature vector
~y Predicted label of a new input
c Lagrangian parameter
a Amplitude vector
ai Amplitude, ith entry of the amplitude vector
v Input domain
Y Output domain
D Data set, Training set
vi Visible unit of a probabilistic model
hj Hidden unit of a probabilistic model
si Visible or hidden unit
bi Binary variable
jii ith computational basis state of a qubit system
D Number of classes in a classification problem
w Parameter or weight vector of a machine learning model
w0 Bias parameter of a machine learning model
h Set of parameters of a machine learning model
C Cost function for training a machine learning model
L Loss function for training a machine learning model
L Lagrangian objective function
R Regulariser for training a machine learning model
/ Feature map from a data input space to a feature space
u Nonlinear activation function for neural networks
j Kernel function
g Learning rate
X Data matrix, Design matrix
U Unitary matrix, operator, quantum circuit
UðhÞ Parametrised quantum circuit/Variational circuit

xiii
Chapter 1
Introduction

Machine learning, on the one hand, is the art and science of making computers learn
from data how to solve problems instead of being explicitly programmed. Quantum
computing, on the other hand, describes information processing with devices based
on the laws of quantum theory. Both machine learning and quantum computing are
expected to play a role in how society deals with information in the future and it is
therefore only natural to ask how they could be combined. This question is explored
in the emerging discipline of quantum machine learning and is the subject of this
book.
In its broadest definition, quantum machine learning summarises approaches that
use synergies between machine learning and quantum information. For example,
researchers investigate how mathematical techniques from quantum theory can help
to develop new methods in machine learning, or how we can use machine learning to
analyse measurement data of quantum experiments. Here we will use a much more
narrow definition of quantum machine learning and understand it as machine learning
with quantum computers or quantum-assisted machine learning. Quantum machine
learning in this narrow sense looks at the opportunities that the current development of
quantum computers open up in the context of intelligent data mining. Does quantum
information add something new to how machines recognise patterns in data? Can
quantum computers help to solve problems faster, can they learn from fewer data
samples or are they able to deal with higher levels of noise? How can we develop
new machine learning techniques from the language in which quantum computing
is formulated? What are the ingredients of a quantum machine learning algorithm,
and where lie the bottlenecks? In the course of this book we will investigate these
questions and present different approaches to quantum machine learning research,
together with the concepts, language and tricks that are commonly used.
To set the stage, the following section introduces the background of quantum
machine learning. We then work through a toy example of how quantum computers
can learn from data, which will already display a number of issues discussed in the
course of this book.
© Springer Nature Switzerland AG 2018 1
M. Schuld and F. Petruccione, Supervised Learning with Quantum Computers,
Quantum Science and Technology, https://doi.org/10.1007/978-3-319-96424-9_1
2 1 Introduction

1.1 Background

1.1.1 Merging Two Disciplines

Computers are physical devices based on electronic circuits which process infor-
mation. Algorithms (the computer programs or ‘software’) are the recipes of how
to manipulate the current in these circuits in order to execute computations. Al-
though the physical processes involve microscopic particles like electrons, atoms
and molecules, we can for all practical purposes describe them with a macroscopic,
classical theory of the electric properties of the circuits. But if microscopic systems
such as photons, electrons and atoms are directly used to process information, they
require another mathematical description to capture the fact that on small scales, na-
ture behaves radically different from what our intuition teaches us. This mathematical
framework is called quantum theory and since its development at the beginning of
the 20th century it has generally been considered to be the most comprehensive de-
scription of microscopic physics that we know of. A computer whose computations
can only be described with the laws of quantum theory is called a quantum computer.
Since the 1990s quantum physicists and computer scientists have been analysing
how quantum computers can be built and what they could potentially be used for. They
developed several languages to describe computations executed by a quantum system,
languages that allow us to investigate these devices from a theoretical perspective.
An entire ‘zoo’ of quantum algorithms has been proposed and is waiting to be used
on physical hardware. The most famous language in which quantum algorithms are
formulated is the circuit model. The central concept is that of a qubit, which takes
the place of a classical bit, as well as quantum gates to perform computations on
qubits [1].
Building a quantum computer in the laboratory is not an easy task, as it requires
the accurate control of very small systems. At the same time, it is crucial not to disturb
the fragile quantum coherence of these systems, which would destroy the quantum
effects that we want to harvest. In order to preserve quantum coherence throughout
thousands of computational operations, error correction becomes crucial. But error
correction for quantum systems turns out to be much more difficult than for classical
ones, and becomes one of the major engineering challenges in developing a full-scale
quantum computer. Implementations of most of the existing quantum algorithms will
therefore have to wait a little longer.
However, full-scale quantum computers are widely believed to become available
in the future. The research field has left the purely academic sphere and is on the
agenda of the research labs of some of the largest IT companies. More and more
computer scientists and engineers come on board to add their skills to the quantum
computing community. Software toolboxes and quantum programming languages
based on most major classical computational languages are available, and more are
being developed every year. In summary, the realisation of quantum technology
became an international and interdisciplinary effort.
1.1 Background 3

While targeting full-scale devices, a lot of progress has been made in the develop-
ment of so called intermediate-term or small-scale devices. These devices have no
error correction, and count around 50–100 qubits that do not necessarily all speak
to one another due to limited connectivity. Small-scale quantum devices do in prin-
ciple have the power to test the advantages of quantum computing, and gave a new
incentive to theory-driven research in quantum algorithmic design. The holy grail
is currently to find a useful computational problem that can be solved by a small-
scale device, and with a (preferably exponential) speed-up in runtime to the best
known classical algorithm. In other words, the quest to find a ‘killer-app’, a compact
but powerful algorithm tailor made for early quantum technologies, is on. Machine
learning and its core mathematical problem, optimisation, are often mentioned as two
promising candidates, a circumstance that has given huge momentum to quantum
machine learning research in the last couple of years.
This brings us to the other parent discipline, machine learning. Machine learning
lies at the intersection of statistics, mathematics and computer science. It analy-
ses how computers can learn from prior examples - usually large datasets based on
highly complex and nonlinear relationships - how to make predictions or solve unseen
problem instances. Machine learning was born as the data-driven side of artificial
intelligence research and tried to give machines human-like abilities such as image
recognition, language processing and decision making. While such tasks come nat-
urally to humans, we do not know in general how to make machines acquire similar
skills. For example, looking at an image of a mountain panorama it is unclear how to
relate the information that pixel (543,1352) is dark blue to the concept of a mountain.
Machine learning approaches this problem by making the computer recover patterns
from data, patterns that inherently contain these concepts.
Machine learning is also a discipline causing a lot of excitement in the academic
world as well as the IT sector (and certainly on a much larger scale than quantum
computing). It is predicted to change the way a large share of the world’s population
interacts with technology, a trend that has already started. As data is becoming
increasingly accessible, machine learning systems mature from research to business
solutions and are integrated into PCs, cell phones and household devices. They scan
through huge numbers of emails every day in order to pick out spam mail, or through
masses of images on social platforms to identify offensive contents. They are used
in forecasting of macroeconomic variables, risk analysis as well as fraud detection
in financial institutions, as well as medical diagnosis.
What has been celebrated as ‘breakthroughs’ and innovation is thereby often
based on the growing sizes of datasets as well as computational power, rather than on
fundamentally new ideas. Methods such as neural networks, support vector machines
or AdaBoost, as well as the latest trend towards deep learning were basically invented
in the 1990s and earlier. Finding genuinely new approaches is difficult as many tasks
translate into hard optimisation problems. To solve them, computers have to search
more or less blindly through a vast landscape of solutions to find the best candidate. A
lot of research therefore focuses on finding variations and approximations of methods
4 1 Introduction

that work well in practice, and machine learning is known to contain a fair share of
“black art” [2]. This is an interesting point of leverage for quantum computing, which
has the potential of contributing fundamentally new approaches to machine learning.

1.1.2 The Rise of Quantum Machine Learning

In recent years, there has been a growing body of literature with the objective of
combining the disciplines of quantum information processing and machine learn-
ing. Proposals that merge the two fields have been sporadically put forward since
quantum computing established itself as an independent discipline. Perhaps the ear-
liest notions were investigations into quantum models of neural networks starting
in 1995 [3]. These were mostly biologically inspired, hoping to find explanations
within quantum theory for how the brain works (an interesting quest which is still
controversially disputed for lack of evidence). In the early 2000s the question of sta-
tistical learning theory in a quantum setting was discussed, but received only limited
attention. A series of workshops on ‘Quantum Computation and Learning’ were or-
ganised, and in the proceedings of the third event, Bonner and Freivals mention that
“[q]uantum learning is a theory in the making and its scientific production is rather
fragmented” [4]. Sporadic publications on quantum machine learning algorithms
also appeared during that time, such as Ventura and Martinez’ quantum associative
memory [5] or Hartmut Neven’s ‘QBoost’ algorithm, which was implemented on
the first commercial quantum annealer, the D-Wave device, around 2009 [6].
The term ‘quantum machine learning’ came into use around 2013. Lloyd, Mohseni
and Rebentrost [7] mention the expression in their manuscript of 2013, and in
2014, Peter Wittek published an early monograph with the title Quantum Machine
Learning—What quantum computing means to data mining [8], which summarises
some of the early papers. From 2013 onwards, interest in the topic increased signif-
icantly [9] and produced a rapidly growing body of literature that covers all sorts
of topics related to joining the two disciplines. Various international workshops and
conferences1 have been organised and their number grew with every year. Numerous
groups, most of them still rooted in quantum information science, started research
projects and collaborations. Combining a dynamic multi-billion dollar market with
the still ‘mysterious’ and potentially profitable technology of quantum computing
has also sparked a lot of interest in industry.2

1 Some early events include a workshop at the Neural Information Processing Systems (NIPS)
conference in Montreal, Canada in December 2015, the Quantum Machine Learning Workshop in
South Africa in July 2016 as well as a Quantum Machine Learning conference at the Perimeter
Institute in Waterloo, Canada, in August 2016.
2 Illustrative examples are Google’s Quantum Artificial Intelligence Lab established in 2013, Mi-

crosoft’s Quantum Architectures and Computation group and IBM’s IBM Q initiative.
1.1 Background 5

1.1.3 Four Approaches

As mentioned before, there are several definitions of the term quantum machine
learning, and in order to clarify the scope of this book it is useful to locate our
definition in the wider research landscape. For this we use a typology introduced
by Aimeur, Brassard and Gambs [10]. It distinguishes four approaches of how to
combine quantum computing and machine learning, depending on whether one as-
sumes the data to be generated by a quantum (Q) or classical (C) system, and if the
information processing device is quantum (Q) or classical (C) (see Fig. 1.1).
The case CC refers to classical data being processed classically. This is of course
the conventional approach to machine learning, but in this context it relates to ma-
chine learning based on methods borrowed from quantum information research. An
example is the application of tensor networks, which have been developed for quan-
tum many-body-systems, to neural network training [11]. There are also numerous
‘quantum-inspired’ machine learning models, with varying degrees of foundation in
rigorous quantum theory.
The case QC investigates how machine learning can help with quantum comput-
ing. For example, when we want to get a comprehensive description of the internal
state of a quantum computer from as few measurements as possible we can use ma-
chine learning to analyse the measurement data [12]. Another idea is to learn phase
transitions in many-body quantum systems, a fundamental physical problem with
applications in the development of quantum computers [13]. Machine learning has
also been found useful to discriminate between quantum states emitted by a source,
or transformations executed by an experimental setup [14–16], and applications are
plenty.
In this book we use the term ‘quantum machine learning’ synonymously with the
remaining CQ and QQ approach on the right of Fig. 1.1. In fact, we focus mainly

Fig. 1.1 Four approaches data processing device


that combine quantum
computing and machine
learning

CC CQ
data generating system

QC QQ
C - classical, Q - quantum
6 1 Introduction

on the CQ setting, which uses quantum computing to process classical datasets.


The datasets consist of observations from classical systems, such as text, images or
time series of macroeconomic variables, which are fed into a quantum computer for
analysis. This requires a quantum-classical interface, which is a challenge we discuss
in detail in the course of the book. The central task of the CQ approach is to design
quantum algorithms for data mining, and there are a number of strategies that have
been proposed by the community. They range from translations of classical machine
learning models into the language of quantum algorithms, to genuinely new models
derived from the working principles of quantum computers.
We will mostly be concerned with supervised learning, in which one has access to a
dataset with solutions to a problem, and uses these solutions as a supervision or figure
of merit when solving a new problem. However, we note that quantum reinforcement
learning [17, 18] and unsupervised learning [19–21] are active research fields adding
interesting angles to the content of this book.
The last approach, QQ, looks at ‘quantum data’ being processed by a quantum
computer. This can have two different meanings. First, the data could be derived
from measuring a quantum system in a physical experiment and feeding the values
back into a separate quantum processing device. A much more natural setting how-
ever arises where a quantum computer is first used to simulate the dynamics of a
quantum system (as investigated in the discipline of quantum simulation and with
fruitful applications to modeling physical and chemical properties that are otherwise
computationally intractable), and consequently takes the state of the quantum sys-
tem as an input to a quantum machine learning algorithm executed on the very same
device. The advantage of such an approach is that while measuring all information
of a quantum state may require a number of measurements that is exponential in
the system size, the quantum computer has immediate access to all this information
and can produce the result, for example a yes/no decision, directly—an exponential
speedup by design.
The QQ approach is doubtless very interesting, but there are presently only few
results in this direction (for example [17]). Some authors claim that their quantum
machine learning algorithm can easily be fed with quantum data, but the details may
be less obvious. Does learning from quantum data (i.e. the wave function of a quantum
system) produce different results to classical data? How can we combine the data
generation and data analysis unit effectively? Can we design algorithms that answer
important questions from experimentalists which would otherwise be intractable? In
short, although much of what is presented here can be used in the ‘quantum data’
setting as well, there are a number of interesting open problems specific to this case
that we will not be able to discuss in detail.

1.1.4 Quantum Computing for Supervised Learning

From now on we will focus on the CQ case for supervised learning problems. There
are two different strategies when designing quantum machine learning algorithms,
1.1 Background 7

and of course most researchers are working somewhere between the two extremes.
The first strategy aims at translating classical models into the language of quantum
mechanics in the hope to harvest algorithmic speedups. The sole goal is to reproduce
the results of a given model, say a neural net or a Gaussian process, but to ‘outsource’
the computation or parts of the computation to a quantum device. The translational
approach requires significant expertise in quantum algorithmic design. The challenge
is to assemble quantum routines that imitate the results of the classical algorithm
while keeping the computational resources as low as possible. While sometimes
extending the toolbox of quantum routines by some new tricks, learning does not
pose a genuinely new problem here. On the contrary, the computational tasks to
solve resemble rather general mathematical problems such as computing a nonlinear
function, matrix inversion or finding the optimum of a non-convex objective function.
Consequently, the boundaries of speedups that can be achieved are very much the
same as in ‘mainstream’ quantum computing. Quantum machine learning becomes
an application of quantum computing rather than a truly interdisciplinary field of
research.
The second strategy, whose many potential directions are still widely unexplored,
leaves the boundaries of known classical machine learning models. Instead of starting
with a classical algorithm, one starts with a quantum computer and asks what type
of machine learning model might fit its physical characteristics and constraints,
its formal language and its proposed advantages. This could lead to an entirely
new model or optimisation objective—or even an entirely new branch of machine
learning—that is derived from a quantum computational paradigm. We will call this
the exploratory approach. The exploratory approach does not necessarily rely on
a digital, universal quantum computer to implement quantum algorithms, but may
use any system obeying the laws of quantum mechanics to derive (and then train)
a model that is suitable to learn from data. The aim is not only to achieve runtime
speedups, but to contribute innovative methods to the machine learning community.
For this, a solid understanding—and feeling—for the intricacies of machine learning
is needed, in particular because the new model has to be analysed and benchmarked
to access its potential. We will investigate both strategies in the course of this book.

1.2 How Quantum Computers Can Classify Data

In order to build a first intuition of what it means to learn from classical data with a
quantum computer we want to present a toy example that is supposed to illustrate a
range of topics discussed throughout this book, and for which no previous knowledge
in either field is required. More precisely, we will look at how to implement a type
of nearest neighbour method with quantum interference induced by a Hadamard
gate. The example is a strongly simplified version of a quantum machine learning
algorithm proposed in [22], which will be presented in more detail in Sect. 6.2.4.2.
8 1 Introduction

Table 1.1 Mini-dataset for the quantum classifier example


Raw data Preprocessed data Survival
Price Cabin Price Cabin
Passenger 1 8,500 0910 0.85 0.36 1 (yes)
Passenger 2 1,200 2105 0.12 0.84 0 (no)
Passenger 3 7,800 1121 0.78 0.45 ?

1.2.1 The Squared-Distance Classifier

Machine learning always starts with a dataset. Inspired by the kaggle3 Titanic dataset,
let us consider a set of 2-dimensional input vectors {xm = (x0m , x1m )T }, m = 1, . . . , M .
Each vector represents a passenger who was on the Titanic when the ship sank in
the tragic accident of 1912, and specifies two features of the passenger: The price
in dollars which she or he paid for the ticket (feature 0) and the passenger’s cabin
number (feature 1). Assume the ticket price is between $0 and $10,000, and the cabin
numbers range from 1 to 2,500. Each input vector xm is also assigned a label ym that
indicates if the passenger survived (ym = 1) or died (ym = 0).
To reduce the complexity even more (possibly to an absurd extent), we con-
sider a dataset of only 2 passengers, one who died and one who survived the event
(see Table 1.1). The task is to find the probability of a third passenger of features
x̃ = (x̃0 , x̃1 )T and for whom no label is given, to survive or die. As is common in
machine learning, we preprocess the data in order to project it onto roughly the same
scales. Oftentimes, this is done by imposing zero mean and unit variance, but here
we will simply rescale the range of possible ticket prices and cabin numbers to the
interval [0, 1] and round the values to two decimal digits.
Possibly the simplest supervised machine learning method, which is still surpris-
ingly successful in many cases, is known as nearest neighbour. A new input is given
the same label as the data point closest to it (or, in a more popular version, the major-
ity of its k nearest neighbours). Closeness has to be defined by a distance measure,
for example the Euclidean distance between data points. A less frequent strategy
which we will consider here is to include all data points m = 1, . . . , M , but weigh
each one’s influence towards the decision by a weight

1
γm = 1 − |x̃ − xm |2 , (1.1)
c
where c is some constant. The weight γm measures the squared distance between
xm and the new input x̃, and by subtracting the distance from one we get a higher
weight for closer data points. We define the probability of assigning label ỹ to the

3 Kaggle(www.kaggle.com) is an open data portal that became famous for hosting competitions
which anyone can enter to put her or his machine learning software to the test.
1.2 How Quantum Computers Can Classify Data 9

Fig. 1.2 The mini-dataset


displayed in a graph. The
Passenger 2

cabin number
similarity (Euclidean
distance) between
Passengers 1 and 3 is closer Passenger 3
than between Passengers 2
and 3 Passenger 1

ticket price

new input x̃ as the sum over the weights of all M1 training inputs which are labeled
with ym = 1,  
1 1  1
px̃ (ỹ = 1) = 1 − |x̃ − x | .
m 2
(1.2)
χ M1 m|ym =1 c

The probability of predicting label 0 for the new input is the same sum, but over
the weights of all inputs labeled with 0. The factor χ1 is included to make sure that
px̃ (ỹ = 0) + px̃ (ỹ = 1) = 1. We will call this model the squared-distance classifier.
A nearest neighbour method is based on the assumption that similar inputs should
have a similar output, which seems reasonable for the data at hand. People from
a similar income class and placed at a similar area on the ship might have similar
fates during the tragedy. If we had another feature without expressive power to
explain death or survival of a person, for example a ticket number that was assigned
randomly to the tickets, this method would obviously be less successful because
it tries to consider the similarity of ticket numbers. Applying the squared-distance
classifier to the mini-dataset, we see in Fig. 1.2 that Passenger 3 is closer to Passenger
1 than to Passenger 2, and our classifier would predict ‘survival’.

1.2.2 Interference with the Hadamard Transformation

Now we want to discuss how to use a quantum computer in a trivial way to compute
the result of the squared-distance classifier. Most quantum computers are based on
a mathematical model called a qubit, which can be understood as a random bit (a
Bernoulli random variable) whose description is not governed by classical probability
theory but by quantum mechanics. The quantum machine learning algorithm requires
us to understand only one ‘single-qubit operation’ that acts on qubits, the so called
Hadamard transformation. We will illustrate what a Hadamard gate does to two
qubits by comparing it with an equivalent operation on two random bits. To rely
even more on intuition, we will refer to the two random bits as two coins that can be
tossed, and the quantum bits can be imagined as quantum versions of these coins.
10 1 Introduction

Table 1.2 Probability distribution over possible outcomes of the coin toss experiment, and its
equivalent with qubits
State Classical coin State Qubit
Step 1 Step 2 Step 3 Step 1 Step 2 Step 3
(heads, heads) 1 0.5 0.5 |heads|heads 1 0.5 1
(heads, tails) 0 0 0 |heads|tails 0 0 0
(tails, heads) 0 0.5 0.5 |tails|heads 0 0.5 0
(tails, tails) 0 0 0 |tails|tails 0 0 0

Imagine two fair coins c1 and c2 that can each be in state heads or tails with
equal probability. The space of possible states after tossing the coins (c1 , c2 ) consists
of (heads, heads), (heads, tails), (tails, heads) and (heads, heads). As a preparation
Step 1, turn both coins to ‘heads’. In Step 2 toss the first coin only and check the
result. In Step 3 toss the first coin a second time and check the result again. Consider
repeating this experiment from scratch a sufficiently large number of times to count
the statistics, which in the limiting case of infinite repetitions can be interpreted as
probabilities.4 The first three columns of Table 1.2 show these probabilities for our
little experiment. After the preparation step 1 the state is by definition (heads, heads).
After the first toss in step 2 we observe the states (heads, heads) and (tails, heads) with
equal probability. After the second toss in step 3, we observe the same two states with
equal probability, and the probability distribution hence does not change between
step 2 and 3. Multiple coin tosses maintain the state of maximum uncertainty for the
observer regarding the first coin.
Compare this with two qubits q1 and q2 . Again, performing a measurement called
a projective z-measurement (we will come to that later) a qubit can be found to be in
two different states (let us stick with calling them |heads and |tails, but later it will
be |0 and |1). Start again with both qubits being in state |heads|heads. This means
that repeated measurements would always return the result |heads|heads, just as
in the classical case. Now we apply an operation called the Hadamard transform on
the first qubit, which is sometimes considered as the quantum equivalent of a fair
coin toss. Measuring the qubits after this operation will reveal the same probability
distribution as in the classical case, namely that the probability of |heads|heads
and |tails|heads is both 0.5. However, if we apply the ‘Hadamard coin toss’ twice
without intermediate observation of the state, one will measure the qubits always in
state (heads, heads), no matter how often one repeats the experiment. This transition
from high uncertainty to a state of lower uncertainty is counterintuitive for classical
stochastic operations. As a side note beyond the scope of this chapter, it is crucial
that we do not measure the state of the qubits after Step 2 since this would return
a different distribution for Step 3—another interesting characteristic of quantum
mechanics.

4 We are assuming a frequentist’s viewpoint for the moment.


1.2 How Quantum Computers Can Classify Data 11

Let us have a closer look at the mathematical description of the Hadamard opera-
tion (and have a first venture into the world of quantum computing). In the classical
case, the first coin toss imposes a transformation
⎛ ⎞ ⎛ ⎞
1 0.5
⎜0 ⎟ ⎜ ⎟
p=⎜ ⎟ → p = ⎜ 0 ⎟ ,
⎝0 ⎠ ⎝0.5⎠
0 0

where we have now written the four probabilities into a probability vector. The first
entry of that vector gives us the probability to observe state (heads, heads), the second
(heads, tails) and so forth. In linear algebra, a transformation between probability
vectors can always be described by a special matrix called a stochastic matrix, in
which rows add up to 1. Performing a coin toss on the first coin corresponds to a
stochastic matrix of the form
⎛ ⎞
1010
1 ⎜0 1 0 1 ⎟
S= ⎜ ⎟.
2 ⎝1 0 1 0 ⎠
0101

Applying this matrix to p leads to a new state p = Sp , which is in this case equal
to p .
This description works fundamentally differently when it comes to qubits gov-
erned by the probabilistic laws of quantum theory. Instead of stochastic matrices
acting on probability vectors, quantum objects can be described by unitary (and
complex) matrices acting on complex amplitude vectors. There is a close relation-
ship between probabilities and amplitudes: The probability of the two qubits to be
measured in a certain state is the absolute square of the corresponding amplitude. The
amplitude vector α describing the two qubits after preparing them in |heads|heads
would be ⎛ ⎞
1
⎜0 ⎟
α=⎜ ⎟
⎝0 ⎠ ,
0

which makes the probability of |heads|heads equal to |1|2 = 1. In this case the
amplitude vector is identical to the probability vector of the quantum system. In the
quantum case, the stochastic matrix is replaced by a Hadamard transform acting on
the first qubit, which can be written as
⎛ ⎞
1 0 1 0
1 ⎜ 0 1 0 1⎟
H=√ ⎜ ⎟
2 ⎝1 0 −1 0⎠
0 1 0 −1
12 1 Introduction

applied to the amplitude vector. Although H does not have complex entries, there
are negative entries, which is not possible for stochastic matrices and the laws of
classical probability theory. Multiplying this matrix with a results in
⎛ ⎞
1
1 ⎜ 0 ⎟
α = √ ⎜ ⎟.
2 ⎝1⎠
0

√ probability of the outcomes |heads|heads and |tails|heads is equally given


The
by | 0.5|2 = 0.5 while the other states are never observed, as claimed in Table 1.2.
If we apply the Hadamard matrix altogether twice, something interesting happens.
The negative sign ‘interferes amplitudes’ to produce again the initial state,
⎛ ⎞
1
⎜0 ⎟
α =⎜
 ⎟
⎝0 ⎠ .
0

This is exactly what we claimed in Table 1.2.

More generally, if we apply the Hadamard to the first of n qubits in total, the
transformation matrix looks like
 
1 1 1
Hn(q1 ) = √ , (1.3)
2 1 −1

where I is the identity matrix of dimension N2 × N2 , and N = 2n . Applied to a general


amplitude vector that describes the state of n qubits we get
⎛ ⎞ ⎛ ⎞
α1 α1 + α N2 +1
⎜ .. ⎟ ⎜ .. ⎟
⎜ . ⎟ ⎜ . ⎟
⎜ ⎟ ⎜ ⎟
⎜ αN ⎟ ⎜ α N + αN ⎟

1
⎜ 2 ⎟→ √ ⎜ 2⎜
⎜α N +1 ⎟ ⎟.
⎜ 2 ⎟ 2⎜α1 − α N2 +1 ⎟
⎜ . ⎟ ⎜ ⎟
⎝ .. ⎠ ⎜ .. ⎟
⎝ . ⎠
αN α N2 − αN

If we summarise the first half of the original amplitude vector’s entries as a and
the second half as b, the Hadamard transform produces a new vector of the form
(a + b, a − b)T .
Note that the Hadamard transformation was applied on one qubit only, but acts on
all 2n amplitudes. This ‘parallelism’ is an important source of the power of quantum
computation, and with 100 qubits we can apply the transformation to 2100 amplitudes.
1.2 How Quantum Computers Can Classify Data 13

Of course, parallelism is a consequence of the probabilistic description and likewise


true for classical statistics. However, together with the effects of interference (i.e.,
the negative signs in the matrix), quantum computing researchers hope to gain a
significant advantage over classical computation.

1.2.3 Quantum Squared-Distance Classifier

Let us get back to our toy quantum machine learning algorithm. We can use the
Hadamard operation to compute the prediction of the squared-distance classifier by
following these four steps:
Step A—Some more data preprocessing
To begin with we need another round of data preprocessing in which the length of
each input vector (i.e., the ticket price and cabin number for each passenger) gets
normalised to one. This requirement projects the data onto a unit circle, so that only
information about the angles between data vectors remains. For some datasets this
is a desired effect because the length of data vectors has no expressive power, while
for others the loss of information is a problem. In the latter case one can use tricks
which we will discuss in Chap. 5. Luckily, for the data points chosen in this example
the normalisation does not change the outcome of a distance-based classifier (see
Fig. 1.3).
Step B—Data encoding
The dataset has to be encoded in a quantum system in order to use the Hadamard
transform. We will discuss different ways of doing so in Chap. 5. In this example the
data is represented by an amplitude vector (in a method we will later call amplitude
encoding). Table 1.3 shows that we have six features to encode, plus two class labels.
Let us have a look at the features first. We need three qubits or ‘quantum coins’
(q1 , q2 , q3 ) with values q1 , q2 , q3 = 0, 1 to have 8 different measurement results.
(Only two qubits would not be sufficient, because we would only have four possible

Passenger 2
cabin number

price room survival


Passenger 3
Passenger 1 0.921 0.390 yes (1)
Passenger 2 0.141 0.990 no (0) Passenger 1
Passenger 3 0.866 0.500 ?

ticket price

Fig. 1.3 Left: Additional preprocessing of the data. Each feature vector gets normalised to unit
length. Right: Preprocessed data displayed in a graph. The points now lie on a unit circle. The
Euclidean distance between Passengers 1 and 3 is still smaller than between Passengers 2 and 3
14 1 Introduction

Table 1.3 The transformation of the amplitude vector in the quantum machine learning algorithm
Qubit state Transformation of amplitude vector
q1 q2 q3 q4 Step B Step C Step D
αinit → αinter → αfinal
0 0 0 0 0 0 0
0 0 0 1 √1 0.921 √1 (0.921 + 0.866) √1 (0.921 + 0.866)
4 4 4χ
0 0 1 0 0 0 0
0 0 1 1 √1 0.390 √1 (0.390 + 0.500) √1 (0.390 + 0.500)
4 4 4χ
0 1 0 0 √1 0.141 √1 (0.141 + 0.866) √1 (0.141 + 0.866)
4 4 4χ
0 1 0 1 0 0 0
0 1 1 0 √1 0.990 √1 (0.990 + 0.500) √1 (0.990 + 0.500)
4 4 4χ
0 1 1 1 0 0 0
1 0 0 0 0 0 0
1 0 0 1 √1 0.866 √1 (0.921 − 0.866) 0
4 4
1 0 1 0 0 0 0
1 0 1 1 √1 0.500 √1 (0.390 − 0.500) 0
4 4
1 1 0 0 √1 0.866 √1 (0.141 − 0.866) 0
4 4
1 1 0 1 0 0 0
1 1 1 0 √1 0.500 √1 (0.990 − 0.500) 0
4 4
1 1 1 1 0 0 0
Data encoding starts with a quantum system whose amplitude vector contains the features as well
as some zeros (Step 2). The Hadamard transformation “interferes” blocks of amplitudes (Step 3).
Measuring the first qubit in state 0 (and aborting/repeating the entire routine if this observation
did not happen) effectively turns all amplitudes of the second block to zero and renormalises the
first block (Step 4). The renormalisation factor is given by χ = 41 (|0.921 + 0.866|2 + |0.390 +
0.500|2 + |0.141 + 0.866|2 + |0.990 + 0.500|2 )

outcomes as in the example above). Each measurement result is associated with


an amplitude whose absolute square gives us the probability of this result being
observed. Amplitude encoding ‘writes’ the values of features into amplitudes and
uses operations such as the Hadamard transform to perform computations on the
features, for example additions and subtractions.
The amplitude vector we need to prepare is equivalent to the vector constructed by
concatenating the features of Passenger 1 and 2, as well as two copies of the features
of Passenger 3,

1
α = √ (0.921, 0.39, 0.141, 0.99, 0.866, 0.5, 0.866, 0.5)T .
4

The absolute square of all amplitudes has to sum up √to 1, which is why we had to
include another scaling or normalisation factor of 1/ 4 for the 4 data points. We
1.2 How Quantum Computers Can Classify Data 15

now extend the state by a fourth qubit. For each feature encoded in an amplitude,
the fourth qubit is in the state that corresponds to the label of that feature vector.
(Since the new input does not have a target, we associate the first copy with the target
of Passenger 1 and the second copy with the target of Passenger 2, but there are
other choices that would work too). Table 1.3 illuminates this idea further. Adding
the fourth qubit effectively pads the amplitude vector by some intermittent zeros,

1
αinit = √ (0, 0.921, 0, 0.39, 0.141, 0, 0.99, 0, 0, 0.866, 0, 0.5, 0.866, 0, 0.5, 0)T .
4

This way of associating an amplitude vector with data might seem arbitrary at
this stage, but we will see that it fulfils its purpose.
Step C—Hadamard transformation
We now ‘toss’ the first ‘quantum coin’ q1 , or in other words, we multiply the amplitude
vector by the Hadamard matrix from Eq. (1.3). Chapter 3 will give a deeper account
of what this means in the framework of quantum computing, but for now this can
be understood at a single standard computational operation on a quantum computer,
comparable with an AND or OR gate on a classical machine. The result can be found
in column αinter of Table 1.3. As stated before, the Hadamard transform computes the
sums and differences between blocks of amplitudes, in this case between the copies
of the new input to every training input.
Step D—Measure the first qubit
Now measure the first qubit, and only continue the algorithm if it is found in state
0 (otherwise start from scratch). This introduces an ‘if’ statement into the quantum
algorithm, and is similar to rejection sampling. After this operation we know that the
first qubit cannot be in state 1 (by sheer common sense). On the level of the amplitude
vector, we have to write zero amplitudes for states in which q1 = 1 and renormalise
all other amplitudes so that the amplitude vector is again overall normalised (see
column αfinal of Table 1.3).
Step E—Measure the last qubit
Finally, we measure the last qubit. We have to repeat the entire routine for a number
of times to resolve the probability p(q4 ) (since measurements only take samples from
the distribution). The probability p(q4 = 0) is interpreted as the output of the machine
learning model, or the probability that the classifier predicts the label 0 for the new
input. We now want to show that this is exactly the result of the squared-distance
classifier (1.2).
By the laws of quantum mechanics, the probability of observing q4 = 0 after the
data encoding and the Hadamard transformation can be computed by adding the
absolute squares of the amplitudes corresponding to q4 = 0 (i.e. the values of even
rows in Table 1.3),

1
p(q4 = 0) = |0.141 + 0.866|2 + |0.990 + 0.500|2 ≈ 0.448,

16 1 Introduction

with χ = 41 (|0.921 + 0.866|2 + |0.390 + 0.500|2 + |0.141 + 0.866|2 + |0.990 +


0.500|2 ). Equivalently, the probability of observing q4 = 1 is given by

1
p(q4 = 1) = |0.921 + 0.866|2 + |0.390 + 0.500|2 ≈ 0.552,

and is obviously equal to 1 − p(q4 = 0). This is the same as


 
1 1
p(q4 = 0) = 1 − (|0.141 − 0.866| + |0.990 − 0.500| ) ≈ 0.448,
2 2
χ 4
 
1 1
p(q4 = 1) = 1 − (|0.921 − 0.866| + |0.390 − 0.500| ) ≈ 0.552.
2 2
4χ 4

Of course, the equivalence is no coincidence, but stems from the normalisation of


each feature vector in Step 1 and can be shown to always be true for this algorithm.
If we compare these last results to Eq. (1.2), we see that this is in fact exactly the
output of the squared-distance classifier, with the constant c now specified as c = 4.
The crux of the matter is that after data encoding, only one single computational
operation and two simple measurements (as well as a couple of repetitions of the
entire routine) were needed to get the result, the output of the classifier. This holds
true for any size of the input vectors or dataset. For example, if our dataset had 1
billion training vectors of size 1 million, we would still have an algorithm with the
same constant runtime of three elementary operations.

1.2.4 Insights from the Toy Example

As much as nearest neighbour is an oversimplification of machine learning, using


the Hadamard to calculate differences is a mere glimpse of what quantum computers
can do. There are many other approaches to design quantum machine learning algo-
rithms, for example to encode information into the state of the qubits, or to use the
quantum computer as a sampler. And although the promise of a data-size-independent
algorithm first sounds too good to be true, there are several things to consider. First,
the initial state αinit encoding the data has to be prepared, and if no shortcuts are
available, this requires another algorithm with a number of operations that is linear
in the dimension and size of the dataset (and we are back to square one). What is
more, the Hadamard transform belongs to the so called Clifford group of quantum
gates, which means that the simulation of the algorithm is classically tractable. On
the other hand, both arguments do not apply to the QQ approach discussed above,
in which we process quantum data and where true exponential speedups are to be
expected.
Other documents randomly have
different content
The sun-round passed on. Then a cloud obscured the light, a fine
and fleecy cloud that would be gone shortly.
All tarried in silence, breathless, fearing they knew not what—but
expecting no good.
Then the sun burst forth again, and the circle of fire appeared
beyond the line.
At once Rogier stood up.
"You men of Caio, you have thought to deal with a fool, and to
deceive me by your craft. But I know what has been done, and will
make you to understand on whom ye have practised your devices.
Pabo, the chief and Archpriest, is not dead. It was not he who was
consumed in the presbytery. Ye played a stage mystery before our
eyes to make us believe that he was dead, and that you were
burying him. Pabo is alive and is among you, and you know where
he is concealed."
The interpreter was interrupted by outcries of, "We know not. If that
were not he, we cannot say where he be. We found a man burned
to a cinder. Were we in error in supposing him to be our chief? Show
us that it was so!"
Rogier remained unmoved by the clamor.
"Ye are like a parcel of lying, quibbling women," he said. "Pabo is in
hiding. Ye are all leagued together to save him. But have him from
his lurking-den I will."
"We cannot say where he is. There is not one of us who knows."
"You will admit that he whom ye pretended to be Pabo was some
other?"
They looked doubtfully at each other.
"We could not tell. The dead man was found in the ruins of the
burnt house. We thought it was Pabo."
"Ye did not. Ye contrived the device between you."
"We will swear that we know not where he is. Bring forth the staff of
Cynwyl."
"The staff has been stolen. But I will not trust your oaths. Did not
the wife of Pabo swear thereon?" Then Rogier laughed. "She was
crafty as the rest of you, and deceived us in her oath. Nay, I will
trust no oaths. I will place my reliance on something more secure.
Hey! bring forward my bassinet!"
At his order, one of the attendants went to the door and received a
steel cap from a soldier without.
"In this bassinet," said Rogier, "there are short willow twigs. There
are more twigs than there are householders and notables here
assembled. Of these twigs all but six are blank; but on half a dozen
a death's head has been scored with a dagger point, rubbed in with
black. He who draws such a figured twig shall be hung on the
gallows, where is suspended your church bell—one to-day, a second
to-morrow. On Sunday, being a sacred day, none; on Monday a
third, on Tuesday a fourth, on Wednesday a fifth, on Thursday the
sixth. And on Friday ye shall all assemble here once more, and again
draw the lots. I shall hang one of you every day till Pabo be
delivered up to me, alive."
Then there broke forth cries, protests, entreaties; there were hands
stretched towards the window through which the sun entered, in
oath that the whereabouts of Pabo was not known; there were arms
extended to Rogier in assurance that Pabo was actually dead. Some
cried out that they had had no cognizance of any plot to deceive.
Many folded their arms in sullen wrath or despair.
Then Rogier lifted his sword and commanded silence. "No word
spoken," said he, "will move me from my purpose. One thing can
alone rob the gallows of its rich burden—the delivery of your late
chief, Pabo."
"We cannot do it. We know not where he is."
"Then let justice take its course. This I will suffer. When each has
drawn his lot from the cap, he shall bring it in his closed fist to me,
and open it where I stand in the ray of sunlight. If he have an
unmarked stick, he shall go forth by the door unmolested. But he
who shall have the death's head in his hand shall tarry here. And
when all six are selected, then will I suffer each in turn to be
conducted to his home, there to bid farewell to his family, and so to
dispose of his worldly affairs as pleaseth him. I will allow each one
hour to effect this; then he will return hither. The first man who
draws the bad lot shall be strung to the gallows to-day. If ye be wise
men, he will be the only one who will go to make a chime of bells. If
Pabo be delivered to me before noon to-morrow, then no second
man shall hang. If he be given up on Monday before mid-day no
third man shall swing. But—if you remain obstinate, I will go on
hanging ye to the last man. Come, in your order, as ye sit; draw to
the bassinet and take out your lot. I lay the steel cap on what ye call
the seat of your chief."
Then the old man advanced, he who had protested against the
occupation of the chair, and said—"I am ready to die, whether in my
bed or on the gibbet matters little to me. God grant that I be the
man taken. My time at best is but short. Another year to me matters
not a hair."
He walked to the bassinet, without hesitation drew his lot, carried it
to the Norman—who stood in the sun-ray—and unclosed his
withered hand. In it was an unmarked stick.
"Pass forth," said Rogier.
"Nay," said the old man. "My son comes after me—let him draw."
A tall, well-built man walked boldly to the cap, drew, and
approached the sunbeam.
"Open!" ordered Rogier.
He held a marked stick.
"On one side—food for the crows," said the Norman.
Then the old man fell on his knees. "I beseech you take me and
spare him. He has a young wife and a child. He has life before him,
mine is all behind."
"Away," ordered Rogier. "The lot decides—the judgment is with
heaven, not with me."
"Father," said the young man, "I am willing to die for my chief."
Then followed several who went free, and escaped into the open air,
where they drew long breaths, as though their lungs had been
cramped within.
The next who drew the death's head was a mean little man with
pointed, foxy face and red hair. He fell into convulsions of terror,
clung to Rogier, implored for life, promised to betray whatever he
knew—only, unhappily, he did not know where Pabo was concealed,
but undertook, if pardoned, to find out. The bishop's brother
spurned him from him with disgust. Then came three with blanks
and were sent outside.
The third taken was Howel.
"One can but die once," said he, and shrugged his shoulders. "My
old woman will have to look out for a second husband. May he be
better than the first."
He stepped aside without the exhibition of much feeling, but avoided
the whimpering wretch who had drawn the death's head before him.
"Hah!" said Iorwerth the Smith, as he opened his palm and disclosed
the marked twig, "I thought something would fall to me for striking
that blow which disabled the captain's arm. Would to heaven I had
aimed better and broken his skull! He did not know me, or I should
have been hung before this." Singularly enough, the very next to
draw was also one who drew an unlucky stick, and this was Morgan
the Sacristan.
"Since the Sanctuary of David has been invaded, and the wild beast
of the field tramples on the vineyard, I care not; and now the secret
of where is hid the rod of Cynwyl will perish with me."
Next came a whole batch who drew blanks, and gladly escaped with
their necks.
The last to draw the death's head looked steadily at it, and said:
"She is always right. I thought so; now I'm sure of it. My wife said to
me, 'Do not go to the meeting?' I said, 'Why not?' Like a woman,
she couldn't give a reason; but repeated, 'Do not go.' I have come,
and now shall swing with the rest. It's a rough way of learning a
lesson. And having learnt it—can no more practise it."
CHAPTER XV
TWO PEBBLES
Tidings of the blow to be struck, reaching the hearts of many
families—six only at first, but with prospect of more afterwards—had
spread through the tribal region. Those who had drawn the
unmarked sticks hurried to their homes, not tarrying to learn who
were all the unfortunates; and, although relieved for the present
were in fear lest they should be unfortunate at a subsequent
drawing.
All knew that Pabo was in concealment, and that his place of
concealment was known to none, not even to his wife or to Howel.
They had not a clue as to where he was. Some supposed that he
had fled to the mountains of Brecknock, others to Cardigan; some,
again, that he had attached himself to Griffith ap Rhys, who was
traversing South Wales, stirring up disaffection and preparing for a
general rising of the Welsh against their oppressors.
Yet hardly half a dozen men desired that he should be taken, and
thus free themselves from death. The great and heroic virtue of the
Celt lies in his devotion to his chief, for whom he is ready at once to
lay down his life.
The hideous prospect that lay before the unfortunate people of Caio
was one of illimited decimation. Would Rogier weary of his
barbarous work? Would it avail to send a deputation to the bishop?
It was doubtful whether the latter was not as hard of heart as his lay
brother.
Gwen, the wife of Howel, was as one stunned. She leaned with both
hands against the wall of her house, her head drooping between
them, with dry, glazed eyes, and for long speechless.
Morwen was now in Howel's house. She had returned to it.
She was pale, and quivering with emotion under the weight of great
horror, unable to speak.
Her eyes were fixed on the despairing woman, from whose lips
issued a low moan, and whose bosom heaved with long-drawn,
laborious breaths. Morwen was well aware what sacrifices the tribe
was making and would have to make for her husband's safety, and
this gave inexpressible pain to her.
The moans of the poor woman cut her to the heart. At length,
unable to endure it longer, she went to her, put her arms round her,
and drew her to herself. Then, all at once, with a cry, the wife of
Howel shook herself free, and found words—
"Monday! It is on Monday that he must die, and that is our thirtieth
wedding-day? For all these years we have been together, as one
soul, and it will tear the heart out of my body—and to be hung on
the gallows—the shame, the loss—and Howel so clever, so shrewd!
Where has been his wit that he could not get free? He always had a
cunning above other men. And on our wedding-day!" She ran to a
coffer and opened it, and drew forth a knitted garment, such as we
should nowadays call a jersey.
"See, see!" cried the wretched woman. "I have been fashioning this;
a thought of him is knitted into every loop I have made, and I have
kissed it—kissed it a thousand times because it was for him. He feels
the cold in the long winters, and I made this for him that he might
be warm, and wherever he was remember me, and bear my kisses
and my finger-work about him. And he must die, and shiver, and be
cold in the grave! Nay, shiver and be cold hanging on the gallows,
and the cold winds sway him. He shall wear my knitted garment.
They will let me pass to him, and I will draw it over him."
Then in at the door came the old man, who had been left when his
son was taken. He was supporting that son's wife, and at the same
time was carrying her child, which she was incapable of sustaining.
She was frantic with grief.
"I have brought one sorrowful woman to another," said the old man.
"This is Sheena. She must not see it. They are taking my son now to
——. Keep her here, she is mad. She will run there, and if she sees,
she will die. For the child's sake, pity her, make her live—calm her."
She had been allowed an hour with her husband in their house, and
then the soldiers had led him away, bound his hands behind his
back, and had conducted him towards the church.
She had followed with the child, crying, plucking at her hair with the
one free hand, thrusting from her the old man who would hold her
back, striving to reach, to retain her husband, her eyes blinded with
terror and tears, her limbs giving way under her.
The five men confined within the court-house heard her piercing
cries, her entreaties to be allowed once more to kiss her husband,
her screams as she was repulsed by the guards. They shuddered
and put their hands to their ears; but one, the foxfaced man, whose
name was Madoc, burst into a torrent of curses and of blasphemy till
Morgan the Sacristan went to him in reproof, and then the wretched
man turned on him with imprecations.
"Come now, man," said the smith, "why shouldst thou take on so
frantically? We leave wives that we love and that love us; but thy old
cat, good faith! I should esteem it a welcome release to be freed
from her tongue and nails."
On nearing the gallows, where stood Rogier, that captain ordered
the removal of Sheena; and when she saw a ladder set up against
the crosspiece that sustained the bell, her cries ceased, she reeled,
and would have let the child drop had not her father-in-law caught it
from her.
"One kiss—one last kiss! I have forgot something to say—let him
bless his child!" she entreated.
Rogier hesitated and consented, on the condition that she should
then be at once removed. Thereupon the desolate woman staggered
to the foot of the gallows, threw her arms round her husband's
neck; and the man who acted as executioner relaxed the rope that
bound his wrists, that he might bring his hands before him and lay
them on his infant's head. Then the death-doomed man raised his
eyes to heaven and said, "The benediction and the strength of God
and the help of our fathers David and Cynwyl be with thee, my son,
and when thou art a man revenge thy father and thy wronged
country."
At once the cord was drawn again, and his hands rebound. The old
man took his daughter-in-law in one arm whilst bearing the babe in
the other, and seeing that consciousness was deserting Sheena,
hurried her to the house of Howel. There, after a moment of dazed
looking about her, she sank senseless on the floor.
Morwen flew to her assistance, and Howel's wife somewhat rallied
from her stupefaction.
At that same moment in burst Angarad, the wife of foxfaced Madoc.
"Where is she?" she shouted, her eyes glaring, her hair bristling with
rage. "She is here—she—the wife of our chief. Are we all to be
dragged to the gallows because of him? Is every woman to become
a widow? He call himself a priest! Why, his Master gave His life for
His sheep, and he—ours—fleeth and hideth his head, whilst those
whom he should guard are being torn by the wolves."
"Silence, woman!" exclaimed the old man wrathfully. "I joy that my
son has given up his life to save his chief."
"But I am not content to surrender my Madoc," yelled the beldame.
"Let us have the hated Saxon or the worst Norman to rule over us,
rather than one who skulks and dares not show his face. My Madoc
will be hung to-morrow, as they have hung Sheena's man now. I
have seen it. They pulled him up."
"Be silent," shouted the old man, and tried to shut her mouth.
"I will not be silent. I saw it all. They drew him up, and then a man
sprang from the ladder upon his shoulders and stamped."
A cry of agony from the wife of Howel, who flung out her hands, as
before, against the wall, and stayed herself there. Sheena heard
nothing—she was but returning to consciousness.
"Why do you not bring him back?" asked the hag, facing Morwen
with fists clenched, fangs exposed, and eyes glaring. "Why do you
keep him hidden, that we all may be widows—and you be happy
with your man? What shall I do without my Madoc? Who will support
me? Am I young enough to maintain myself? Is the whole tribe to
be dragged down, that you and your husband may live at ease and
be merry?"
"Woman," said Morwen, trembling, "I do not know where he is
concealed."
"Then find him, and let him come forward to save us all. Shame, I
say, shame on him!—the false shepherd—the hireling—who fleeth
and careth not for the sheep!"
The rattle of arms was heard, and at the sound Morwen slipped out
of the room into the inner apartment that she might not be seen.
Immediately two men-at-arms entered, leading Howel between
them.
"He is granted one hour," said the man who could speak a few words
of Welsh. "On Monday he dies."
"Clear the room!" said the old man; and to the soldier: "Remove this
frantic woman." He indicated Angarad; and he himself, with their
assistance, drew her—swearing, struggling, spluttering with rage—
from the house. Sheena remained where she had been laid—as yet
barely conscious. Howel's wife dropped into her husband's arms,
moaning, still powerless to weep.
In the inner chamber, dimly lighted by a small window covered with
bladder in place of glass, on a bed sat Morwen, with her hands
clasped between her knees, looking despairingly before her. Every
word of the cruel woman had cut her heart as the stab of an
envenomed poignard.
Did Pabo know what was being done at Caio? No—assuredly not.
She who had read his thoughts and knew his heart was well aware
that he would readily die himself rather than that any of his people
should suffer. He knew nothing. They, with a rare exception only,
would meet their fate, the men give their necks to the halter, the
women submit to be made widows rather than that their master and
chief should fall into the hands of his enemies. Brave, true, faithful
hearts! But was it right that they should be called on to endure such
sacrifices? She shuddered. What, would she have him taken and die
an ignominious death? Him whom she loved better than any one—
with a one, soul-filling love? Could she endure such a sacrifice as
that? Then she heard the step of Howel coming to the door.
He entered and was with her alone.
"Morwen," said he, in a low voice, "I shall be able shortly to do no
more for my dear chief. Should you ever see him again, tell him from
us all—all but perhaps one who is beside himself with fear—that we
die willingly. But with him I can no more communicate. That must be
done by you. It is expedient that he should fly farther; search will be
made everywhere for him. Where he is, that I know not, though I
may have my suspicion. Do this—at nightfall mount the valley of the
Annell till you come to the stone of Cynwyl."
"The stone of Cynwyl," repeated Morwen mechanically.
"Take a pebble out of the brook and place it upon the rock. That will
be a sign that he is not safe, and must fly to other quarters."
"What other tokens be there?"
"Two pebbles was to be the sign that all was safe and he was to
return. That is not the case at this present time. Remember, then—
One pebble."
"And two calls him hither?"
"Two pebbles. But remember, One only."
"Two pebbles," said Morwen, but so that none heard it: it was said
to her own heart.
CHAPTER XVI
A SUMMONS
The days spent on the mountain had not been as cheerless as that
first night. The fire burned now continually on the hearth, the light
peat smoke was dissipated at once by the wind, which was never
still at the fall of the year at the altitude where was planted the
hovel of the hermit.
The supply of food was better than at first. One night Pabo had
found a she-goat attached to a bush near the stone of Cynwyl; and
he had taken her to his habitation, where she supplied him with
milk. On another night he had found on a rock a rolled-up blanket,
and had experienced the comfort at night of this additional covering.
But no tidings whatever had reached him of what went on in Caio.
This was satisfactory, and his anxiety for his flock abated. But he
knew that the enemy was quartered in the valley, because no call
had come to him to return to it. At nights he would steal along the
mountain-top that he might, from Bronffin, look down on the
sleeping valley, with its scattered farms and hamlets; and on Sunday
morning he even ventured within hearing of the church bell, that he
might in spirit unite with his flock in prayer. He concluded that one of
the assistant priests from a chapelry under the great Church was
ministering there in his stead. He knew that his people would be
thinking of him, as he was of them.
During the day he made long excursions to the north, among the
wild wastes that stretched interminably away before his eyes, and
offered him a region where he might lie hid should his present
hiding-place be discovered.
None could approach the hut unobserved, a long stretch of moor
was commanded by it, and the rocks in the rear afforded means,
should he observe an enemy approach, of getting away beyond their
reach into the intricacies of the wilderness.
At first Pabo was oppressed by the sense of loneliness. No human
face was seen, no human voice heard. But this passed, and he
became conscious of a calm coming over his troubled heart, and
with it a sense of freedom from care and childlike happiness.
The elevation at which he lived, the elasticity of the air, the brilliance
of the light, unobstructed, as below, by mountains, tended towards
this. Moreover, he was alone with Nature, that has an inspiriting
effect on the heart, whilst at the same time tranquilizing the nerves
—tranquilizing all the cares and worries bred of life among men. It
was a delight to Pabo to wander through the heather to some brow
that overhung the Ystrad Towy or the valley of the Cothi, and look
down from his treeless altitude on the rolling masses of wood, now
undergoing glorious change of color under the touch of autumn. Or
else to venture into the higher, unoccupied mountain glens, where
the rowan and the rose-bramble were scarlet with their berries, and
there he seemed to be moving in the land of coral.
It was a delight to observe the last flowers of the year, the few stray
harebells that still hung and swayed in the air, the little ivy-leafed
campanula by the water, the sturdy red robin, the gorse persistent in
bloom. He gathered a few blossoms to adorn his wretched hovel,
and in it they were as a smile.
The birds were passing overhead, migrating south, yet the ring-ouzel
was still there; the eagle and hawk spired aloft on their lookout for
prey; the plover and curlew piped mournfully, and the owl hooted.
The insects were retiring underground for the winter. Pabo had not
hitherto noticed the phases of life around him, below that of man,
now it broke on him as a wonder, and filled him with interest, to see
a world on which hitherto he had not thought to direct his
observation. There is no season in the year in which the lights are
more varied and more beautiful than in autumn, the slant rays
painting the rocks vermilion, glorifying the dying foliage, enhancing
the color of every surviving flower.
But the fall of the year is one in which Nature weeps and sighs over
the prospect of death; and there came on Pabo days of blinding fog
and streaming rain. Then he was condemned to remain within,
occasionally looking forth into the whirls of drifting vapor, charged
with a strange dank scent, or at the lines of descending water. He
milked his goat, collected food for it, and heaped up his fire.
Then it was that sad thoughts came over him, forebodings of ill; and
he mused by his hearth, looking into the glow, listening to the moan
of the wind or the drizzle of the rain, and the eternal drip, drip from
the eaves.
He had thus sat for hours one day, interrupting his meditations only
by an occasional pace to the door to look out for a break in the
weather, when there came upon him with a shock of surprise the
recollection that there was more in the hermit's scroll than he had
considered at first. Not much. He unfurled it, and beside the bequest
of the hut, only these words were added: "For a commission look
below my bed."
What was the meaning of this? It was strange that till now Pabo had
given no thought to these concluding words.
Now he thrust the fire together, cast on some dry bunches of gorse
that lit the interior with a golden light, and he drew the bed from the
place it had occupied in the corner of the chamber.
Beneath it was nothing but the beaten earth that had never been
disturbed.
The bed itself was but a plank resting on two short rollers, to sustain
it six inches above the soil. Nothing had been concealed beneath the
plank, between it and the ground—no box, no roll of parchment.
Nothing even was written in the dust.
Pabo took a flaming branch and examined the place minutely, but in
vain.
Then he threw off the blanket and skins that covered the pallet. He
shook them, and naught dropped out. He took the pillow and
explored it. The contents were but moss; yet he picked the moss to
small pieces, searching for the commission and finding none. Then
he drew away the logs on which the plank had rested. They might
be hollow and contain something. Also in vain. Thoroughly perplexed
to know what could have been the hermit's meaning, Pabo now
replaced the rollers in their former position and raised the plank to
lean it upon them once more.
At this something caught his eye—some scratches on the lower
surface of the board. He at once turned it over, and to his
amazement saw that this under side of the pallet was scored over
with lines and with words, drawn on the wood with a heated skewer,
so that they were burnt in.
The fire had sunk to a glow—he threw on more gorse. As it blazed
he saw that the lines were continuous and had some meaning,
though winding about. Apparently a plan had been sketched on the
board. Beneath were these words, burnt in—

Thesaurus, a Romanis antiquis absconditus in antro Ogofau.

Then followed in Welsh some verses—

In the hour of Cambria's need,


When thou seest Dyfed bleed,
Raise the prize and break her chains;
Use it not for selfish gains.

The lines that twisted, then ran straight, then bent were, apparently,
a plan.
Pabo studied it. At one point, whence the line started, he read,
"Ingressio"; then a long stroke, and Perge; further a turn, and here
was written vertitur in sinistram. There was a fork there, in fact the
line forked in several places, and the plan seemed to be intricate.
Then a black spot was burnt deeply into the wood, and here was
written: Cave, puteum profundum. And just beyond this several dots
with the burning skewer, and the inscription, Auri moles prægrandis.
Pabo was hardly able at first to realize the revelation made. He knew
the Ogofau well. It was hard by Pumpsaint—a height, hardly a
mountain, that had been scooped out like a volcanic crater by the
Romans during their occupation of Britain. From the crater thus
formed, they had driven adits into the bowels of the mountain.
Thence it was reported they had extracted much gold. But the mine
had been unworked since their time. The Welsh had not sufficient
energy or genius in mining to carry on the search after the most
precious of ores. And superstition had invested the deserted works
with terrors. Thither it was said that the Five Saints, the sons of
Cynyr of the family of Cunedda, had retired in a thunder-storm for
shelter. They had penetrated into the mine and had lost their way,
and taking a stone for a bolster, had laid their heads on it and fallen
asleep. And there they would remain in peaceful slumber till the
return of King Arthur, or till a truly apostolic prelate should occupy
the throne of St. David. An inquisitive woman, named Gwen, led by
the devil, sought to spy on the saintly brothers in their long sleep,
but was punished by also losing her way in the passages of the
mine; and there she also remained in an undying condition, but was
suffered to emerge in storm and rain, when her vaporous form—so it
was reported—might be seen sailing about the old gold-mine, and
her sobs and moans were borne far off on the wind.
In consequence, few dared in broad daylight to visit the Ogofau,
none ever ventured to penetrate the still open mouth of the mine.
Pabo was not devoid of superstition, yet not abjectly credulous. If
what he now saw was the result of research by the hermit, then it
was clear that where one man had gone another might also go, and
with the assistance of the plan discover the hidden treasure which
the Romans had stored, but never removed.
And yet, as Pabo gazed at the plan and writing, he asked, was it not
more likely that the old hermit had been a prey to hallucinations,
and that there was no substance behind this parade of a secret?
Was it not probable that in the thirty years' dreaming in this solitude
his fancies had become to him realities; that musing in the long
winter nights on the woes of his country he had come on the
thought, what an assistance it would be to it had the Romans not
extricated all the ore from the rich veins of the Ogofau. Then, going
a little further, had imagined that in their hasty withdrawal from
Britain, they might not have removed all the gold found. Advancing
mentally, he might have supposed that the store still remaining
underground might be recovered, and then the entire fabric of plan,
with its directions, would have been the final stage in this fantastic
progress.
How could the recluse have penetrated the passages of the mine?
It was true enough that the Ogofau were accessible from Mallaen
without going near any habitation of man. It was conceivable that by
night the old man had prosecuted his researches, which had finally
been crowned with success.
Pabo felt a strong desire to consult Howel. He started up, and after
having replaced the plank and covered it with the bedding, left the
hut and made his way down into the valley of the Annell, to the
Stone of Cynwyl.
Notwithstanding the drizzle and the gathering night, he pushed on
down the steep declivity, and on reaching the brawling stream
passed out of the envelope of vapor.
The night was not pitch dark, there was a moon above the clouds,
and a wan, gray haze pervaded the valley.
As he reached the great erratic block he saw what at first he thought
was a dark bush, or perhaps a black sheep against it.
All at once, at the sound of his step on the rocks, the figure moved,
rose, and he saw before him a woman with extended arms.
"Pabo!" she said in thrilling tones. "Here they are—the two pebbles!"
"Morwen!"
He sprang towards her, with a rush of blood from his heart.
She made no movement to meet his embrace.
"Oh, Pabo! hear all first, and then decide if I am to lose you forever."
In tremulous tones, but with a firm heart, she narrated to him all
that had taken place. This was now Sunday. Two men had been
hung. On the morrow Howel would be suspended beside them.
These executions would continue till the place of retreat of the
Archpriest was revealed, and he had been taken.
She did not repeat to him the words of Angarad, Madoc's wife—now
widow.
"Pabo!" she said, and tears were oozing between every word she
uttered, "It is I—I who bring you this tidings! I—I who offer you
these two pebbles! I—I who send you to your death!"
"Aye, my Morwen," he said, and clasped her to his heart, "it is
because you love me that you do this. It is right. I return to Caio
with you."
CHAPTER XVII
BETRAYED
A congregation exceptionally large under existing circumstances
assembled on Sunday morning before the church of Caio. Fear lest
the Normans and English quartered in the place should find fresh
occasion against the unhappy people, were they to absent
themselves as on previous Sundays, led a good many to swallow
their dislike of the man forced upon them as pastor, and to put in an
appearance in the house of God.
They stood about, waiting for the bell to sound, and looked
shrinkingly at the hideous spectacle of the two men suspended by
the bell, and at the vacant spaces soon to be occupied by others. At
the foot of the gallows sat Sheena moaning, and swaying herself to
her musical and rhythmic keening.
Around the Court or Council-House stood guards. All those standing
about knew that within it were Howel and three others, destined to
execution during the week.
They spoke to each other in low tones, and looks of discouragement
clouded every face. What could these inhabitants of a lone green
basin in the heart of the mountains do to rid themselves of their
oppressors and lighten their miserable condition? Griffith ap Rhys,
the Prince, had appeared among them for a moment, flashed on
their sight, and had then disappeared. Of him they had heard no
more.
Some went into the church, prayed there awhile, and came out
again. The new Archpriest had not put in an appearance.
It was then whispered that he had left Caio during the week, and
was not returned.
Sarcastic comments passed: such was the pastor thrust on them
who neglected his duties.
But Cadell was not to blame.
He had left Llawhaden, and had made a diversion to Careg Cennen
by the bishop's orders. The road had been bad and his horse had
fallen lame, so that he had been unable to reach his charge on
Saturday afternoon. To travel by night in such troubled times was
out of the question, and he did not reach Caio till the evening closed
in on the Sunday.
It was not, however, too dark for him to see that the frame
supporting the bell presented an unusual appearance. He walked
towards it, and then observed a woman leaning against one of the
beams of support.
"Who are you? What has been done here?" he asked.
"There is my man—I am Sheena. They have hung him, and I am
afraid of the night ravens. They will come and pluck out his eyes. I
went to see my babe, and when I returned there was one perched
on his shoulder. I drove it away with stones. There will be a moon,
and I shall see them when they come."
"Who are you?"
"I am Sheena—that is my man."
"Go home; this is no place for you."
"I have no home. I had a home, but the Norman chief drove us out,
me and my man, that he might have it for himself; and we have
been in a cowshed since—but I will not go there. I want no home.
What is a home to me without him?"
"Who has done this? Why has this been done?" asked Cadell.
"Oh, they, the Saxons, have done it because we will not give up our
priest, our chief. And my man was proud to die for him. So are the
rest—all but Madoc."
"The rest—what do you mean?"
"They will hang them all, down to the last man, for none will betray
the chief. They will go singing to the gallows. There was but Madoc,
and him the devils will carry away; I have seen one, little and black,
slinking around. I will sit here and drive devils away, lest coming for
Madoc they take my man in mistake."
Cadell was shocked and incensed.
He hasted at once to the house in which Rogier was quartered. He
knew that he had turned out the owners that he might have it to
himself.
Rogier and two men were within. They had on the table horns and a
jug of mead, and had been drinking.
Said one man to his fellow, "The Captain shall give me Sheena,
when she has done whimpering over her Welshman."
"Nay," quoth the other, "she is a morsel for my mouth, that has been
watering for her. He cannot refuse her to me."
"You, Luke! You have not served him so long as have I."
"That may be, but I have served him better."
"Prove me that."
"I can interpret for him, I know sufficient Welsh for that."
"Bah! I would not dirty my mouth with that gibberish."
"You have not the tongue wherewith to woo her."
"But I have a hand wherewith to grip her."
"The captain shall decide between us."
"Be it so. Now, captain, which of us is to comfort Sheena in her
widowhood?"
"It is all cursed perversity of Luke to fancy this woman. Before long
there will be a score of other widows for him to pick among. There is
even now that wild cat, Angarad."
"I thank you. Let the captain judge."
Then said Rogier. "Ye be both good and useful men. And in such a
matter as this, let Fortune decide between ye. There is a draught-
board; settle it between you by the chance of a game."
"It is well. We will."
The men seated themselves at the board. The draught-men
employed were knucklebones of sheep, some blackened.
While thus engaged, Cadell came in.
"Rogier!" he exclaimed, "what is the meaning of this? There be men
hung to my belfry."
"Aye! And ere long there shall be such a peal of bells there as will
sound throughout Wales, and this shall be their chime: 'Pabo, priest,
come again!' By the Conqueror's paunch, I will make it ring in every
ear, so that he who knows where he is hidden will come and declare
it."
"Consider! You make the place intolerable for me to perform my duty
in."
"Thy duty! That sits light on thy shoulders, I wot. Here have the
poor sheep been waiting for their shepherd all the morn, and he was
away."
"I have been with the bishop."
"I care not. I shall find Pabo ere long."
"But his fatherliness holds that Pabo the Archpriest was burnt."
"And we know that he was not."
"If there be found one calling himself Pabo—and he is in no mighty
desire that such should be discovered—then let him be esteemed an
impostor—a false Pabo."
"How so?"
The chaplain looked at the men and did not answer.
"But none has as yet been discovered," said Rogier.
"Do not press to find one—not in this manner."
"I shall not desist till he is given up. I have said so, and will be as
good as my word."
As he spoke, a face looked in at the door, then, after an inspection, a
body followed, and Goronwy approached stealthily.
He stood before Cadell with his eyes twinkling with malevolence, and
his sharp white face twitching with excitement, nodding his head, he
said—
"He is here—he, Pabo, and she also whom the great Baron, the
bishop's brother, desires; they are both here. Know well that it is I
who have told you this, and it is I who claim the reward."
"The reward!"
"Aye, the Archpriesthood, which thou wilt resign for a rich benefice.
Let me tell thee—here thou canst not live. They will hate thee, they
will not receive the Sacraments from thy hand, they will baptize their
children themselves rather than commit them to thee. The word of
God, coming from thy lips, will have lost all savor. They will die and
be buried on the mountains under cairns, as in the old pagan times,
rather than have thee bless their graves. No—this is no place for
thee. What the captain has done has driven barbed iron into their
souls; they will have none of thee. But I am of the stock of Cunedda
—me they will welcome, and I will be the bishop's henchman."
"Pabo here!" exclaimed Cadell, and looked round at Rogier, who had
understood nothing that had passed in this brief colloquy, as it had
been spoken in Welsh. The man who did understand the tongue was
too deeply engrossed in his game to hearken.
"Aye, aye, Pabo is here—he and Morwen. I have just seen them;
they came together down the glen, and are in the house of Howel
ap John. Be speedy and have them secured, or they may again
escape. Pabo is for you—and for him," he pointed to the Norman
captain, "for him the comely Morwen, whom he has been looking for.
Say, didst thou obtain for me the promise from the bishop?"
"What says this misshapen imp?" asked Rogier.
Then the young man sidled up to him, and, plucking at his sleeve
and pointing through the door, said: "Là—Pabo! Morwen, là!"
"By the soul of the Conqueror," exclaimed the Norman, "if that be so,
Pabo shall be strung up at the door of his church at daybreak!"
Turning to his men, with his hand he brushed the knucklebones off
the board. "Ye shall conclude the game later—we have higher sport
in view now."
The men started to their feet with oaths, angry at the interruption,
especially he who considered that he had won an advantage over his
fellow.
"I would have cornered him in three moves!" he shouted.
"Nay, not thou; I should have taken thy men in leaps!"
"Another time," said Rogier. "The man we seek has run into our
hands." Then to the boy: "Where is he hiding?"
Goronwy understood the question by the action of his hands, and
replied in the few words he had picked up of French, "Là—maison,
Howel."
"He shall be swung at once," said Rogier; "and then the first object
on which the eyes of all will rest when they come out of their houses
with the morrow's sun will be this Archpriest they have been hiding
from me."
"Nay," said Cadell, "that may not be. I have orders to the contrary
under the hand and seal of the bishop." He unfolded the
instructions.
Rogier cursed. "Well," said he, "Pabo to me matters but little—so
long as I lay my hand on Morwen."
CHAPTER XVIII
CAREG CENNEN
Before dawn Pabo was on his way, bound to Careg Cennen, riding
between four soldiers. He had been taken in the house of Howel. It
had been his intention to deliver himself up early on the morrow;
but he was forestalled.
He regretted this, for more reasons than one. He had been unable to
make final arrangements for the protection of Morwen, and he had
been unable to communicate with Howel as he desired, relative to
the secret of the treasure in the Roman gold-mines.
The owls were hooting and night-jars screaming as the cavalcade
proceeded along the Sarn Helen towards the broad valley of the
Towy by that of its tributary the Dulais. As they reached the main
river, the dawn was lightening behind the Brecknock Mountains, and
the water sliding down toward the sea shone cold as steel.
With daylight men were met upon the road, and occasionally a
woman; the latter invariably, the former for the most part fled at the
sight of the armed men. But some, less timorous remained, and
recognizing the Archpriest, saluted him with respect and with
exclamations of lamentation at seeing him in the hands of the
common enemy. At Llandeilo the river was crossed, and Pabo was
conveyed up a steep ascent into the tributary valley of the Cennen.
But this stream makes a great loop, and the troopers thrust their
horses over the spur of hill about which the torrent sweeps.
Presently the castle came in view, very new and white, constructed
of limestone, on a crag of the same substance, that rises
precipitously for five hundred feet sheer out the ravine and the
brawling stream that laves the foot of the crag.
After a slight dip the track led up a bold stony rise to the castle gate.
The situation is of incomparable wildness and majesty. Beyond the
ravine towers up the Mynydd Ddu, the Black Mountain, clothed in
short heather, to cairn-topped ridges, two thousand feet above the
sea, the flanks seamed with descending threads of water; while
further south over its shoulder are seen purple hills in the distance.
A solitary sycamore here and there alone stands against the wind on
the ridge about which the Cennen whispers far below.
The bishop had already arrived at the castle. He had followed up his
emissary pretty quickly, anxious that his own view of the case should
be maintained in the event of the capture of Pabo.
He and Gerald of Windsor were on excellent terms. Between them
they were to divide the land, so much to the crook and so much to
the sword; and whom the latter did not consume were to be
delivered over to feel the weight of the crozier. In the subjugation of
Wales, in the breaking of the spirit of the people, church and castle
must combine and play each other's game.
The staff of the bishop has a crook above and a spike below, to
signify the double power that resides in his hands, that of drawing
and that of goading. The time for the exercise of the curved head
might come in the future, that for the driving of the sharp end was
the present, thought Bernard.
No sooner did he learn of the arrival of Pabo than he bade that he
should be brought into his presence, in the room given to him by his
host on whom he had intruded himself—a room facing south,
overhanging the precipice.
The weather was mild, and the sun shone in at the window. There
was no fire.
"So!" said the prelate, fixing his gray dark-rimmed irises on the
prisoner, "you are he who give yourself out to be the Archpriest of
Caio?"
"I am he," answered Pabo.
The bishop assured himself that the strongly built upright man
before him was bound and could not hurt him; and he said to the
attendants, "Go forth outside the door and leave this dissembler with
me. Yet remain within call, and one bid Gerald, the Master, come to
me speedily."
The men withdrew.
"I wonder," said Bernard, and his words hissed through the gap in
his teeth, "I wonder now at thy audacity. If indeed I held thee to be
Pabo, the late Archpriest of Caio, who smote me, his bishop, on the
mouth and drew my blood, there would be no other course for me
but to deliver thee over to the secular arm, and for such an act of
treason against thy superior in God—the stake would be thy due."
"I am he, Lord Bishop, who struck thee on the mouth. The insult
was intolerable. The old law provided—an eye for an eye, and a
tooth for a tooth. If thou goest by the law of Moses deal with me as
seems right. What the Gospel law is, maybe thou art too recent in
Holy Orders and too new to the study of the Sacred Scriptures to be
aware."
"Thou art insolent. But as I do not for a moment take thee to be the
deceased Pabo——"
"Lord Bishop, none doubt that I am he."
Bernard looked at him from head to foot.
"Methinks a taller man by three fingers' breadth, and leaner in face
certainly, as also browner in complexion, and with cheek-bones
standing out more forcibly."
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like