Quantum Computing in Action

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Quantum computing is on the horizon and you can get started today! This practical, clear-spoken guide shows you don’t need a physics degree to write your first quantum software.

In
Quantum Computing in Action you will learn:

    An introduction to the core concepts of quantum computing
    Qubits and quantum gates
    Superposition, entanglement, and hybrid computing
    Quantum algorithms including Shor’s, Deutsch-jozsa, and Grover’s search

Quantum Computing in Action shows you how to leverage your existing Java skills into writing your first quantum software, so you’re ready for the quantum revolution. This book is focused on practical implementations of quantum computing algorithms—there’s no deep math or confusing theory. Using Strange, a Java-based quantum computer simulator, you’ll go hands-on with quantum computing’s core components including qubits and quantum gates.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Quantum computing promises unimaginably fast performance for tasks like encryption, scientific modeling, manufacturing logistics, financial modeling, and AI. Developers can explore quantum computing now using free simulators, and increasingly powerful true quantum systems are gradually becoming available for production use. This book gives you a head start on quantum computing by introducing core concepts, key algorithms, and the most beneficial use cases.

About the book
Quantum Computing in Action is a gentle introduction to the ideas and applications of quantum computing. After briefly reviewing the science that makes quantum tick, it guides you through practical implementations of quantum computing algorithms. You’ll write your first quantum code and explore qubits and quantum gates with the Java-based Strange quantum simulator. You’ll enjoy the interesting examples and insightful explanations as you create quantum algorithms using standard Java and your favorite IDE and build tools.

What's inside

    An introduction to the core concepts of quantum computing
    Qubits and quantum gates
    Superposition, entanglement, and hybrid computing
    Quantum algorithms including Shor’s, Deutsch-jozsa, and Grover’s search

About the reader
For Java developers. No advanced math knowledge required.

About the author
Johan Vos is a cofounder of Gluon, a Java technology company. He is a Java Champion and holds an MSc in Mining Engineering and a PhD in Applied Physics.

Table of Contents
PART 1 QUANTUM COMPUTING INTRODUCTION
1 Evolution, revolution, or hype?
2 “Hello World,” quantum computing style
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

Author(s): Johan Vos
Edition: 1
Publisher: Manning
Year: 2022

Language: English
Pages: 264
City: Shelter Island, NY
Tags: Quantum Computing; Quantum Algorithms

Front matter

preface

acknowledgments

about this book

about the author

about the cover illustration



Part 1. Quantum computing introduction

1 Evolution, revolution, or hype?

1.1 Expectation management

Hardware

Software

Algorithms

Why start with QC today?

1.2 The disruptive parts of QC: Getting closer to nature

Evolutions in classical computers

Revolution in quantum computers

Quantum physics

1.3 Hybrid computing

1.4 Abstracting software for quantum computers

1.5 From quantum to computing or from computing to quantum

2 “Hello World,” quantum computing style

2.1 Introducing Strange

2.2 Running a first demo with Strange

2.3 Inspecting the code for HelloStrange

The build procedures

The code

Java APIs vs. implementations

2.4 Obtaining and installing the Strange code

Downloading the code

A first look at the library

2.5 Next steps

3 Qubits and quantum gates: The basic units in quantum computing

3.1 Classic bit vs. qubit

3.2 Qubit notation

One qubit

Multiple qubits

3.3 Gates: Manipulating and measuring qubits

3.4 A first [quantum] gate: Pauli-X

3.5 Playing with qubits in Strange

The QuantumExecutionEnvironment interface

The Program class

Steps and gates

Results

3.6 Visualizing quantum circuits

Part 2. Fundamental concepts and how they relate to code

4 Superposition

4.1 What is superposition?

4.2 The state of a quantum system as a probability vector

4.3 Introducing matrix gate operations

The Pauli-X gate as a matrix

Applying the Pauli-X gate to a qubit in superposition

A matrix that works for all gates

4.4 The Hadamard gate: The gate to superposition

4.5 Java code using the Hadamard gate

5 Entanglement

5.1 Predicting heads or tails

5.2 Independent probabilities: The classic way

5.3 Independent probabilities: The quantum way

5.4 The physical concept of entanglement

5.5 A gate representation for quantum entanglement

Converting to probability vectors

CNot gate

5.6 Creating a Bell state: Dependent probabilities

5.7 Mary had a little qubit

6 Quantum networking: The basics

6.1 Topology of a quantum network

6.2 Obstacles to quantum networking

Classical networking in Java

No-cloning theorem

Physical limitations on transferring qubits

6.3 Pauli-Z gate and measurement

Pauli-Z gate

Measurements

6.4 Quantum teleportation

The goal of quantum teleportation

Part 1: Entanglement between Alice and Bob

Part 2: Alice’s operations

Part 3: Bob’s operations

Running the application

Quantum and classical communication

6.5 A quantum repeater

Part 3. Quantum algorithms and code

7 Our HelloWorld, explained

7.1 From hardware to high-level languages

7.2 Abstractions at different levels

7.3 Other languages for quantum computing simulators

Approaches

Resources for other languages

7.4 Strange: High-level and low-level approaches

Top-level API

Low-level APIs

When to use what

7.5 StrangeFX: A development tool

Visualization of circuits

Debugging Strange code

7.6 Creating your own circuits with Strange

Quantum arithmetic as an introduction to Shor’s algorithm

Adding two qubits

Quantum arithmetic with a carry bit

Next steps

7.7 Simulators, cloud services, and real hardware

8 Secure communication using quantum computing

8.1 The bootstrap problem

Issues with sending bits over a network

One-time pad to the rescue

Sharing a secret key

8.2 Quantum key distribution

8.3 Naive approach

8.4 Using superposition

Applying two Hadamard gates

Sending qubits in superposition

8.5 BB84

Confusing Eve

Bob is confused, too

Alice and Bob are talking

8.6 QKD in Java

The code

Running the application

9 Deutsch-Jozsa algorithm

9.1 When the solution is not the problem

9.2 Properties of functions

Constant and balanced functions

9.3 Reversible quantum gates

Experimental evidence

Mathematical proof

9.4 Defining an oracle

9.5 From functions to oracles

Constant functions

Balanced functions

9.6 Deutsch algorithm

9.7 Deutsch-Jozsa algorithm

9.8 Conclusion

10 Grover’s search algorithm

10.1 Do we need yet another search architecture?

Traditional search architecture

What is Grover’s search algorithm?

10.2 Classical search problems

General preparations

Searching the list

Searching using a function

10.3 Quantum search: Using Grover’s search algorithm

10.4 Probabilities and amplitudes

Probabilities

Amplitudes

10.5 The algorithm behind Grover’s search

Running the example code

Superposition

Quantum oracle

Grover diffusion operator: Increasing the probability

10.6 Conclusion

11 Shor’s algorithm

11.1 A quick example

11.2 The marketing hype

11.3 Classic factorization vs. quantum factorization

11.4 A multidisciplinary problem

11.5 Problem description

11.6 The rationale behind Shor’s algorithm

Periodic functions

Solving a different problem

Classic period finding

The post-processing step

11.7 The quantum-based implementation

11.8 Creating a periodic function using quantum gates

The flow and circuit

The steps

11.9 Calculating the periodicity

11.10 Implementation challenges

Appendix A. Getting started with Strange

Appendix B. Linear algebra

index