Chapter 7. Microsoft Quantum Development Kit Libraries
This chapter offers an overview of the Q# libraries shipped as part of the Microsoft Quantum Development Kit. These libraries include everything you need to write Q# programs, from the quantum gates and measurements built into the language to commonly used patterns and tools that help you write complicated high-level algorithms. I’ve mentioned several library functions and user-defined types in the previous chapters, but I’ve never talked about them in a systematic way; in this chapter, I’ll amend that.
The Q# libraries can be clustered in two groups: the standard libraries that provide shared functionality used in a lot of Q# code, and the domain-specific libraries that target solving very specialized problems in domains such as chemistry and machine learning.
This chapter starts with a quick overview of how you can get the standard and the advanced libraries, find information about them, and use them in your code.
After that, I review the functionality offered by the standard libraries, calling out some of the more frequently used operations and functions and providing examples. You can find more detailed code examples of using each library covered in this chapter in the supplemental materials repository.
Getting and Using the Libraries
The Q# libraries are distributed as NuGet packages via the NuGet package manager, similar to the libraries for .NET languages. The libraries are organized in namespaces, each including operations, ...
Get Q# Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.