100% found this document useful (4 votes)
120 views65 pages

Complete Download Quantum Computing For Developers A Java Based Introduction MEAP V09 Johan Vos PDF All Chapters

MEAP

Uploaded by

klishkasemp7
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 (4 votes)
120 views65 pages

Complete Download Quantum Computing For Developers A Java Based Introduction MEAP V09 Johan Vos PDF All Chapters

MEAP

Uploaded by

klishkasemp7
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/ 65

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Quantum Computing for Developers A Java based


introduction MEAP V09 Johan Vos

https://textbookfull.com/product/quantum-computing-for-
developers-a-java-based-introduction-meap-v09-johan-vos/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Quantum Computing In Action MEAP v09 Johan Vos

https://textbookfull.com/product/quantum-computing-in-action-
meap-v09-johan-vos/

textboxfull.com

Parallel and High Performance Computing MEAP V09 Robert


Robey

https://textbookfull.com/product/parallel-and-high-performance-
computing-meap-v09-robert-robey/

textboxfull.com

Practical Quantum Computing for Developers: Programming


Quantum Rigs in the Cloud using Python, Quantum Assembly
Language and IBM QExperience 1st Edition Vladimir Silva
https://textbookfull.com/product/practical-quantum-computing-for-
developers-programming-quantum-rigs-in-the-cloud-using-python-quantum-
assembly-language-and-ibm-qexperience-1st-edition-vladimir-silva/
textboxfull.com

Scala for Java Developers A Practical Primer 1st Edition


Toby Weston

https://textbookfull.com/product/scala-for-java-developers-a-
practical-primer-1st-edition-toby-weston/

textboxfull.com
A First Introduction to Quantum Computing and Information
Bernard Zygelman

https://textbookfull.com/product/a-first-introduction-to-quantum-
computing-and-information-bernard-zygelman/

textboxfull.com

Java Cookbook Problems and Solutions for Java Developers


Early Release Ian F. Darwin

https://textbookfull.com/product/java-cookbook-problems-and-solutions-
for-java-developers-early-release-ian-f-darwin/

textboxfull.com

Mastering Corda Blockchain for Java Developers 1st Edition


Jamiel Sheikh

https://textbookfull.com/product/mastering-corda-blockchain-for-java-
developers-1st-edition-jamiel-sheikh/

textboxfull.com

Introducing Maven A Build Tool for Today s Java Developers


Second Edition Balaji Varanasi

https://textbookfull.com/product/introducing-maven-a-build-tool-for-
today-s-java-developers-second-edition-balaji-varanasi/

textboxfull.com

Java Cookbook Problems and Solutions for Java Developers


final release 4th Edition Ian F. Darwin

https://textbookfull.com/product/java-cookbook-problems-and-solutions-
for-java-developers-final-release-4th-edition-ian-f-darwin/

textboxfull.com
MEAP Edition
Manning Early Access Program
Quantum Computing for Developers
A Java-based introduction
Version 9

Copyright 2020 Manning Publications

For more information on this and other Manning titles go to


manning.com

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
welcome
Thank you for purchasing the MEAP for Quantum Computing for Developers: A Java-
based introduction.
With this book, I want to introduce the potential and relevance of Quantum Computing to
Java Developers. This book is targeting both beginning developer as well as very
experienced Java developer -- and anything in between.
Most developers already heard something about Quantum Computing, but to many it
seems very abstract, futuristic or mysterious. In this book, I try to explain why Quantum
Computing will be very relevant to most Java developers, and why you better start learning
about it today, and not wait for the first powerful quantum computers to arrive.
Quantum Computing is expected to have a big impact in many IT areas, including
encryption, communication, security, scientific research, optimization, databases,... .
In the book, we show how Java developers can use their existing skills (Java
development) and still leverage the benefits of Quantum Computing. You don't need a
degree in physics in order to use Quantum Computing.
We explain the core concepts of Quantum Computing through the eyes of a developer,
and we show a number of Java samples that leverage the benefits of Quantum Computers.
These Java samples run on an open-source Quantum Computer Simulator we refer to, and
with minor modifications they can run on real Quantum hardware.
I realize that the subject of Quantum Computers is very new to Java developers. When
talking about Quantum Computing on conferences, I highly appreciate the feedback from
the audience. The more I hear from developers, the better we can make this book. Therefore,
I recommend you to use the book's forum to ask question or provide comments.
If you have any questions, comments, or suggestions, please share them in Manning’s
liveBook's Discussion Forum for my book.

—Johan Vos

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
brief contents
PART 1: QUANTUM COMPUTING INTRODUCTIONS
1 Evolution/Revolution/Hype?
2 Hello World, Quantum Computing
3 Qubits and Quantum Gates, the basic units in Quantum Computing
PART 2: FUNDAMENTAL CONCEPTS AND HOW THEY RELATE TO CODE
4 Superposition
5 Entanglement
6 Quantum Networking, the basics
PART 3: QUANTUM ALGORITHMS AND CODE
7 Our HelloWorld explained
8 Secure communication using Quantum Computing
9 Deutsch-Jozsa algorithm
10 Grover's Search Algorithm
11 Shor’s algorithm
APPENDIXES:
A Installing Strange
B Linear Algebra

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
1

This chapter covers:


Evolution/Revolution/Hype?
1
Setting the expectations for Quantum Computing
Explaining what kinds of problems are suited for Quantum Computers
Different options for Java Developers to work with Quantum Computing

The amount of books, articles and blog posts about Quantum Computing is increasing. Even if
you read only very basic information about Quantum Computing, it is clear that this is not just an
incremental enhancement of classical computing. The core concepts of Quantum Computing are
fundamentally different, but also its application area is very different. In some areas, Quantum
computers are expected to be able to address problems that classical computers are unable to.

Furthermore, since Quantum Computing is based on quantum physics, there is often some
mystery associated with it. Quantum physics is not the simplest part of physics, and some aspects
of quantum physics are extremely difficult to understand.

All combined, Quantum Computing is often pictured as some mysterious new way of working
with data, that will change the world drastically. The latter is true, at least based on what we
know at this moment. Many analysts believe it will take between 5 and 10 years before real
useful Quantum Computing is possible, and most believe the impact will be huge.

In this book, we try to stay close to reality. We want to explain to existing and new Java
developers how they can leverage Quantum Computing in their existing and new applications.
As we will show, Quantum Computing has indeed a huge impact on a number of important
issues in the IT industry. We will also explain why it is important to prepare for the arrival of
real quantum computers, and how you can do that, using Java and your favourite toolset (i.e.
your IDE and build tools). While it is true that real quantum hardware is not yet available on a

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
2

wide scale, developers should realise that building software leveraging quantum computing takes
time as well. Thanks to quantum simulators and early prototypes, there is nothing that prevents
developers to start working on exploring quantum computing in their projects today. This
increases the chances that their software is ready by the day the hardware is available.

1.1 Expectation Management

NOTE take-aways:

Don’t assume Quantum Computing (QC) will fix everything


QC is fundamentally different from classical computing
QC is mainly suitable for complex problems
QC and classical computers will have to work together
the hardware is very complex, and not in our scope
although the hardware is not yet crystalized, we can already work on
software

The potential impact of Quantum Computing is huge. Researchers are still trying to estimate the
impact, but at least in theory, there might be very large consequences for the IT industry,
security, healthcare and scientific research and thus for mankind in general. Because of this large
impact, a Quantum Computer is often incorrectly pictured as "a huge classical computer". This is
not true, and in order to be able to see the relevance of quantum computing, one must understand
why Quantum Computing is so fundamentally different from classical computing.

It has to be stressed that there are still many roadblocks that need to be addressed before the big
ambitions can be realised.

The potential success of Quantum Computing depends on a number of factors that can be put in
two categories:

Hardware: new and complex hardware is needed


Software: in order to leverage the capabilities offered by quantum hardware, dedicated
software needs to be developed

1.1.1 Hardware
There are a number of uncertainties that prevent wide-scale usage of Quantum Computing at this
moment. Adding to those uncertainties, it should be stressed that Quantum Computers will not
fix every single problem.

The hardware needed for Quantum Computing is by no means ready for mass production.
Creating Quantum hardware, in the form of a Quantum Computer or a Quantum co-processor, is

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
3

extremely challenging.

The core principles of Quantum Computing, which we will explain in this book, are based on the
core principles of quantum mechanics. In quantum mechanics, the fundamental particles of
nature are studied. It is generally considered to be one of the most difficult aspects of physics,
and it is still in an evolving phase. Some of the brightest physicists, including Albert Einstein,
Max Planck and Ludwig Boltzmann have been worked on the theory of quantum mechanics.
One of the major problems in the research of quantum mechanics is that it is often extremely
hard to check whether the theory matches with the reality. It is no less than amazing that theories
were created predicting the existence of some particles that were not yet observed. Observing the
smallest elements of nature, and their behavior requires very special hardware.

It is already difficult to investigate and manipulate quantum effects in closed lab environments.
Leveraging those quantum effects in a controllable way in real-world situations is an even bigger
challenge.

Most of the experimental quantum computers that exist today are based on the principles of
superconducting, and operate at a very low temperature (e.g. 10 milli Kelvin, or close to -273
degrees Celcius). This has some practical restrictions that are not encountered with classical
computers, operating at room temperature.

In this book, we make abstraction of the hardware. Clearly, the hardware problem isn’t solved,
and it is generally expected to take "a number of years" before hardware is available that can be
leveraged to solve problems that are currently impossible to solve with classical computing. At
the time of this writing, a number of early quantum computer prototypes already exist. IBM has a
5 qubit quantum computer that is available for public usage through a cloud interface, and
quantum computer with more qubits in the research labs and for clients. Google has a quantum
processor containing 72 qubits, named Bristlecone. Specialised companies like D-Wave and
Rigetti have quantum computing prototypes as well. It has to be mentioned that it is not trivial to
compare different quantum computers. At first sight, the number of qubits may sound the most
important criterium, but it can be misleading. One of the major difficulties when building
quantum computers, is to keep the quantum states as long as possible. The slightest disturbance
can destroy the quantum states, and therefore quantum computers are subject to errors that need
to be corrected.

As we will discuss later, there is no reason for software developers to wait until the hardware is
ready before they can start thinking about software algorithms that should eventually run on
Quantum hardware. The principles of Quantum computing are understood, and can be simulated
via Quantum Computer simulators. It is expected that quantum software written for quantum
computer simulators will also work on real quantum computers, provided that the core quantum
concepts are similar.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
4

