We are excited to release v1.13 of the Azure Quantum Development Kit! Here are some highlights of features included in this month's release:
@Test
Attribute and VS Code Test Explorer Integration
#2095 Introduced a new attribute, @Test
, which identifies unit tests written in Q#. By integrating with the Text Explorer feature in VS Code, you can now explore, run, and review Q# unit test execution:
See the wiki page on Testing Q# Code in VS Code for more information.
"Q#: Add Project Reference" VS Code Command Enhancements
#2079 enhanced the VS Code command for adding references to a Q# project, available when editing a qsharp.json
file:
When invoking the command, you'll now see a choice to either import from GitHub or search the currently opened workspace for other Q# projects. When choosing GitHub, you'll get a suggestion of known libraries and their available versions to choose from, and the corresponding external project reference snippet will automatically be added to your current qsharp.json
:
More Python Interoperability for Callables
#2091 added more support for using Python functions that wrap Q# callables across our Python package APIs. This makes it easier to pass Python arguments into Q# for features like resource estimation with qsharp.estimate()
, running multiple shots with qsharp.run()
, compiling to QIR with qsharp.compile()
, or generating circuits with qsharp.circuit()
:
For more information on using Q# callables directly in Python, see the Invoking Q# Callables from Python wiki page.
Adaptive Profile Floating-Point Computation Extension
#2078 added support for an additional QIR Adaptive profile extension: floating-point computation. By choosing QIR Adaptive RIF
as your compilation profile, you can enable Reset, Integer computation, and Floating-point computation for code generation. This allows you to write programs where the values of variables with Q# type Double
can be dyanmically calculated from measurement results at runtime, and the output QIR will include arithmetic and comparison instructions corresponding to your code, enabling even more adaptive algorithms.
Note that this profile extension must be supported by the target backend or runtime environment for the resulting code to execute. See the QIR specification section on Classical Computation extensions to the Adaptive profile for more details.
Other Notable Features and Fixes
- Fix
Relabel
for odd size arrays by @swernli in #2082 - Syntax highlighting for functions, variables and numbers by @Morcifer in #2088
- Fix
Exp
on qubit arrays larger than 2 with singlePauliI
by @swernli in #2086 - Mutable variables in dynamic branches prevent full constant folding in partial evaluation by @swernli in #2089
- Add
TestMatrix
functionality to qtest by @sezna in #2037 - Added simple VQE sample by @DmitryVasilevsky in #2073
- Fix global phase for controlled-T, R1 by @swernli in #2112
- Fix widgets sometimes rendering in light theme when VS Code is in a dark theme by @billti in #2120
- LookAheadDKRSAddLE now accepts carry-in by @DmitryVasilevsky in #2119
- Add lint for double (in)equality by @orpuente-MS in #2104
- Replaced custom ApplyAndAssuming0Target with AND from std by @DmitryVasilevsky in #2123
- Fix language service panic when file isn't listed in the
files
field ofqsharp.json
by @minestarks in #2109 - Long gate in ASCII art circuits - lengthen column width when necessary by @Morcifer in #2126
- Fix UDT re-exports by @sezna in #2137
New Contributors
Full Changelog: v1.12...v1.13