Book description
Ready to build quantum computing applications using Q# and the Microsoft Quantum Development Kit? This is the book for you. Q# is a domain-specific language for expressing quantum algorithms that combines familiar "classical" language constructs with quantum-specific ones. Ideal for any developer familiar with (or willing to learn) the basics of quantum computing and looking to get started with quantum programming, this pocket guide quickly helps you find syntax and usage information for unfamiliar aspects of Q#.
You'll explore the quantum software development lifecycle from implementing the program to running it on quantum simulators to testing and debugging it. You'll learn to use the tools provided by Microsoft's Quantum Development Kit for each step of the process.
You'll explore:
- Q# language details, including data types, statements, and operators
- Guidelines for organizing Q# code and invoking it from different environments
- Information on simulators and tools in the Microsoft Quantum Development Kit
- Advice on testing and debugging tools and techniques for quantum programs
Publisher resources
Table of contents
- Foreword
- Preface
- I. Q# Programming Language
- 1. Program Structure
- 2. Data Types
- 3. Expressions
-
4. Statements
- Example: Calculate Euler’s Totient Function
- Working with Variables
- Conditional Execution: if Statements
- Loops
- Call an Operation or a Function: Call Statements
- Stop Execution: return and fail Statements
- Example: Prepare a Quantum State
- Allocate Qubits: use and borrow Statements
- Quantum Conditional Loops: repeat-until Loops
- Conjugation: within-apply Statements
- Conclusion
- 5. Operations and Functions
- II. Using the Microsoft Quantum Development Kit
- 6. Running Q# Programs
-
7. Microsoft Quantum
Development Kit Libraries
- Getting and Using the Libraries
-
Standard Libraries
- Microsoft.Quantum.Core: Built-In Functions and Attributes
- Microsoft.Quantum.Convert: Data Type Conversions
- Microsoft.Quantum.Logical: Logical and Comparison Functions
- Microsoft.Quantum.Bitwise: Bitwise Functions
- Microsoft.Quantum.Math: Classical Math and Arithmetic
- Microsoft.Quantum.Random: Random Numbers and Probability Distributions
- Microsoft.Quantum.Arrays: Generic Array Manipulation
- Microsoft.Quantum.Intrinsic: Basic Quantum Gates and Measurements
- Microsoft.Quantum.Diagnostics: Testing and Troubleshooting Quantum Programs
- Microsoft.Quantum.Measurement: Additional Measurement Routines
- Microsoft.Quantum.Preparation: Quantum State Preparation
- Microsoft.Quantum.Arithmetic: Quantum Arithmetic
- Microsoft.Quantum.Canon: Catchall
- Advanced Libraries
- Conclusion
- 8. Testing and Debugging
- Index
- About the Author
Product information
- Title: Q# Pocket Guide
- Author(s):
- Release date: June 2022
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098108861
You might also like
article
Why the Power of Technology Rarely Goes to the People
Throughout history, the advantages and costs of technological innovations have been unevenly distributed between the powerful …
audiobook
The Year in Tech, 2025
<B>A year of HBR's essential thinking on tech—all in one place.</B><br/><br/><br/><br/>Generative AI, biometrics, spatial computing, electric …
article
Three Ways to Sell Value in B2B Markets
As customers face pressure to reduce costs while maintaining profitability, value-based selling (VBS) has become critical …
article
Communicate with Teams More Effectively
This selection of shortcuts will enable you to improve your communication, critical thinking, documentation, and networking …