1.1.2 Software
While there are a number of areas where Quantum Computing could, in theory, lead to a huge
break-through, it is generally agreed that Quantum Computers will not replace classical
computers.

There is a growing consensus where Quantum computers, or Quantum processors, can take over
some tasks from classical computers, but they won’t replace classical computers.

The problems that can be solved using Quantum Computing do not differ from problems that
today are tackled using classical computers. However, since Quantum Computing uses a
completely different underlying approach, the problems can be handled in a completely different
way, and for a set of problems a dramatic increase in performance can be achieved using
Quantum Computing. As a consequence, Quantum computers should be able to solve problems
that today are not practically solvable because there are not enough computing resources to solve
them now.

SIDEBAR A few words on time complexity


The complexity of algorithms is often expressed as the time complexity. In
general, algorithms will take longer to complete when the amount of input
data becomes bigger.
Let us assume that there are n items of input data. If each item requires
a fixed amount of steps, the total time for the algorithm to complete is linear
with n, the number of input items. In this case, the algoritm is said to take
linear time.
Many algorithm are more complex than this. When the number of input
itemsgrows, the total amount of required steps may grow with e.g. the
square of n,n2 , or even with the third power of n, nk for a fixed value of k .In
this case, the algorithm is said to take polynomial time. In this case, the
algorithm is said to take polynomial time.
Some algorithms are even harder to solve when the number of input
items grows.If no known algorithm is known that can solve a problem in
polynomial time, we say the algorithm takes non-polynomial time.
Algorithms are said to be exponential time if they require exponentially
more steps when n increases. For example, if the amount of required steps
is , the problem is said to be of exponential complexity.

It turns out that quantum computers will be most helpful for tackling problems that can not be
solved by classical computers in polynomial time, but that can be solved by a quantum computer
in polynomial time.

A very common example is integer factorization, which is a very common operation in

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
5

encryption. The basic idea in integer factorization is to decompose a number into prime numbers
that, when multiplied together, yield the original number. For example, 15 = 3 x 5. While this
is easy to do without a computer, you can imagine a computer is helpful when the numbers
become bigger, e.g. 146963 = 281 x 523.

The larger the number we want to factor, the longer it will take to find the solution. This is the
basis of many security algorithms. They leverage the idea that it is close to impossible to factor a
number consisting of e.g. 1024 bits. It can be shown that the time required to solve this problem
is in the order of

EQUATION 1.1

where b is the number of bits in the original number. The e at the beginning of this equation is
the important part. In short, it means that by making b larger, the time required to factor the
number becomes exponentially larger. The diagram in Figure 1.1 shows the time it takes to factor
a number with b bits.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
6

Figure 1.1 Time grows exponential with number of bits

Note that the absolute time is not relevant. Even if the fastest existing computers are used, adding
a single bit makes a huge difference.

This problem is said to be non-polynomial, as there is no known classical algorithm that can
solve the problem in polynomial time. Hence, by increasing the number of bits, it will be almost
impossible for classical computers to find a solution to this problem.

However, this same problem can be handled by a quantum algorithm in polynomial time. As we
will show in Chapter 4, using Shor’s algorithm, the time to solve this problem using a Quantum
Computer is in the order of \b^3.

To show what that means, we overlay the required time using a quantum algorithm on a quantum
computer over the required time using a classical algorithm on a classical computer. This is
illustrated in Figure 1.2.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
7

Figure 1.2 Polynomial time versus exponential time

Starting from a number of bits, the quantum computer will be much faster than the classical
computer. Moreover, the larger the amount of bits, the larger the difference. This is because the
required time for solving the problem on a classical computer increases exponentially when the
amount of bits is growing, where the same increase of bits will "only" cause a polynomial
increase for the quantum algorithm.

These kinds of problems, that are said to be polynomial in Quantum, are the ones that makes
mose sense for Quantum Computers to deal with.

1.1.3 Algorithms
Shor’s algorithms is a great example of a computational problem that is hard to solve on a
classical computer (non-polynomial in time) and relative easy on a quantum computer
(polynomial in time). Where does the difference come from? As we will discuss in Chapter 4,
Shor’s algorithm transforms the problem of integer factorisation into the problem of finding the
periodicity of a function, i.e. find the value p for which the function evaluation f(x+p) = f(x)
for all possible values of x. This problem is still very hard to solve on a classical computer, but it
is relative easy to fix on a Quantum Computer.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
8

Most algorithms that are known today to be very suitable for quantum computers are based on
the same principle: transform the original problem into a problem space that is easy to solve
using Quantum Computers.

The classic approach is shown in Figure 1.3. The best known algorithm is applied to the
problem, and the result is obtained.

Figure 1.3 Typical approach solving a problem on a classical computer

If we can somehow transform the original problem to a different problem that can easier be
handled by a quantum computer, we can expect a performance improvement. This is shown in
Figure 1.4.

Figure 1.4 Transforming a problem to an area where quantum computers can make a big
difference

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
9

Note that we have to take into account the cost of transforming the original problem to a
different problem, and vice versa for the final result. However, when talking about real
compution-intensive algorithms, this cost should be neglectible.

NOTE When you see a Quantum algorithm being explained, you may wonder why
it seems to take a detour from the original problem. Quantum computers
are capable of solving particular problems very fast, so moving an original
problem to one of those particular problems allows for a much faster
algorithm, using quantum computing.

Coming up with those algorithms often involves a very deep mathematical background.
Typically, developers will not create new quantum algorithms for applications that will benefit
from quantum computers, but they will use existing algorithms. However, developers who know
the basics about quantum algorithms, why they are faster, and how to use them, will have an
advantage.

1.1.4 Why start with quantum computing today?


Programmers sometimes wonder why they should start learning about quantum computing, when
real, usable quantum computers are still years away. Developers have to realise though that
writing software that involves quantum computing is different from writing classical software.
While it is expected that there will be libraries that make it convenient for developers to leverage
quantum computers, those libraries have to be written, and even then it will require skills and
knowledge to be able to use the best tools for a particular project.

Any developer working on a project that requires encryption or secure communication benefits
from learning about quantum computing. Some existing classical encryption algorithms will
become insecure when quantum computers are available. It would be a bad idea to wait for the
first time a quantum computer breaks encryption before hardening the encryption software. At
the contrary, you want to be prepared before the hardware is available. Since quantum computing
is really disruptive, it can be expected that most developers need more time learning quantum
computing than they typically need when using a new library.

While we do not want to scare people with doom scenario’s, it is important to understand that
there is no need for a wide installed base of quantum computers before existing encryption
techniques can be compromised. Cyber attacks do not require a large amount of computers, and
can be carried out from any place.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
10

SIDEBAR There is a reasonable chance that a number of existing communication


protocols and encryption techniques will become vulnerable once quantum
computers become more powerful. It is important for developers to
understand what kind of software might be vulnerable, and how to address
this. This is not something that can be done overnight, hence it is
recommended to start looking into this sooner rather than later.

The software examples we will discuss in this book are very basic applications. They illustrate
the core principles of quantum computing, and they make it clear what kind of problems can
really benefit from quantum computing. But the gap between basic algorithms and fully
functional software is large. Hence, while it will take years before the hardware is ready,
developers have to understand that it will probably also take a long time before they have
optimised their software projects so that they leverage quantum computing as much as possible,
where applicable.

In the mid of the previous century, when the first digital computers were built, software
languages needed to be created as well. The difference with today is that we can now use
classical computers to simulate quantum computers. We can work on software for quantum
computers, without having access to a quantum computer.

This is a very important benefit, and it stresses the importance of quantum simulators.
Developers starting today looking into quantum computing using simulators will have a huge
advantage on other developers when the quantum hardware becomes more widely available.

1.2 The disruptive parts of Quantum Computing, getting closer


to nature
One of the main application areas of quantum computing is everything related to physics. For a
long time, scientists have been trying to understand the core concepts of modern physics by
simulating the concepts on classical computers. However, since the most granluar particles of
nature do not follow classic laws, it is complex to simulate them on classical computers. Using
exactly those quantum particles and their laws as the cornerstones of quantum computers makes
it much easier to tackle those problems.

1.2.1 Evolutions in classical computers


Over the past decades, computers have become more powerful. Improvements in performance
are often realized because of

an increase in the memory of the computer


an increase in the performance of the processor
an increase in the number of processors in a computer

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
11

These improvements typically lead into incremental, linear benefits.

The potential performance gains that are expected to be realised using Quantum computers have
nothing to do with these improvements.

A Quantum computer is not a classical computer with smaller chips, more memory, or faster
communication.

Instead, Quantum Computing starts with a completely different fundamental concept, which is a
qubit. We will discuss the qubit in detail in Chapter XX but since it is a crucial concept, we
introduce it here.

1.2.2 Revolution in quantum computers


In a classical computer, a bit is smallest piece of information, and it can be either 0 or 1.
Different operations are possible on those bits, and bits can be altered or combined. At any
moment though, all bits in a computer are in a clear state: 0 or 1. The physical analogy of a
classical bit is related to current. A "0" state corresponds with no current, and a "1" state
corresponds with current.

All existing classical software development is based on the manipulations of those bits. Using
combinations of bits, and applying gate operations of bits is the essence of classical software
development. We will discuss this in more detail in Chapter 3.

In Quantum Computing, the fundamental concept is a qubit. Similar to a classical bit, a qubit can
hold the values 0 and 1. But the disruptive difference is that the value of a qubit can be a
combination of the values 0 and 1. When people first hear about this, they are often confused. It
sounds artificial to have the qubit, the elementary component of Quantum Computing to be more
complex than the elementary component of classical computing, the bit. It turns out, however,
that a qubit is closer to the fundamental concepts of nature than the classical bit.

1.2.3 Quantum Physics


As its name implies, the foundation for Quantum Computing comes from quantum physics. In
quantum physics, the smallest particles, their behavior and their interactions are investigated. It
turns out that some of those particles have properties with interesting characteristics. For
example, an electron has a property called spin, which can take two values: up and down. The
interesting thing is that the spin of an electron can, at a given moment, be in a so called
superposition of these two values. This is a hard-to-understand physical phenomenon, and it
comes down to the easier-to-understand mathematical formula where the spin can be a linear
combination of the up value and the down value — with some restrictions that we talk about in
chapter XX.

