Book Image

Learn Q# Programming

By : Bhagvan Kommadi, Aneesh K Johny
Book Image

Learn Q# Programming

By: Bhagvan Kommadi, Aneesh K Johny

Overview of this book

<p>This book covers the fundamentals of quantum computing and programming with Microsoft’s Q# language. The reader will learn how to design, test and debug algorithms for different quantum applications.</p> <p>The primary focus of this book will be to give the audience an idea about how to get started with the concepts, different aspects, and theories of quantum computing operations, algorithms etc. Through this book, the developer will get a basic idea about the Microsoft Quantum Tool Kit and how to use the embedded Q# language. This will enable the reader to formalize and convert different real world problems to quantum algorithms and optimize them to use with a future quantum computer.</p> <p>By the end of the book, you would have successfully learned to create quantum programs of your own.</p>
Table of Contents (11 chapters)

Preface

Chapter 1, Fundamentals of Quantum Computing, this chapter will describe the historical timeline of quantum computing so that the reader will get a basic understanding of the concepts without any theoretical details. The concepts will be explained mathematically with code samples. Moving ahead, we will demonstrate the concept of Qubit, how to represent it in a mathematical way, and how to graphically represent a qubit. Briefly explain about different models and approaches that have been used.

Chapter 2, An Introduction to Q#, a detailed introduction of the Q# language and Microsoft Quantum Development Kit will be presented to the readers in this chapter. Language constructs and conventions will be explained in detail with code snippets. Different aspects, setting up Visual Studio for Q# and steps to be taken care of will be explained in this chapter.

Chapter 3, Building your first quantum program with Q#, this chapter will explain how to create quantum programs using the Q# libraries. A specific problem will be selected and it will be solved using the Q# language.

Chapter 4, Fundamentals of Qubit computation and representations, this chapter will describe the basic operations of qubits such as how to model a qubit and how to interpret qubit operations. Matrix algebra concepts such as vector and eigen matrix operations are presented in this chapter. Qubit computation, representations, and state notations will be explained with code samples.

Chapter 5, Abstract types, virtual functions, and operations using Q#, this chapter will deal with different abstract types, virtual functions, and operations using Q# language. The function templates and parameter types will be discussed in detail in this chapter. Different type models such as Primitives, arrays, tuple will be covered in this chapter.

Chapter 6, Microsoft Quantum Development Kit, there are many libraries available for different purposes in Q# language. This chapter will cover the main libraries available for programmers. Prelude which has Native .Net API and Canon estimation classes are the primary packages for Q# development. There are few other subject-specific libraries such as quantum analytics, error handling, quantum program utilities available in the Microsoft Development Kit.

Chapter 7, Quantum Algorithms, this chapter will explain the major quantum algorithms developed for different purposes. There are mainly four approaches in developing algorithms, Quantum Fourier Transform, Quantum walk, BQP, and classical hybrid. We will discuss all the main algorithms using these approaches and its mathematical formulation on this chapter and the code for a few of those algorithms in chapter 5.

Chapter 8, Generating quantum circuits with Q#, this chapter will explain the generation of quantum circuits and how to create a quantum circuit. It will explain about different quantum logic gates. This section will also describe about generally used quantum transformations and different quantum logic gates. Also, a brief explanation of different commonly used techniques like Grover and Shor algorithms will be explained.

Chapter 9, Quantum State Simulators, in this chapter, we will discuss about the basic C# classes, enums and functions used to create the Quantum Computer Trace Simulator. Classes, structs, and enums related to Quantum Chemistry are explained in detail.

Chapter 10, Q# Applications and Implementations, this chapter will describe how real world examples are solved using the Q# language and its libraries. Interesting quantum algorithms will be presented and explained in code using the Q# language. It will be an enriching experience for the readers as they will get a hands-on experience in quantum programming and it will enable them to further extend the knowledge acquired.