Skip to content

v1.29.0

Latest

Choose a tag to compare

@billti billti released this 23 May 18:06
· 26 commits to main since this release
0ffa03c

QDK Learning experience

This release introduces a new learning experience that tightly integrates the QDK developer tools with GitHub Copilot.

With learning content now in the same rich environment used to develop quantum programs, backed by the latest AI models and editor integration from VS Code and GitHub Copilot, you can rapidly switch between learning, experimenting, and developing.

To get started, navigate to the new Microsoft Quantum icon on the activity bar (see next section), and click on Start learning. Copilot will then create a folder structure in your current workspace to track progress, bring up a list of lessons to work through, and help guide you through exercises, answer questions, or explore concepts further.

kata-sm2.mp4

If you need help getting GitHub Copilot configured in VS Code, see the docs at https://code.visualstudio.com/docs/copilot/setup.

This is a new feature and we will continue iterating on the experience. As always, if you have any suggestions or encounter any issues, please log them at https://github.com/microsoft/qdk/issues .

New Microsoft Quantum icon in the VS Code activity bar

In this release we have added a Microsoft Quantum area to the VS Code Activity Bar, identified by the Möbius strip icon. This area contains the new QDK Learning experience outlined above, and is the new home for the Quantum Workspaces container for connecting to Azure Quantum that previously lived in the Explorer view.

image

Deprecation of the qsharp Python package

With this release we have moved the Python implementation out of the qsharp package and into the qdk package, and marked the qsharp package as deprecated. If you import directly from the qsharp package in Python you will get a warning to use the qdk package and its submodules instead.

Besides the warning, there should be no change in functionality during the transition. We encourage you to update any code that imports directly from qsharp to use this new pattern, as the deprecated package will stop shipping in a future release.

Clifford simulation

When using the Python APIs qdk.qsharp.run or qdk.openqasm.run to run a quantum simulation, you may now pass a type="clifford" argument to indicate that the simulation should run on the Clifford simulator rather than the default sparse simulator.

Clifford simulation scales to a much higher number of qubits, but only supports a restricted set of quantum operations. See the page at https://learn.microsoft.com/en-us/azure/quantum/simulators-overview-qdk for more details.

Isolated Python context

Previously when evaluating or running Q# or QASM code in a Python environment, all interactions occurred in a single global interpreter. This reliance on global state was less than ideal for code that expected a clean environment. This release includes a new qdk.Context API to create a separate quantum interpreter from the global one. The returned context has an API similar to the top level API, e.g.

import qdk

ctx = qdk.Context()
ctx.eval("operation Main() : Result { use q = Qubit(); X(q); MResetZ(q) }")
assert ctx.run("Main()", 2) == [qdk.Result.One, qdk.Result.One]

See the PR at 3208 for more details.

Custom parameters for job submission via VS Code

The Python API to submit jobs to the Azure Quantum service has always had the ability to attach custom parameters with job submission. With this release, we've added the ability to set per-target custom parameters in VS Code, which will then be attached to any job submitted via the Quantum Workspaces tree view or GitHub Copilot tools.

See the PR at 3222 for more details.

Update Python API documentation

The Python API documentation has been cleaned up and refreshed for this release. The improvements should be noticeable both in the Python code editor via IntelliSense, as well as the online documentation at https://learn.microsoft.com/en-us/python/qdk/qdk

Other notable changes

New Contributors

Full Changelog: v1.28.0...v1.29.0