The spin of an electron is just one sample of a physical phenomenon that allows for a property to

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
12

be in more than one state at the same moment.

In Quantum Computing, the qubit is realised by this physical phenomenon. As a consequence,


the qubit is extremely close to the reality of quantum physics. The physical realisation of a qubit
is a real-world concept. Therefore, Quantum Computing is often said to be very close to how
nature works.

One of the goals in Quantum Computing is to take advantage of physical phenomenons that
happen at the scale of the smallest particles. Hence, Quantum Computing is more "natural" and
although it seems much more complex than classical computing at first sight, it can be argued
that it is at the contrary much simpler, as it requires less artificial constructs.

Understanding quantum phenomenons is one thing, being able to manipulate them is another. It
took lots of time and resources to be able to prove that quantum phenomenons really exist. In
order to allow computational representations on qubits, one must be able to manipulate the
elementary parts. While this is what is typically done in large scientific research centers, it is still
very hard to do this in a typical computer environment.

1.3 Hybrid Computing


We already mentioned that Quantum Computers can be excellent when dealing with specific
problems, but not for all kinds of problems. Therefore, the best results can probably be achieved
using a new form of hybrid computing, where a quantum system solves part of the problem,
where a classical computer is solving the other parts of the problem.

Actually, this approach is not entirely new. A very similar pattern is already being used in most
modern computer systems, where the Central Processing Unit (CPU) is accompanied by a
Graphics Processing Unit (GPU). GPU’s are good in some particular tasks (e.g. doing vector
operations that are needed in graphical applications, or in deep learning applications), but not in
all tasks.

Many modern UI frameworks, including JavaFX, leverage the availability of both CPU’s and
GPU’s, and optimize the tasks they have to perform by delegating parts of the work to the CPU
and other parts to the GPU, as shown in Figure 1.5.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
13

Figure 1.5 CPU and GPU sharing work

The idea of using different co-processors for different tasks can be extended to Quantum
Computing. In the ideal scenario, a software application delegates some tasks to a CPU, other
tasks to a GPU and other tasks to a Quantum Processing Unit (QPU), as shown in Figure 1.6.

Figure 1.6 CPU, GPU and QPU sharing work

The best results can be achieved when the best tools are used for a specific job. In this case, it
means that the software application should use the GPU for e.g. vector computations, the QPU
for algorithms that are slow on classical systems but fast on quantum systems, and the CPU for
everything that doesn’t benefit from either the GPU or the QPU.

If every end-application has to judge what parts should be delegated to which processor, the job
of a software developer would be extremely difficult. We expect though that frameworks and
libraries will provide help here, and abstract this problem away from the end-developer.

If you are using the JavaFX API’s to create user interfaces in Java, you don’t have to worry
about what parts are executed on the GPU, and what parts are executed on the CPU. The internal
implementations of the JavaFX API already do that for you. The JavaFX framework detects the

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
14

information about the GPU, and will delegate work to it. While it is still possible for developers
to directly access either the CPU or the GPU, this is typically something high-level languages as
Java shield away.

In the picture above, we oversimplified the QPU. Where a GPU easily fits in modern servers,
desktop systems, but also in mobile and embedded devices, providing a Quantum Processor
might be more tricky, due to the specific requirements for quantum effects to be manipulated in a
controlled, noise-free environment.

It is very well possible that, at least initially, most of the real quantum computing resources will
be available via specific cloud servers, instead of via co-processors on embedded chips.

The principles stay the same though, since the end-software application can benefit from libraries
splitting the complex tasks, and delegate some tasks to a quantum system that is accessible via a
cloud service as shown in Figure 1.7.

Figure 1.7 Quantum calculations relayed to cloud

1.4 Abstracting software for Quantum Computers


Although real Quantum Computers already exist as we mentioned before, they are by no means
ready for mass production. While the achievements in the past years for creating hardware for
Quantum Computing are huge, there is still lots of uncertainty about the implementation of a
real, useful Quantum Computer or Quantum processor.

However, this should not be a reason to not start working on the software. We learned a lot from
classical hardware, and from the software that is built on top of it. The high-level programming
languages that have been created in the past decades allow software developers to create
applications in a convenient way, such that they do not have to worry about, or even understand,
the underlying hardware. Java, being a high-level programming language, is particularly good in

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
15

making abstraction of the underlying low-level software and hardware. Ultimately, when a Java
application is executed, some very low-level, hardware-specific instructions are executed.
Depending on the hardware being used, specific machine instructions, for different processors
with different architectures are used.

Hardware for classical computers is still evolving. Software is evolving as well. Most of the
changes in the Java language, however, are not related to hardware changes. The decoupling of
hardware and software evolutions allows for much faster innovation. There are a number of
areas, though, where improvements in hardware ultimately lead to more specific evolutions in
software but for most developers, hardware and software can be decoupled from each other.
Figure 1.8 shows how a Java application ultimately results in operations on hardware, but
different abstraction layers shield the real hardware (and the evolutions in the hardwar) from the
end application

Figure 1.8 Classic software stack

For a large part, software for Quantum Computing can be decoupled from the hardware
evolutions. While the hardware implementation "details" are far from clear, the general
principles are becoming very clear. We discuss those principles in Chapters 2 - 5. Software
development can be based on those general principles. Similar to how a classical software
developer doesn’t have to worry about how transistors (a low-level building block for classical
computers) are combined on a single chip, a developer of quantum software does not have to
think about the physical representation of a qubit (one of the low level building blocks in
quantum computing). As long as the quantum software conforms with and exploits the general
principles, it will be usable on real quantum computers or quantum processors when they
become available.

A major benefit while developing software for Quantum Computers, is the availability of
classical computers. The behavior of quantum hardware can be simulated via classical software.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
16

This is a huge advantage, since it implies that quantum software can be tested today, using a
quantum simulator written in classical software, on a classical computer. Obviously there are
major differences between a quantum computer simulator and a real hardware quantum
computer. Almost by definition, a typical quantum algorithm will execute much faster on a
quantum computer than on a quantum simulator. But from a functional point, the results should
be the same.

Apart from real quantum computers and quantum computer simulators, cloud services should be
taken into account. By delegating the work to a cloud service, an application doesn’t even know
if it is running on a simulator, or on a real quantum computer. The cloud provider can update its
service from a simulator to a real quantum computer. The results should be obtained much faster
when a real quantum computer is used, but they should not be different from when a simulator is
used.

These options can be combined in Figure 1.9

Figure 1.9 Stack for Java applications using Quantum API’s

In this picture, we show that Java applications can leverage libraries that provide Quantum
API’s. The implementation of these library can do the work on a real quantum computer, use a
quantum computer simulator, or delegate the work to the cloud. For the end application, the
results should be similar.

As we already discussed, Quantum algorithms are particular useful when dealing with problems
that require exponential scaling when dealt by with classical computers. One of the typical
examples for this is integer factorization. A Quantum Computer will be capable of decomposing
large integers into their prime factors (at least, it will provide a part of the algorithm), something
that is not possible today even with all computing power in the world combined. As a
consequence, a quantum computer simulator written in classical software is also not able to
factor those large numbers.

The same Quantum Algorithm is of course also capable of factoring small integers. Quantum
simulators can thus be used to factor small integers. The Quantum Algorithm can be created,
tested and optimized using small numbers on a quantum simulator. Whenever the hardware

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
17

becomes ready for it, that same algorithm can then be used to factor numbers on real hardware (a
5 qubit system has already factored 21).

When the quantum hardware improves (more qubits are added, or less errors occur), the
algorithm will allow larger numbers to be factorised.

In summary, the principles of Quantum Computers can be mimicked in software simulators


running on classical computers. Developers can take advantage of this, and run their quantum
experiments on those simulators. Throughout this book, we use an open-source Quantum
Simulator written in Java that works both locally on your laptop/desktop, as well as in cloud
environments. The developer doesn’t have to worry about where the code is being executed.
Also, when the hardware topology changes in the future (e.g. a quantum co-processor is added),
the end-application doesn’t have to be modified. The library will be updated, but the top-level
API’s should not be affected to this.

We explain some of the Quantum Computing principles by looking at the source code of the
algorithms in the library. While this is not stricly needed to write applications leveraging
Quantum Computing, it will give the reader more insight in how and when quantum algorithms
might lead to a real advantage.

In this chapter, you learned:

Quantum computing is not just an upgrade of classical computing


Quantum computing leverages the real core concepts of physics, and is therefore more
"real" than classical computing
It may take many years before hardware is powerfull enough to gain the real benefits of
quantum computing
Quantum computers are expected to generate a huge speedup in the execution of some
algorithms that are practically impossible to solve in the classic way, but they won’t
replace classical computers since they are only good at particular (but important) tasks
Software development at a high level should not worry about the low level quantum
details
Software developers should be aware of the fact that moving some parts of an algorithm
to a different area might lead to huge improvements.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
18

Hello World, Quantum Computing

This chapter covers


2
an introduction to Strange, a quantum computing library in Java
a simple demo of the high-level API of Strange
a very basic sample of the low-level API of Strange
a basic visualisation of quantum circuit
references to concepts that will be explained later in the book

In this chapter, you will be introduced to Strange, an Open Source Quantum Computing project
including a Quantum simulator, and a library that exposes a Java API that you can use in regular
Java applications.

Throughout the book, we will dicuss concepts of Quantum Computing, and their relevance to
Java developers. We will show how Java developers can benefit from these concepts.

Strange contains a pure Java implementation of the required quantum concepts. When discussing
the concepts, we point the interested reader to the relevant code implementation of the concept in
Strange. This is part of a low-level API.

Most Java developers will not have to deal with low-level quantum concepts at all. However,
they might benefit from algorithms that take advantage of these concepts. For this group, Strange
provide a set of high-level algorithms that can be used in regular Java applications. These
algorithms are what we call the high-level Java API.

2.1 Introducing Strange


Figure 2.1 shows a high-level overview of the components of Strange.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
19

Figure 2.1 High-level overview of the Strange architecture.

The Java Quantum API provides an implementation for a number of typical quantum algorithms.
These are the high-level algorithms that can be used by Java developers in their regular Java
applications. No knowledge about quantum computing is required in order to use the algorithms.

