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)

Problem definition


The goal is to build a program to write a hello world message and show quantum superposition & entanglement scenarios. The first step is to start with a qubit in a basis state |0>. Operations are performed on the qubit and the result is measured.

Superposition is related to quantum mechanics concepts that allow quantum interference. It is a wave property which can be extrapolated to probability. Adding of two waves with amplitude and phase is called a superposition.  Two waves can be added and subtracted based on the phase. Quantum interference is caused when two quantum wave functions are added. Superpositions happen when quantum wave functions with complex coefficients are added. Superposition can be described as possibility of electron being at different position at the same time or different direction in spin.

Entanglement is a superposition of two or more particles. This represents a quantum state which consists of a special subset of all measurements of a particle...