As you may know from the announcement on this blog (or from the image in the sidebar…), I wrote a quantum computing book titled “Introduction to Quantum Computing with Q# and QDK” which was published by Springer in May 2022. The source code samples used in the book were written against version 0.21.2112180703 of the QDK and the Q# language, which had been released on 14th December 2021. The code also works fine with all the newer versions of QDK lower than 1.0 - the last pre-1.0 release being 0.28.302812, from 15 September 2023.
Earlier this month, Microsoft announced the release of QDK 1.0, which brings in a big overhaul of the entire QDK ecosystem, as well as the Q# language itself. As a consequence, it also contains numerous breaking changes and feature gaps in the libraries and in the language itself.
As part of my commitment to keeping the samples used in the book up-to-date, I would like to share the updated samples.
QDK 1.0-compatible code samples 🔗
Today I have published (almost) all samples used in the book, ported to QDK-1.0. The code samples ported to that release can be found on the qdk-1.0 branch in the book source code repository.
The repository also contains a set of new information:
- compatibility notes for the book’s source code
- a tabular summary of all samples, including links to QDK 0.2x and QDK 1.x versions
- and a migration guide explaining the breaking changes that one might encounter when using the code from the book with QDK 1.0
This is a living document and I expect further changes to be made as QDK 1.0 continues to evolve and matures - because despite the fact that it has a version 1.0, it still has some feature gaps compared to the old one.
To my knowledge, this is the most comprehensive set of quantum computing QDK 1.0 samples outside of Microsoft’s official sources. I am also working together with the Q# team to bridge the gap between the old and the new QDK, by submitting pull requests and other feedback to the official Q#/QDK repository.
Thank you for all your feedback and support, and happy Q#-ing!