The Quantum Core Layer contains the low-level API which provides deeper access to the real
quantum aspects. The high-level API does not contain a concept specific to quantum computing,
but its implementation leverages the low-level Quantum Core Layer. Where the high-level API
shields the user from the quantum concepts, the low-level API at the contrary exposes those
concepts to the user.

The high-level API provides developers with a ready-to-use interface to quantum algorithms. By
using it, you can benefit from the gains realised by quantum computing. However, if you want to
be able to create your own algorithms, or modify existing algorithms, the low-level API is the
starting point.

2.2 Running a first demo with Strange


This book comes with a repository containing a number of samples that leverage Strange. The
requirements and instructions for running those samples are explained in Appendix A. The first
demo sample is located in the hellostrange folder in the ch02 directory.

We use the gradle build tool for building and running the samples, but users familiar with maven
will be able to easily run the samples with maven.

We do recommend you run the samples using your favourite IDE (IntelliJ, Eclipse or NetBeans).
The instructions on how to run Java applications are different for each IDE. Therefore, in this
book, we use the gradle build system from the command line.

Using the provided gradle (or maven) scripts implicitly makes sure all required code

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
20

dependencies are downloaded. The code is compiled, and executed, as illustrated in Figure 2.2

Figure 2.2 Using gradle or maven to run java applications

The result of

./gradlew run

on linux and macos or

gradlew.bat run

on Windows will result in the following output:

> Task :run


Using high-level Strange API to generate random bits
----------------------------------------------------
Generate one random bit, which can be 0 or 1. Result = 1
Generated 10000 random bits, 4961 of them were 0, and 5039 were 1.

BUILD SUCCESSFUL in 3s

Congratulations! You just executed a program that involves Quantum Computing.

2.2.1 Inspecting the code for HelloStrange


In order to understand the output of the HelloStrange demo application, it is recommended to
have a look at the source code for the application. Before we investigate the Java code, we have a
look at the build.gradle file that is in the root directory of the sample. The build.gradle file
contains the instructions that allow gradle to compile the Java classes, download and install
dependencies, and run the application.

Typically, you shouldn’t worry about the structure of the build.gradle file, unless you plan to
create applications or projects yourself. In that case, you can find great resoures about using
Gradle online.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
21

For clarity, the build.gradle file is shown in Listing 2.1:

Listing 2.1 build.gradle file for HelloStrange sample


plugins {
id 'application'
id 'org.javamodularity.moduleplugin' version '1.2.1'
}

repositories {
mavenCentral();
}

dependencies {
compile 'com.gluonhq:strange:0.0.5'
}

mainClassName = 'com.gluonhq.javaqc.ch02.hellostrange.Main'

declare what plugins gradle should use Gradle is a build system that allows third
parties to provide plugins in order to make it easier to build and deploy
applications. The demo application is an application, and therefore uses the
application plugin. Strange is using Java 11 and the modularity concepts that
have been introduced in Java 9. Our demo applications don’t require knowledge
about the modular system in Java though. However, in order for the build tools to
be able to leverage the modularity, we also declare the use of the javamodularity
plugin.
declare where to download dependencies . Since our demo application is using a
Java library, Gradle needs to know where to find this library in order to use it for
compiling and running the demo application. The Strange library is uploaded to the
mavenCentral repository, hence we declare that in the repositories section.

declare the dependencies. The HelloStrange demo application uses the Strange
library. In the dependencies section of the build.gradle, we declare that we need
version 0.0.3 of the Strange library, which is defined by the combination of a
package name com.gluonhq and an artifact name strange. The compile keyword
tells Gradle that this library is needed to compile the application, and by default it
will then also use this library to run the application.
declare the main class that should be executed when running the demo. Finally, we
need to tell Gradle where it can find the main entry point to our application. In this
case, the project has only a single Java source file with a main method, hence this
is the entry point.

The build.gradle file is interesting to developers and code maintainers who are working on
project development, deployment, testing and distribution.

The Java source files in a project are very relevant to all developers. Gradle requires by default
that Java source files are placed in a folder src/main/java, followed by the packagename and
the name of the Java source file. In the case of the HelloStrange application, the single source file
is thus located in src/main/java/com/gluonhq/javaqc/ch02/hellostrange/Main.java.

Before we show the code, we will briefly explain what we want to achieve. In this first sample,

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
22

we will invoke a method on the high-level Strange API. This method is called randomBit() and it
generates a classic bit which is either 0 or 1. We will discuss the randomBit() method call
shortly. Apart from this call, all Java code used in the sample only uses the standard API’s that
are part of the JDK. The flow for the sample is shown in Figure 2.3

Figure 2.3 High-level overview of the first Java sample

From this flow, it can be seen that the Java class we create depends on the high-level Strange
API. We don’t have to worry about how it is implemented in the lower layers of Strange.

The complete source code for the application is shown in Listing 2.2. We will analyse this source
code right away.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
23

Listing 2.2 Main.java file for HelloStrange sample


package com.gluonhq.javaqc.ch02.hellostrange;

import com.gluonhq.strange.algorithm.Classic;

