Download Latest Version v1.19.0 source code.tar.gz (3.2 MB)
Email in envelope

Get an email when there's a new version of Azure Quantum Development Kit

Home / v1.19.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-07-25 7.1 kB
v1.19.0 source code.tar.gz 2025-07-25 3.2 MB
v1.19.0 source code.zip 2025-07-25 4.6 MB
Totals: 3 Items   7.8 MB 6

Below are some of the highlights for the 1.19 release of the QDK.

Simulating qubit loss

Simulation in the QDK can now model qubit loss, which can occur with some probability on some modalities.

For simulations run directly in VS Code, such as using the 'Histogram' CodeLens, this can be controlled via a VS Code setting. The screenshot below shows setting qubit loss to 0.5% and running a Bell pair simulation. For convenience, the VS Code setting is easily accessible from a link on the histogram window (shown in a red circle below).

image

The qubit loss probability can also be specified if running a simulation via the Python API.

:::python
result = qsharp.run("BellPair()", 100, qubit_loss=0.5)
display(qsharp_widgets.Histogram(result))

There is also a new Q# API for detecting a loss result:

:::qsharp
operation CheckForLoss() : Unit {
    use q = Qubit();
    H(q);
    let res = MResetZ(q);
    if IsLossResult(res) {
        // Handle qubit loss here
    } else {
        // Handle Zero or One result
    }
}

You can find more details in the sample Jupyter Notebook at https://github.com/microsoft/qsharp/blob/main/samples/notebooks/noise.ipynb.

Debugger improvements

When debugging, previously if you navigated up the call stack using the area circled below, the Locals view would not change context to reflect the state of the variables in the selected stack frame. This has now been implemented.

image

Call stacks reported when a runtime error occurs now also show the source location for each frame in the call stack.

OpenQASM improvements

We have continued to improve support for OpenQASM. For example, you can now use readonly arrays as arguments to subroutines and the builtin sizeof function, which allows you to query the size of arrays.

:::qasm
def static_array_example(readonly array[int, 3, 4] a) {
    // The returned value for static arrays is const.
    const uint dim_1 = sizeof(a, 0);
    const uint dim_2 = sizeof(a, 1);
}

def dyn_array_example(readonly array[int, #dim = 2] a) {
    // The 2nd argument is inferred to be 0 if missing.
    uint dim_1 = sizeof(a);
    uint dim_2 = sizeof(a, 1);
}

This release also adds many other built-in functions, as well as pragmas to specify the semantics and code generation for box statements.

For more examples of the OpenQASM support see the samples at https://github.com/microsoft/qsharp/tree/main/samples/OpenQASM or the Jupyter Notebook at https://github.com/microsoft/qsharp/blob/main/samples/notebooks/openqasm.ipynb.

Test improvements

A challenge when writing tests for code intended to run on hardware was that the test code would also be restricted to what could run on hardware. For example, if the target profile is set to base then mid-circuit measurements and result comparisons are not possible, which limits the validation a test can do. Trying to verify a measurement result in a test would previously result in errors such as using a bool value that depends on a measurement result is not supported by the configured target profile.

In this release we have relaxed the checks performed on code marked with the @Test attribute, so such code is valid regardless of the target hardware profile:

image

Azure Quantum job reporting

When submitting jobs to Azure using the VS Code "Quantum Workspaces" explorer view, previously jobs would use the v1 reporting format, which does not include details for each shot's results. The default format for job submission in this release is now v2, which includes the results of each shot.

We also added an additional icon beside successfully completed jobs so the results may be shown as a histogram or as the raw text. The below screenshot shows fetching both formats from a completed job.

image

Other notable changes

Full Changelog: v1.18.0...v1.19.0

Source: README.md, updated 2025-07-25