For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books when ordered in quantity.
Manning Publications Co.
2022 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
Recognizing the importance of preserving what has been written, it is Mannings policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine.
front matter
preface
I started working on my PhD thesis in 1995 at Delft University of Technology in the Netherlands. My work was mainly focused on the acoustic wave equation, and I needed to combine theoretical models with experimental data, which, of course, required data processing and visualization. Around that same time, a new programming language named Java was unveiled. Several things made Java attractive for scientific work, including its portability to different platforms, which made it easy to create applications with a user interface and execute them on the various platforms I was working on.
However, it occurred to me that there was a large gap between the scientific world and the IT world. While researchers in science are typically trying to find answers to difficult questions, ITers are working on implementing the results of science and dealing with scalability, failover, code reuse, and functional or object-oriented development. Often, ideas and models created by scientists need to be implemented by ITers. Scientists should not worry about unit tests, while ITers should not have knowledge of the Standard Model of physics; but somehow, the handover between the two areas should be smooth.
I was privileged to be a frequent co-speaker with James Weaver, a long-time Java expert who became interested in quantum computing. Because of my background in science, he asked me to co-present on quantum computing.
If you need to do a presentation about something, it often helps if you know at least something about the subject. Even though I had worked on the acoustic wave equation, quantum computing was something different. Hence, I was forced to learn about quantum computing. The best way to learn something is to work with it; so, to understand quantum computing, I created a simulator of a quantum computer in Java, named Strange. Step by step, I added functionality to Strange, and by implementing it, I got a better idea of what quantum computing means for developers.
My general observation that scientists face different issues than developers turned out to be true for quantum computing. I believe that one of the significant challenges in quantum computing is finding ways for existing developers to use quantum computing without requiring them to understand the physics behind it. But it also works the other way: great algorithms that may lead to improvements in various areas often require a good understanding of modern IT development before they can be successful.
It is my belief that quantum computing can lead to major breakthroughs in several domains, including healthcare and security. With this book, I hope to explain to developers how you can benefit from quantum computing without having to become experts in quantum physics.
acknowledgments
Thank you to my family for their constant support and patience, which has provided me the opportunity to write this book.
Id like to thank my colleagues at Gluon for their support, especially in many technical ways. Likewise, the continuous support and encouragement from the Java and JavaFX communities has motivated me to make this a book that is useful to developers.
Many thanks to the entire Manning team who helped me realize this book. In particular, Id like to thank Mike Stephens, Andrew Waldron, Dustin Archibald, Alain Couniot, Jan Goyvaerts, and Candace Gillhoolley for your knowledge and guidance along the way. Thanks also to Tiffany Taylor, Keir Samson, Melody Dolab, Meredith Mix, and Andy Marinkovich for guiding the book through production and for your commitment to making the book the best it can be.
For obvious reasons, the past couple of years have been intense. We are certainly living in a strange time in which scientific work has become more relevant than ever. Studying quantum computing forced me to dive deep into the mysteries of nature. I am very grateful to all the scientists who are working to understand and explain the fundamental concepts of nature, so that hardware and software developers can work on concrete benefits based on those new insights.
To all the reviewers: Aleksandr Erofeev, Alessandro Campeis, Antonio Magnaghi, Ariel Gamino, Carlos Aya-Moreno, David Lindelof, Evan Wallace, Flavio Diez, Girish Ahankari, Greg Wright, Gustavo Filipe Ramos Gomes, Harro Lissenberg, Jean-Franois Morin, Jens Christian Bredahl Madsen, Kelum Prabath Senanayake, Ken W. Alger, Marcel van den Brink, Michael Wall, Nathan B Crocker, Patrick Regan, Potito Coluccelli, Rich Ward, Roberto Casadei, Satej Kumar Sahu, Vasile Boris, Vlad Navitski, William E. Wheeler, and William W. Fly, your suggestions helped make this a better book.
about this book
Most available resources about quantum computing are about either the mind-boggling physics that is used to enable quantum computing or the high-level consequences that can be expected when quantum computing becomes mainstream. In this book, we address the questions many developers ask: How will quantum computing affect my daily development, and how can I benefit from it? To answer this, we look at quantum computing from the perspective of a developer: we assume that hardware is or will be available (via native hardware or simulators), and we write code that is agnostic to marketing hype.