public class Main {

public static void main (String[] args) {


System.out.println("Using high-level Strange API to generate random bits");
System.out.println("----------------------------------------------------");
int randomBit = Classic.randomBit();
System.out.println("Generate one random bit, which can be 0 or 1. Result = "+randomBit);
int cntZero = 0;
int cntOne = 0;
for (int i = 0; i < 10000; i++) {
if (Classic.randomBit() > 0) {
cntOne ++;
} else {
cntZero ++;
}
}
System.out.println("Generated 10000 random bits, "+cntZero+" of them were 0,
and "+cntOne+" were 1.");
}
}

We call the Strange high-level API to generate one random bit


We generate 10000 random bits

This Java code follows the basic Java conventions, which we assume you are familiar with. For
this sample, we briefly mention the typical concepts in a Java application.

The Java code insourcethisfile belongs to the package


com.gluonhq.javaqc.ch02.hellostrange which is declared at the top of the file.

We rely on functionality provided by the Strange library, and we import the Java class that
provides the functionality we need:

import com.gluonhq.strange.algorithm.Classic

We will have a deeper look at this Classic class later. For now, we simply assume it provides
the functionality we need.

The name of this Java class is Main, as it has to match the name of the file.

In Java, entrypoints in files need to be declared with a method public static void
main(String[] args). Build tools like Gradle will invoke this method when asked to execute
an application.

When the main method is invoked, it will first print some information:

System.out.println("Using high-level Strange API to generate random bits");

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
24

System.out.println("----------------------------------------------------");

In the next line of code, we call a method on the Classic class, that is part of the Strange library
that we imported. The method we call is the Classic.randomBit() method, and it returns a
Java integer that either holds the value 0 or the value 1.

After the statement

int randomBit = Classic.randomBit();

the value of randomBit is thus 0 or 1.

NOTE The classname Classic indicates that Strange offers this class for classic
invocations. Code calling this class is not expected to contain any
quantum-specific implementations. However, the implementation of the
Classic class itself contains quantum implementations. Therefore, the
implementation of Classic.randomBit() is not simply returning a default Java
random bit, but it is using a quantum circuit to do so --- as we will show
later in this chapter.

In the next line, this value is printed. Note that when you execute the application, there is 50%
chance you will see a 0 printed, and 50% chance that you will see the 1 printed.

The Classic.randomBit() is a Java method that under the hood leverages quantum principles.
We will discuss the implementation later. For now, we assume that there is an equal change for
this method to return 0 and 1.

In order to demonstrate this, the next part in the Java source code will call this
Classic.randomBit() 10,000 times, and it will keep track on how many times a 0 is returned
and how many times a 1 is returned.

Two variables are introduced, for keeping track of this occurences:

int cntZero = 0;
int cntOne = 0;

Clearly, cntZero will hold the number of times the returned value is 0 where cntOne holds the
count for the calls that return 1.

We then create a loop which inner code calls the randomBit() method and increments the
appropriate variable. This is done in this code snippet:

for (int i = 0; i < 10000; i++) {


if (Classic.randomBit() > 0) {
cntOne ++;
} else {
cntZero ++;

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
25

}
}

Finally, the results are printed. Since the random values are truly random, the final results will
very likely be different every time you run the application. The sum of the cntOne and cntZero
values will always be 10,000 and it is expected that the cntZero and cntOne values both are in
the neighbourhood of 5000.

2.2.2 Java API’s versus implementations


If you are familiar with Java development, the code we have shown and used so far will be very
familiar. No specific knowledge on quantum physics or quantum computing has been required.
We only used the Classic.randomBit() method call, which is a method call similar to all other
Java method calls that you see in Java applications. Under the hood, however, the
Classic.randomBit() call is using either a Quantum Simulator or a real Quantum Computer.
The Java developer is not confronted with the implementation though, as one of the great things
about Java is that the implementation is typically hidden for developers, who program their
applications using API’s. In this case, Classic.randomBit() is an API that is called by the
developer.

Although Java developers don’t need to know the details about the underlying implementations,
it often helps to have at least some insight in those details. This is not only the case for
algorithms on Quantum Computing, it is applicable to many fields. While documentation (e.g.
JavaDoc) is typically very helpful for general cases, it might help to understand some of the
details if you want to keep track of performance, for example. In the case of Quantum
Computing, it is recommended for Java developers to at least have some basic knowledge about
the underlying implementation of the quantum API’s, as this provides useful information that can
be used to judge wether a quantum algorithm is applicable or not for a specific usecase, and what
the performance impact will be.

Also, without this basic knowledge, users might worry about the initial performance of some of
the algorithms. Indeed, if a quantum algorithm is executed on a Quantum Simulator, the
performance will probably be worse than if a classic algorithm was used. However, if the
quantum algorithm is well-written and if the problem is applicable for quantum speedup, the
performance will dramatically improve once real quantum hardware is used.

©Manning Publications Co. To comment go to liveBook


https://livebook.manning.com/#!/book/quantum-computing-for-developers/discussion
Random documents with unrelated
content Scribd suggests to you:
The colonel had said to himself that decadence would be better
borne in the solitude of this house peopled with the memories of his
grandfather. Thus he had reasoned.
Or at least that was the solution that Alfred Boyer had found in his
mind to the enigma presented by that character; and his own
constantly increasing cult for the marshal made him sympathize with
the homage rendered by abdication to that ruinous heritage. The
grandson felt the glory of the grandfather. That was enough to make
the enthusiastic compiler of the "Mémoires" feel himself in sympathy
with his taciturn patron, and on this occasion he felt keen pleasure
at seeing him enter the library. He would show him the proofs just
arrived by the courier. He welcomed the newcomer, and, handing to
him the proofs, he said:
"I was just going to ask you to receive me, Prince. Our first volume
is printed."
"I do not understand much about these things," replied the Prince of
Augsbourg, after having glanced at the bundle of proofs, "but all this
seems to me very good." He glanced through them again more
slowly, stopping at certain passages that he recognized, and, a detail
that Alfred was surprised to note, his face grew visibly more sombre.
This made his resemblance to his grandfather much more striking.
One would have said that to hold in his hand this book, which was,
in a measure, his production since he had kept the memorialist at
work at his own expense during the past two years, was more than
painful to him. At last he returned the sheets to the young man,
saying: "Yes, that is very good—but perhaps you will have to add
some notes to it. Yes," he continued after a moment's hesitation, "I
received a letter this morning informing me that certain documents
will be placed at my disposal. I shall have to go to Paris to fetch
them. I have come to ask you to accompany me—Thanks," he went
on as Alfred Boyer nodded assent, "I did not doubt that you would
be willing to come—" He hesitated again, then with an effort he
added: "Doubtless you have heard something about the Duchesse
d'Ivrea."
"The Duchesse d'Ivrea?" repeated the young man. "I thought that
title was one of those belonging to the Princess of Augsbourg."
"It is borne by the widow of my younger brother," interrupted the
colonel, who added in a singular tone: "You are right. All the titles of
the family should belong to the eldest, but my uncle was formerly
called the Duc d'Ivrea, and my brother naturally took the same title.
I am surprised at your not knowing this, after having been busy with
the marshal, as you have, for almost twenty months. It is true," and
a bitter smile curled his lips, "that, compared with him, we are
scarcely interesting. And then my brother and I had not visited each
other, and I do not know his wife. That is why I never mentioned her
to you. She is very ill, she informs me—given up by her physicians,
in fact. She wishes to deliver into my hands some family papers left
in her keeping by my brother. I can rely on you, then. The most
interesting part of them is a correspondence with Moreau during the
latter's sojourn in America. You know that the marshal made a
campaign with him in Holland. He foresaw his failure and wished to
prevent it. These letters were offered for sale some years ago. They
got them away from me because they were wealthier than I, but
now they wish to return them to me, and it is right that they should.
We should find a place for them in the second volume. That will
mean a great deal of revising, but it is worth the trouble. I shall
leave you now, as I have many orders to attend to. We shall start
this evening." ...
While making his preparations after this interview, Alfred Boyer could
not shake off an impression, that, vague as it was and without
foundation, seemed to him a certainty. This visit to his sister-in-law
was costing the Prince very dear. There was a mystery in their
relations, and a very painful one. Whence came this rupture, and
what were its causes, so profound that not the slightest mention of a
Duchess d'Ivrea had ever been made either by the Prince or by any
of his five daughters? Not one of them bore this name; they were
called simply the Frédets of Augsbourg. What had happened
between the two brothers? Had this rupture preceded the marriage?
Or had that event been the cause of it?
All these questions presented themselves to the young man's mind
without his having the faintest inkling as to their solution. During the
long months of his sojourn he had not established relations with any
one among the few country families in the neighborhood of Combes.
Moreover, he would have considered himself unworthy of the
confidence that his patron had shown him from the very first,
opening his archives to him, letting him live in complete intimacy
with his household, if he had made any inquiries about the Frédets.
From the moment that there was a question of some family secret,
to start a conversation on this subject with the old relative who
acted as housekeeper would have been as impossible as to try and
make one of the young girls talk about it. He knew no more of the
affair when the day after the conversation the Prince and he arrived
in Paris than he did on the preceding evening. During the journey he
had noted the increasing preoccupation of his companion, who,
when they reached the station, said to him: "I do not know as yet
where we shall put up. Let us take a cab and we will stop at some
lodging-house. I used to know a place in the Rue de Bourgogne, in
the neighborhood of the Chamber of Deputies. We will be near the
Rue de Grenelle, where our business is. The d'Ivrea house is the
same that the marshal lived in under the Empire."
"Next door to the house of the Duc de Feltré?" returned Alfred Boyer.
"It was only three days ago that I was transcribing the page on
which he relates their meeting on the sidewalk in front of their
houses on his return from Waterloo, and his refusal to return the
Duc's salutation. How finely the passage concludes: 'Perhaps it was
not just,' he writes, 'but at that time every French officer who had
not fought at Waterloo filled me with horror. I should add that if the
Duc de Feltré deserted us, at least it was not, as in so many other
cases, for money. He was my friend, and I attest that I have always
known him to be an upright man with clean hands.'
"Upright and with clean hands," repeated the Prince. "Yes, those
were his words; I recall them, too. That might have been his own
device, do you not think so? My brother repurchased the house," he
added after a pause. "I do not know how they have furnished it, but
the façade should not be changed. It is of the seventeenth century
and has the grand style of that period. You shall judge of it yourself
this afternoon, for I do not intend to remain here long. I count upon
going to the d'Ivrea house in this same cab as soon as we have
engaged our apartment in the Rue Bourgogne. You will not leave me
—I am not paying a visit to a relative. I have come here to obtain
some papers that belong to me by right as the senior. You have been
good enough to engage your services as historian for our family until
the end of the publication of the 'Mémoires.' Your place, then, is with
me."
They had taken their places in the carriage while the ex-colonel was
thus formulating the program of a proceeding made the more
mysterious by these words, and by the irrevocable determination
that they indicated.
During the three-quarters of an hour that it took them to reach the
Rue de Bourgogne, where the lodging-house stood, and then the
Rue de Grenelle, they were silent, the Prince absorbed in his
thoughts, and the young man out of respect for a sadness of which
he divined the cause, without being able to determine its precise
nature. The sadness was changed into an actual contraction of pain
when the carriage stopped in front of a high porte-cochère, above
which could be read this inscription, recently restored, as the
brilliancy of the lettering indicated: "Hôtel d'Ivrea." Alfred alighted
first and waited before the open door, ready to assist the Prince out
of the carriage. The latter did not move. This last effort was almost
intolerable to him.
"I thought at first I should send you in my place, my dear Boyer," he
said, finally deciding to alight, "but she would not receive you. It is
me that she wishes to see. She has adopted the only way, my
veneration for the marshal. Let us go in—but it is so hard!"
Never in all those weeks that they had lived almost constantly
together had he uttered such intimate sentiments to his companion.
His irritation, which he scarcely gave himself the trouble to conceal,
increased still more as they crossed the court at the back of which
rose the beautiful gray façade he had spoken of, with its high
windows and its ample mansard roof pierced with bull's-eyes.
Though Alfred Boyer was much moved by the family tragedy, of
which the Prince's attitude was an index, he could not but admire
the noble aspect of the structure in which the heroic Frédet had
thought to find rest. But if the exterior of the ancient house
harmonized with the legend of the hero, the interior offered a no
less striking contrast to it. The extraordinary excess of gaudy
upholstery, the multiplicity of trifling ornaments, and the total
absence of real works of art, the petty coquetry of the curtains,
everything from the very entrance stairs and the vestibule gave an
impression of false luxury and cheap imitation. The walls and ceiling
of the salon into which the two men were shown were draped with
blue satin, the assorted portières were held up by silver-fringed
curtain rings; double curtains of heavy silk and lace veiled the
windows. The sumptuous upholstering of the furniture utterly lacking
in taste, the overladen garnishment of the mantel capped the
climax, and made of this sumptuous apartment an almost
questionable place. It fairly reeked with orders from the fashionable
draper, of bank bills, and nothing showed personal taste. The
abundance of coronets scattered everywhere proclaimed the
parvenu. That the woman who ordered such furnishings for the
austere mansion should be the Duchesse d'Ivrea was one of those
paradoxes of fate that amuse only the unthinking. When one has
such a passionate adoration for a hero as the compiler of the
"Mémoires" had for the Duc d'Ivrea, such antitheses seemed to be a
profanation.
Alfred was not surprised, then, at the visible repugnance shown in
the face of the actual bearer of the name and arms of the Frédets
during the few moments passed in the salon while they were waiting
to be presented. The Prince had sent word by the servant that he
was there with the gentleman who had charge of the publication of
the marshal's papers.
As if turning his back on this cheap luxury, he had gone and leaned
against the window, from which his rude hand had roughly pushed
aside the flimsy curtains. He looked out on a narrow garden to which
the first shoots of spring were already giving a touch of green, and
which was vulgarized by a Japanese kiosk with colored windows.
When the servant returned to the room, Alfred could see that the
eyes of the sturdy hunter were suffused with tears.
"Well?" he demanded almost imperiously. "Madame la Duchesse is
awaiting Monsieur le Prince," was the reply, "but alone; she is too ill
this morning to receive two visitors."—"What did I tell you, Boyer!"
exclaimed the Prince, not caring whether or not he was heard by the
footman. "She wants me to come to pay her a visit, but I have not
come with any such intention, and I will not have it so. I came with
you to obtain the papers. Let her receive you or not in her bedroom,
that is of no importance. You are none the less here in the house,
and officially. Wait for me here then. It will not be long." Ten
minutes later the irascible nobleman appeared again, holding in his
hand a large sealed envelope, which he displayed, saying: "It is the
first restitution, and the most important for us: the correspondence
with Moreau."
And when they were again in the carriage, rolling toward the Rue
Bourgogne: "I must do her this justice," he continued, without giving
his sister-in-law her title, "she was quite correct. I found her in bed.
I had never seen her, as I have already told you. She has the
reputation of having been very beautiful, and she must have been.
Though she is worn by sickness, she still has fine features and
astonishing eyes. She is dying of cancer of the liver. She knows it;
she told me of it. She returned these papers to me very simply,
saying that on my next visit she would give me other documents,
which she says she must arrange. I am not her dupe; they are all
arranged. She wants to prove—though I have not the slightest idea
to whom—that the Frédet family recognizes her since the Prince of
Augsbourg goes to her house. But the matter is done with. I have
the packet necessary for our work. We can start back again for
Combes with our booty this evening or to-morrow, and though it is
to be regretted that some parts of it are lacking, still they are mere
trifles. But let us assure ourselves that we have not been cheated.
"There were thirty-seven letters, according to the catalog of the sale
at which they bought them. Good, here we are! we can go upstairs
and make sure that the number is correct. Will you take charge of
the matter and count them carefully? Thirty-seven—"
When they were both in the apartment, consisting of two little
communicating bedrooms, that had been reserved for them, Alfred
Boyer's first action was to open the envelope, which was fastened
with a seal bearing the escutcheon and device of the Frédets. His
historian's heart beat high as he saw that it was not merely a matter
of simple notes, but of long letters, some of which covered ten or a
dozen pages. He began to count them, drawing them out of the
envelope one by one.
He was unfolding the fifteenth when he noticed a smaller envelope,
that had been slipped into it. He took it out and read the direction:
"For the Prince of Augsbourg." The envelope had not been sealed.
He opened it mechanically, thinking that it had some connection with
the correspondence. In it was a sheet of paper, again with the crest
of the Frédets, on which he read with that swift look that takes in
ten lines at a glance:
"This is my will, which annuls all preceding ones. I constitute as my
sole legatee Monsieur Jules Frédet, Prince d'Augsbourg, under the
express condition that he shall personally conduct my funeral, that
he shall have my body as well as that of my husband deposited in
the tomb of the Frédet family, and that I appear as donor of the
letters to General Moreau in the forthcoming 'Mémoires' of the
marshal. If Monsieur Jules Frédet does not accept this legacy, my
will deposited at my notary's shall be valid in place of this. Given
under my hand"—here followed a date and beneath it the signature:
"Duchesse d'Ivrea."
"Is the count correct?" This question, snapped out by the Prince
through the open door from the end of the other room where he had
gone to dress, startled the young man. Surely he was quite innocent
of all design, and he had no sooner discovered the confidential
nature of the paper than he replaced it in its envelope. Nevertheless
he had discovered its contents, and it was with cheeks flaming like
those of a guilty man that he replied: "I do not know yet, but I have
just found this in the correspondence." He had on the tip of his
tongue the avowal of his involuntary indiscretion, but false shame
restrained him.
"An envelope?" said the Prince. "Addressed to me? It must be some
trick she has devised to get a letter to me. If it is a letter I shall tear
it up without reading it. Let me see"—he had advanced to the door
of the room and began reading aloud: "This is my—"
Paul Bourget
He stopped short. He had turned terribly pale. Alfred saw that his
hand clenched over the sheet as if to crush and tear it. Then, folding
the paper, he returned it to its envelope and placed it on the mantel
under a book, as if it were of no importance. He came back to the
door and looked at Alfred, who was already bent over his work,
prudently avoiding this look. He seemed to have a question on his
lips that he did not put into words. He had stopped while shaving to
call out his question. Without saying anything more he finished
shaving while Boyer continued to arrange the letters with hands
trembling with emotion, and the same emotion shook his voice as he
said, finally breaking the silence, when the work was done:
"The thirty-seven letters are here."
"They are all here, eh?" replied the Prince. He was so upset that he
did not notice the young man's embarrassment. "You need not begin
to examine them until to-morrow morning," he continued. "I give
you leave of absence for this afternoon. You have not been in Paris
for a long time, and you may have some friends that you wish to
look up here. You are at liberty for the rest of the day, but come
back at about six o'clock to see if I need you."
He had scarcely reached the sidewalk of the Rue de Bourgogne,
when the young man felt so strongly the pangs of remorse at not
having confessed his indiscretion that he stood still for several
minutes, asking himself whether he should not at once go upstairs
and tell the Prince that he had read the will. At the same time he
saw that, once in the Prince's presence, it would again be impossible
for him to confess.
Not that he feared reproaches for the act itself; he had only done as
he had been directed in ascertaining the contents of the envelope,
which, moreover, was open. His silence afterward was easily
explained by timidity. What now made the avowal so painful was the
knowledge that he had surprised the grandson of his hero in a
moment of mental anguish. The manner in which the Prince had
spoken of his sister-in-law, his attitude at the d'Ivrea house, his
gesture when he had taken up the envelope, his first words, then
the contraction of his hand over the paper—all these indications
combined to reveal an aversion which could not arise from a mere
family disagreement, such as is ordinarily dissolved by death, but
from a most intense, a most violent contempt. The silence
concerning her maintained by the family proved that the aversion
was not personal. Why? For what reason had all the elder branch
taken such a stand against the marriage of the head of the younger
branch? Alfred could no longer doubt that the Duchesse d'Ivrea
knew the disposition of her relatives toward her. The method she
had adopted to send her will to her brother-in-law sufficiently proved
that.
Then why did she make this will? Why should she leave this fortune
unreservedly to relatives for whom she ought to have a hatred equal
to their own?
Suddenly the terms of this will that he had scarcely looked at—but
how could he ever forget its smallest detail?—recurred to the young
man's mind. The funeral, conducted officially by the Prince, the place
in the family tomb at Père-Lachaise, the name in the "Mémoires" of
the marshal—it would be to acknowledge the relationship and the
marriage with the Duc d'Ivrea, giving a formal revocation to an
ostracism that, doubtless, had lasted many years and exasperated
her womanly pride. The Duchess had placed the bargain entirely in
the Prince's hands. The figure of the latter actually holding in his
hands the paper that formulated this bargain arose before Alfred's
mind with the clearness of a perfect image, and again he saw the
conflict of the three emotions which his face had expressed:
astonishment, anger, hesitation.
The Prince had hesitated. He hesitated still. Alfred, who had gone a
few steps in the direction of the Bourbon Palace, stopped a second
time to turn back to his lodgings. For a long time his eyes were
fastened on the windows of the second floor, behind which a drama
of conscience was being enacted of which he would soon know all
the details. As yet he could only see facts that were of too doubtful a
significance to enable him to form an opinion. "After all," said he,
shrugging his shoulders, "it is none of my business. It is for the
Prince to decide whether the motives of his antipathy toward his
sister-in-law are stronger than his desire to become rich. The
episode is worth my little trip to Paris; let us profit by it."
Ever since the now distant time when he had exiled himself in
Auvergne until his work should have been finished, in order not to
draw upon his savings, he had let slip the bonds of friendship that
had united him to many of his comrades in the École de Chartres.
Having no parents to visit, he began to think of them, moved
thereto, perhaps, by a last remark of his patron. All at once a face
and a name stood out in his memory with singular distinctness. Was
it not in this very quarter where he now was, in the Rue de
l'Université, that one of his most charming classmates lived,
Raymond de Contay? He was a young man of high birth, grandson
to the famous Duchesse de Contay, who was so well known for her
unbounded charity. After making an excellent record as student in
the same college with Alfred, and having no desire to be an idler, he
had enrolled himself in the École de Chartres. His intention had been
to devote himself to historical work.
If Alfred had probed his own motives he would have recognized the
fact that the sympathy he had formerly felt for this clever and
pleasing youth was not the real cause of the temptation that led him
irresistibly to go to his house this very morning in spite of the
unusual hour. It was nearly noon. "I hope I will find him." A thought
that was not inspired merely by a friendly feeling. The real cause
was that Raymond belonged to the most select class. To Alfred, who
had no idea of the air-tight partitions that divide the different circles
of the various nobilities, this meant that his comrade certainly knew
the Duchesse d'Ivrea, or had heard her spoken of by people who
knew her. If any one could give him exact information about her it
was Contay, and Alfred Boyer felt that he must have this information.
He hungered and thirsted for it, as much as if, instead of being the
simple posthumous secretary to the marshal Prince of Augsbourg,
the blood of this hero coursed in his own veins, and he had a right
to know who bore this title of d'Ivrea, won at the cannon's mouth on
the battlefield. Besides, the will stipulated that the Duchess should
figure in the "Mémoires" as the donor of the letters to Moreau, and
was not his own honor involved in these "Mémoires"? Had he not
devoted two precious years of his youth to them? Was he not ready
to devote a third, with this recompense as his supreme ambition,
that his name as a poor scribbler should one day be linked forever
with that of the mighty warrior of the "Grande Armée"? What if this
woman, however, who bought a place in the book with the gift of
her fortune, had made herself unworthy of the honor by some
infamous action? Was such a thing possible? No. The master of
Combes professed such a passionate reverence for his grandfather!
That her name should be cited in the "Mémoires," that the Prince
should conduct the funeral, that she should be given a place in the
tomb of the Frédets—never would he admit it, even for a moment,
and even at the price of millions, that these three things could be
granted to a person unworthy.
But the Prince had not destroyed the will—then he must have seen
some possibility of conforming to it! Yet his sadness and disgust, the
tone of voice in which he had spoken of her, as he put it, his first
movement, his subsequent silence—how were all these contradictory
indications to be reconciled? Alfred hastened his steps toward the
sole chance of learning the whole truth with a feverish impatience
that amounted almost to pain....
Raymond de Contay was at home getting ready to go out to lunch.
This was a relief to Boyer, who in his embarrassment suddenly
feared that it would look as if he had come, thus early, in order to be
asked to stay for luncheon. But his classmate's welcome was so
cordial that he had no scruples about suggesting that he should walk
with him. As he ascended Raymond's stairs he felt an almost painful
apprehension over the means he should employ in his quest. The
pretext was furnished to him by his friend, who, not content with
asking him about his work, wished to know how he had got along at
Combes. Boyer took occasion to sketch in a few words the
characters of the Prince, his five daughters, and the maiden aunt.
With a lump in his throat at the thought of what he might be about
to learn he continued: "This is all I have seen of the family. But there
is another branch, the younger, now represented by the Duchesse
d'Ivrea"—he looked for a sign of intelligence in his friend's face.
"Who is she?"—"The Duchesse d'Ivrea," replied Raymond. "I do not
know her."
"But she belongs to your world," said Alfred naively; then giving way
to the morbid curiosity that had been goading him on ever since he
had read the will, he added: "You surely must know some people
who know her. I can not explain the matter to you, but I have a
strong interest in knowing why she is at odds with her relatives. The
matter concerns the entire future of my work, perhaps. In fact, I ask
you as a great service—understand me, a very great service indeed
—to try to find out about her for me."
He spoke in so serious a tone, his face expressed so much anxiety,
that Raymond was deeply impressed. He thought that probably
these "Mémoires of Frédet" had started one of those disagreements
between relatives that sometimes prevent for many years the
publication of books of this sort.
"If you are so bent upon it," replied his comrade, "I shall try to find
out. I am lunching to-day with one of my cousins, who belongs to all
the clubs and has Paris at his fingers' ends. If your Duchesse d'Ivrea
broke with her family for any reasons that have been talked about,
my cousin will know them. I will drop you a line about it this
evening, but I do not promise you success. In any event, give me
your address."
Although this chance of seeing a little more clearly into the relations
that existed between the celebrated marshal's heirs was very
dubious, it was a chance, and for the time being the prospect
calmed the agitation into which the morning's episode had thrown
Boyer. He had a few errands to do relative to his work. He attended
to them all carefully, and about six o'clock he found himself at the
door of his lodgings in the Rue de Bourgogne. He asked if his patron
were in. On the concièrge's reply that the Prince had not gone out
during the afternoon, Alfred was again seized with the feverish
curiosity of the morning.
Raymond had left no letter for him, from which he concluded that
the inquiry of the cousin had been useless, and he ascended the
stairs a prey to an uneasiness that reached a climax when he found
himself face to face with the Prince. Evidently the unhappy man was
at the end of his mental resources. He paced to and fro from one
extremity to the other of the two narrow chambers like a wild beast
in a cage. The luncheon that he had ordered had not been touched
and was still on the table, and at the first glance Alfred could see
that the envelope that contained the will had not been moved from
its place. It still rested under the book on the marble mantel. It had
been beyond the Prince's strength even to touch it. Alas, the
temptation had begun to work in him. Alfred had proof of it
immediately in the words that were addressed to him as soon as he
appeared.
"I have had news from the Rue de Grenelle," said the Prince. "It
seems that she has had a severe attack since we left her, and almost
succumbed to it. The doctor is not sure that she will live through the
day. You see, we did well to come when we did for the letters to
Moreau. Apropos of these letters, perhaps it would be well to publish
them separately. We will talk it over. What I have been having a day-
dream about is a library made up of works concerning the men of
the First Empire who had relations with the Prince, all his papers well
classified, and all his memoirs, and all of this installed in the d'Ivrea
house where we were this morning. I can see the house now,
stripped of the tawdry gewgaws that spoil it, and restored to the
exact condition in which it was in the marshal's time. It would be
very easy—we have the inventories at Combes. I would like to make
it a museum to the glory of the "Grande Armée," with rooms
consecrated to all the companions in arms whom he loved—a Ney
room, a Masséna room, a Davoust room, a Macdonald room—what
do you say to this project, my dear Boyer, with you as perpetual
curator at some small emolument? Do not say no to it; you deserve
the place. Do you imagine that I do not know the difference
between purely mercenary work and that which you have devoted to
the "Mémoires"? But your devotion shall not be lost. It is a pity that
you could not be in Paris with your time your own, all your time, to
devote to some great historical work. You shall have it. It is also a
pity—do you not think so?—that so many objects of interest in the
history of the Empire should be hidden away at Combes and that no
one should know them? The portraits, for instance; they must be
brought here; they must be—and it is the same with my daughters. I
wish them to be here; I wish them to be married—well and happily
married." For a long time he continued in this vein without any
response from the young man. The Prince busied himself with the
future employment of the fortune that had suddenly fallen into his
possession, putting almost a kind of fever into his projects. He
reveled in anticipatory visions of the noble end to which he would
devote his wealth—always provided he accepted it, for his ardor in
justifying the acceptance in advance clearly proved that he had not
yet decided, as did also the painful hesitation in his voice, in his
gestures, in the sound of his footsteps on the floor, and still more in
his obstinacy in not returning to the house of his dying sister-in-law.
Against what idea was he struggling so violently? Against what
apprehension of remorse? Why did this flood of imaginative
confidences—since there was no question yet but of possibilities—
roll forth while the real confidence, that which concerned the will,
never appeared?
Alfred saw the whiteness of the envelope standing out against the
gray on the marble mantel, and as he listened his heart became
more oppressed with each new phrase, for each was a fresh sign
that the Prince considered the acceptance of the conditions
contained in that envelope as an indelicacy, worse than that, as a
crime. A crime? Against whom? Against whom, if not against this
ancestor? What image obsessed him, passing and repassing in all
these words? that of the marshal. It was as if by making promises to
that great figure he wished to disarm the anger of its shade, to
expiate in advance an outrage on its memory that he was about to
commit, that he had already committed in not at once spurning a
certain offer.
How long might this strange monologue have continued, in which
the grandson of the illustrious soldier concealed the fever of a
terrible indecision by thinking aloud before a witness whose
cognizance of the facts he did not suspect? Would Alfred Boyer have
given way to the passionate longing he felt to interrupt this half
confession with his own complete confession by crying out to the
Prince: "I have read the will!" Would he, on the other hand, have
continued to listen to this discourse, seeking to solve an enigma of
which the answer had not yet been given?
An incident he had not hoped for suddenly extricated him from his
uncertainty, all at once giving frightful distinctness to what had until
then been only a vague guess. The servant came to tell him that
Monsieur de Contay was waiting to see him.
"I got some information, as I thought I would, from my cousin," said
Raymond after the other had flown downstairs four steps at a time
in his haste to know. "I was not able to bring it to you before, and I
have only a minute." He pointed to the carriage which was waiting
for him in the street. "Here it is. The present Duchesse d'Ivrea has
never been received, either by the family or by any one else. She
was a fast woman, who had formerly been on the stage. She was
then called Leona d'Asti. After living a very gay life, she married an
old swindler on his deathbed, a confessed thief named Audry, who
left her a very large fortune. Once a widow, she married d'Ivrea, a
poor devil, who, it seems, had eaten and drunk up everything he
had—a most shameful union for one of his name. Now you know as
much as I do."...
Next morning, when the Prince of Augsbourg awoke from a sleep
broken by all the nightmares by which intense moral anguish
pursues us even in our rest, his first glance was toward the ill-fated
envelope that his fingers had not touched since he had placed it
under the book. Had he been dreaming? Had all the internal tempest
of which he had been the victim been a hallucination, a stroke of
madness? The envelope was not there. He jumped out of bed and
went to the mantel; he lifted up the book. Nothing! Immediately the
whole series of events came back to him. No; he had not been mad.
The scenes of the preceding day arose in his mind with a certainty
that left no room for doubt; his visit to his sister-in-law, his return to
his lodgings, Alfred Boyer handing to him the envelope and what
had followed, his afternoon spent in struggling against temptation,
Alfred's return, then his going out again, the note that the young
man had afterward sent him and in which he said that he would dine
out with a friend. The Prince had spent the evening alone, eating his
heart out over the evil action that had such a horrible attraction for
him. He had gone to bed early, without having been able to eat
anything, in order to try to forget this ill-fated will, to forget himself.
He had heard his neighbor come in about midnight—then all was a
blank. He had fallen asleep, and now this mystery, this envelope
missing. But how? Stolen—by whom?
He began to dress, a prey to the superstitious fear that sometimes
lays hold of the most energetic men in face of an absolutely
incomprehensible fact, and little by little his ideas began to
coordinate in his mind. Of the two doors of his chamber, one, that
which opened upon the stairs, was fastened with a bolt; he had
neglected to turn the key on that which led to Alfred Boyer's room.
The thief, then, must have come in by that door during his sleep. But
he had remained awake until the young man had come in. Suddenly
the Prince recalled the latter's face at the time of the discovery of
the will; how he had flushed and avoided his eyes. He remembered
also the expression on that transparent face while, late in the
afternoon, he had been developing those projects, all of which
presupposed a change in the condition of his fortune. As in a flash of
lightning the whole thing was clear to him. He sank half dressed
upon a chair. He sat there motionless, a prey to a tumult of so many
contradictory and violent emotions that his whole body trembled;
disillusionment as to this fortune, suddenly snatched away, if the
young man had actually destroyed the will; shame at having been
seen by him, tempted and giving way to the temptation, anger at
Alfred's audacity in having interfered, and by what right? Through
his veneration for the marshal's memory, remorse that this
veneration had been stronger in an outsider than in himself, and, in
spite of all, a sort of sorrowful joy at this deliverance, if the will no
longer really existed, with its shameful conditions, which were,
indeed, less shameful than the origin of ignoble money. Again the
d'Ivrea house rose before his mind's eye; he saw the great door
hung with black draperies, with his coat-of-arms, the bier upon
which that miserable creature, that public woman enriched by a
swindler, who had dishonored his brother, should lie, himself behind
her conducting this sinister mourning; and the tomb, the tomb!
Wildly, as the prisoner who escapes from his cell through broken
bars stained with his blood, but sustained, intoxicated by the
freedom of liberty, he burst into the room where Alfred sat at his
table. His bed had not been disturbed. He had not slept, and his pale
face, his burning eyes, betrayed in what agony he had spent the
sleepless hours. Ever since he had glided into the Prince's bedroom
to take the will and burn it he had been awaiting the terrible
moment when his patron should awake, determined this time not to
make any denial and to suffer the consequences of his act, whatever
they might be.
"Boyer," said the Prince, "when you gave me that envelope
yesterday, had you read the paper that it contained?"
"Yes," replied the young man.
"Did you know who the person was that wrote that paper?"
"I have learned since."
"And it was you who destroyed the will?"
"It was I."
"It was you!" cried the Prince; "you!" Then, bursting into sobs: "Let
me embrace you and thank you in his name!" and he pointed with
his hand to the thin sheets on the table in which was to be
recognized the proud, delicate writing of "Catinat of the Grande
Armée," of "the Black Lion," as the old soldiers of the First Empire
had called him to distinguish him from his brother in arms, Ney, "the
Red Lion." Tears streamed down his face, so like that of his glorious
ancestor, while he pressed Alfred to his breast, and both of them,
the old man and the young, felt that exquisite emotion that floods
our souls with melancholy and an almost supernatural serenity when
we have paid a sacred debt to the dead.
FOOTNOTES:
[14] "Demi-hipnose," writes Paul Bourget
WHEN HE WAS A LITTLE BOY
BY HENRI LÉON ÉMILE LAVEDAN

Henri Lavedan stands for the bright side of Parisian life of to-day
—for the witty dialogue and the delicate sentiment. He has
created a language of his own, sound, racy, with all the
abruptness and unexpected drollery of the boulevards.
He was born at Orléans in 1859, and began his literary career by
contributing to the journals satiric pictures of the manners and
customs of the Paris world. Those written between 1885 and
1892 form a series of chronicles, which he has gathered into
several volumes. Most of his works, however, are written for the
theatre. In 1899 he was elected a member of the Academy.
WHEN HE WAS A LITTLE BOY
BY HENRI LAVEDAN
Translated by Katharine Vincent.
Copyright, 1902, by The Current Literature Publishing Company.

Madame de Précy said to her husband: "You wish to know what is


the matter? Oh! I will tell you, if for a few moments you will
condescend to lend me your attention."
In an icy tone he answered: "I will not lend, I will give it to you."
"Well, then, the matter is"—and a trembling voice betrayed her
excitement—"that life with you has become unbearable and that I
have resolved no longer to try to endure it. You are, I admit, an
honorable man, and have, I believe, been a faithful husband. I, on
my side, have never forgotten my marriage vows. Here we stand on
the same ground. The trouble is that we are uncongenial. Everything
I do annoys you, and to me all your ways are insufferable. What I
say always vexes you, and your laugh drives me crazy. Even when
silent, we provoke each other. About the merest trifles we have
frightful scenes—about a hat, a dress, whether it will be best to
carry a cane or an umbrella, or whether the meat is overdone or not
—in short, everything—and everything makes us quarrel! Then, at
home, either you talk so much that I can not put in a word or else
you do not open your lips, and you look about as cheerful as a
mortuary chapel. I must be happy when you are happy, sad when
you are sad. Your temper is changeable, odd, quick; you do not
allow the slightest contradiction; if I begin to speak of something
which does not interest you, I am not allowed to finish my sentence.
For me to express an opinion suffices to make you take an opposite
view. You insist that you understand music, and that I know nothing
about politics, while, in point of fact, the contrary is the truth. You
scold my maid until she cries, and your disgusting valet drinks all the
wine in my cellar. You forbid me to smoke, and insist that my
dresses shall not be cut too low. And when we quarrel, even about
some very ordinary matter, instead of its being over in five minutes,
it lasts for hours, and we try to outdo each other in saying bitter
things which neither of us forgets. In short, everything about me is
disagreeable to you. I feel it, and I know it; you hate the tone of my
voice, the sound of my step, my gestures, even my clothes; do not
deny it, at this very moment I can read in your face that you would
like to pitch me out of the window.
"Therefore?" said Monsieur de Précy.
"Therefore I conclude that it is wiser for us not to prolong our
experience of married life. Its having proved a failure is neither your
fault nor mine, or rather it is the fault of both; at any rate it is a fact.
We were not made to live together; until we cease to do so, neither
of us will be happy. After all, there is nothing to prevent us from
amicably parting. Fortunately there is no child to quarrel about, we
have each an ample fortune, so I really can not see why we should
any longer remain on the same perch, pulling out each other's
feathers. As for me, I have had enough of it, and you have had too
much. I am quite sure you will be happy; sometimes in the morning,
while you are shaving, you will think of me; and for my part I shall
always remember you as a perfectly honorable, thoroughly
disagreeable man. But for that I bear you no ill-will, because it is in
your blood, all the Précys are so, and your own father and mother,
as you have often told me, could never contrive, for more than ten
days at a time, to remain together. However, I will waste no more
breath in talking about the matter, but will now, Monsieur, retire to
my own rooms, where until to-morrow I shall pass my time in
thinking over the most practical way in which to arrange our
separation."
Monsieur de Précy had in silence received this avalanche of
reproaches, but his lips twitched, once or twice he sighed, deeply
sighed, and toward the middle of the discourse he had begun to
pace the floor. When his wife ceased speaking he stopped before
her, and, looking at her with an expression which he strove to render
as dignified as possible, said in a sad, somewhat victimized, tone of
voice: "Have you finished?"—"I have finished, and it is
finished."—"So be it, my dear; the book is closed, and I, like you,
think it best not again to open it. As you wish it, we will to-morrow
separate and each try solitude."—"Oh, I permit you to enliven
it!"—"Thanks, and I forbid you to do so."—"Gracious! I do not dream
of such a thing. When I leave you, it is to become my own mistress,
not to change masters. You can be quite easy; to marry again would
be a folly I shall never commit. Have you anything more to
say?"—"No, except that if we take this step without knowing to what
it may lead...."—"Oh! I know. First to peace, then to old age, finally
to Père Lachaise."—"Do not joke, but please allow me to finish. We
will do as we wish, but it is not necessary that the world should be
at once enlightened as to our disagreements. That is my opinion,
and I think you will agree with me."—"I do not know, because, of
course, people can not long remain ignorant...."—"Yes, but for a
time. Later the same objections will not exist. In short, this is what I
ask: before taking any measures to obtain a divorce, let us by all
means separate, but under special conditions which will save
appearances, and excite no suspicions in the minds of our
friends."—"What, then, is your idea?"—"As you wish to leave to-
morrow, do so; but instead of taking refuge with some friend in the
country or abroad, as is probably your intention, go to Meneaux, my
château in Brittany, and as long as you can endure it—two months, if
you have the courage—remain there. Madame Bénard, my parents'
old housekeeper, who brought me up, is in charge. She will receive
you, and in every way look after your comfort. You can tell her that I
will soon join you."—"That, I imagine, will not be the truth."—"No,
but you had better say so. The house is well furnished, pretty, and
not more than four miles from Guérande. Under the pretext that
Brittany is too far away from Paris, you have always avoided setting
foot upon this family estate where my childhood was passed. This,
before we each go our own way in life, is a good opportunity to look
at it. If you let this chance escape, you will never have another. Now
can I count upon you? Do you consent?"—"You have made your
request with civility, and I consent. I will go to Meneaux, and will
remain there for two months. You may send a telegram to Madame
Bénard."
Then a few words more were exchanged with a coldness too intense
to be quite genuine.—"Thanks—good night—good-by!—yes, good-
by!"—Their voices did not tremble, oh no; but their hearts, their poor
hearts, ached! Each one privately thought: "What? Can it be true we
are to part—and forever? That is what we shall see, my wife! I'm not
quite sure about that, my husband!"
But, nevertheless, Madame de Précy the next day departed.

On a clear, fresh May morning the young woman arrived at


Meneaux. It is at the seaside, a delightful moment when spring, like
a tiny child on its uncertain legs, hesitatingly treads there. The
sparse, backward vegetation is more rugged than elsewhere; the
blue of the sky has a deeper tint, and in the salt air there is
something bracing and healthful which brings red to the cheek and
peace to the soul.
For Madame de Précy's occupation, Madame Bénard had prepared,
on the second floor, a large bedchamber, wainscoted in oak and
hung with old sulphur-colored damask, which on one side
overlooked a wide expanse of flat country, broken only here and
there by a rock or a thin cluster of reeds; and on the other a pine
wood ceaselessly murmuring in the breeze.
After she had emptied her trunks and made herself at home in her
room, Madame de Précy found plenty of time for reflection. Nature
offers to those who at a moral crisis fly to her, many consolations. By
a sort of reflex action, she deadens pain, soothes and cheers. Her
immutability, her apparent egotism, are good advisers. Before her
who does not pass away one learns to see that everything else will
do so, our little happinesses as well as our great sorrows; and the
order which in everything she observes incites us to order also our
hearts and minds. Madame de Précy began to think, and more
seriously than for many and many a long day before. She reviewed
her entire past life, beginning with the first white pages of cradle,
dolls, first communion, long skirts and balls, next turning to the
chapter of marriage. Her life had not been a romance, scarcely even
a story, but very ordinary, without great joys, great catastrophes, or
anything striking. Every night she had gone to bed with the secret
hope that the next day something might happen. During the nine
years of her married life, the sun had risen many times, but never
had anything happened. Little by little she and her husband had
become embittered, and perhaps he also, without being willing to
admit it, had suffered from that monotony to some beings so
irritating—monotony of things, hours, events, crimes, heroisms,
vices, seasons, rain, sun, admirations, and anticipations. Her
husband was not a man to be despised: cultivated, distinguished,
honorable, sometimes (only sometimes) tender-hearted—in fact,
admirable—yet impossible to live with. So, while deploring her fate,
in the bloom of youth finding herself thus alone and in a false
position, she did not, however, regret the impulse to which she had
yielded. She would not know happiness, but she could have peace.
One can not expect everything at once. Without feeling that her
dignity was compromised, she gladly accepted the society of
Madame Bénard, the old housekeeper in charge of the château, and
yet, as a rule, she was haughty. But Madame Bénard had brought up
Monsieur de Précy, and then the country equalizes; its solitude
brings together human beings, raising a little those who are below,
and lowering a little those who are above, so that Madame de Précy
and the good old lady—for a lady she really was—soon became
friends.
On the day Madame Bénard took Madame de Précy through the
château, she went first to a large room on the third story, and, as
she pushed open the door, said: "I want to begin by showing you
everything connected with Monsieur's childhood. This is the room
where Monsieur played and amused himself when he was a little
boy." Then she opened closets where lay balls, drums, trumpets,
boxes of tin soldiers, games of patience, checkers, and dominoes,
saying as one after another she fingered them: "These were
Monsieur's playthings when he was a little boy." And suddenly she
pulled from a heap a doll with a broken nose. "See, Madame! he
even had a doll, that boy; he called her Pochette, and when he
kissed her he used to say: 'She shall be my wife!' Was it not
ludicrous? Well, he would not say that now. He has something
better." Madame de Précy did not reply. The housekeeper
questioned: "It must agitate you to see all these things?"—"Yes,
Madame Bénard."
Then the old lady took her to see the room where Monsieur used to
sleep; sometimes forgetting herself, instead of Monsieur, she said
Louis; and Madame de Précy was strangely moved at hearing
pronounced by another that name she had so often called, but might
never say again. The room where her husband used to study was
next exhibited, with its shelves still filled by his old school-books and
copy-books. One of the latter was seized by Madame Bénard, who,
tendering it to Madame de Précy, cried: "See how well Monsieur
wrote when he was a little boy." And traced in large, uncertain
letters she read: "Let us love one another." Then she exclaimed: "I
should like to go out into the air; I do not feel quite well."
They went out of doors, and for some moments silently walked
about. When a large pond, on which floated two beautiful white
swans, was presently approached, Madame Bénard announced:
"Here is the pond where Monsieur kept his boat when he was a little
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