Supervised Learning with Quantum Computers Maria Schuld download
Supervised Learning with Quantum Computers Maria Schuld download
Schuld download
https://textbookfull.com/product/supervised-learning-with-
quantum-computers-maria-schuld/
https://textbookfull.com/product/quantum-computation-and-logic-
how-quantum-computers-have-inspired-logical-investigations-maria-
luisa-dalla-chiara/
https://textbookfull.com/product/supervised-learning-with-python-
concepts-and-practical-implementation-using-python-vaibhav-
verdhan/
https://textbookfull.com/product/machine-learning-foundations-
supervised-unsupervised-and-advanced-learning-taeho-jo/
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/
https://textbookfull.com/product/machine-learning-paradigms-
advances-in-learning-analytics-maria-virvou/
https://textbookfull.com/product/programming-quantum-computers-
essential-algorithms-and-code-samples-1st-edition-eric-r-
johnston/
https://textbookfull.com/product/supervised-machine-learning-in-
wind-forecasting-and-ramp-event-prediction-1st-edition-harsh-s-
dhiman/
https://textbookfull.com/product/quantum-computing-program-next-
gen-computers-for-hard-real-world-applications-1st-edition-nihal-
mehta/
Quantum Science and Technology
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.
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
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
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.
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
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
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.
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
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
CC CQ
data generating system
QC QQ
C - classical, Q - quantum
6 1 Introduction
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.
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
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
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’.
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.
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
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
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
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
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 )
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,
4χ
16 1 Introduction
1
p(q4 = 1) = |0.921 + 0.866|2 + |0.390 + 0.500|2 ≈ 0.552,
4χ
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.
textbookfull.com