Skip to content

v1.12

Latest
Compare
Choose a tag to compare
@swernli swernli released this 20 Dec 20:46
· 1 commit to main since this release
939e2aa

We are excited to release v1.12 of the Azure Quantum Development Kit! Here are some highlights of features included in this month's release:

Python interoperability improvements

You can now import and invoke your Q# callables for simulation directly from Python as functions. Your callables defined in %%qsharp magic cells, through calls to qsharp.eval, or loaded from projects in qsharp.init can now be imported from the qsharp.code module:

import qsharp

qsharp.eval("""
    operation Superposition() : Result {
        use q = Qubit();
        H(q);
        Std.Diagnostics.DumpMachine();
        MResetZ(q)
    }
    """)

from qsharp.code import Superposition
result = Superposition()

For more details and current limitations, see Invoking Q# callables from Python in the wiki.

Syntax for capturing state dumps from DumpMachine or DumpRegister and operation matrices from DumpOperation calls in your Q# code has also been improved (see #2042)

Deprecation of set keyword

The set keyword used for updating mutable values is now deprecated, so where you previously had to use set x += 1 you can now just write x += 1. In addition, the compiler includes a new lint that defaults to "allow" that you can use to warn or error on usage of set in your code (see #2062).

ApplyUnitary operation for simulation

When running against the simulator, your Q# code can call ApplyUnitary and pass a unitary matrix represented by a Std.Math.Complex[][] along with an array of qubit targets and have the simulator directly apply that unitary to the current sparse state vector.

Increase minimum versions for Python and Ubuntu

Starting with v1.12, the minimum supported Python version for the qsharp package is Python 3.9. Along with this change, the minimum compatible version of Ubuntu has been increased to 22.04 (see #2061)

Full Changelog: v1.11.1...v1.12