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:
<img width="874" alt="image" src="https://github.com/user-attachments/assets/f9db628d-59b3-4f5a-8b52-8e466bd1b69c" />
See the wiki page on [Testing Q Code in VS Code](https://github.com/microsoft/qsharp/wiki/Testing-Q%23-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:
<img width="835" alt="image" src="https://github.com/user-attachments/assets/c2060070-9628-4723-8750-bb9b62442755" />
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`:
<img width="835" alt="image" src="https://github.com/user-attachments/assets/d09d750b-ed50-4a79-b0b6-e6971574b88d" />
<img width="835" alt="image" src="https://github.com/user-attachments/assets/026f1aba-a043-46e4-82d6-223248dd10a0" />
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()`:
![image](https://github.com/user-attachments/assets/cf3c4da1-ed2c-494d-8c04-d2db8a57fccd)
For more information on using Q callables directly in Python, see the [Invoking Q Callables from Python ](https://github.com/microsoft/qsharp/wiki/Invoking-Q%23-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 **R**eset, **I**nteger computation, and **F**loating-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.
<img width="1018" alt="image" src="https://github.com/user-attachments/assets/35f92103-d0f9-4737-9d79-7d3d4244af36" />
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](https://github.com/qir-alliance/qir-spec/blob/main/specification/under_development/profiles/Adaptive_Profile.md#bullet-5-classical-computations) to the Adaptive profile for more details.
Other Notable Features and Fixes
* Fix `Relabel` for odd size arrays by swernli in https://github.com/microsoft/qsharp/pull/2082
* Syntax highlighting for functions, variables and numbers by Morcifer in https://github.com/microsoft/qsharp/pull/2088
* Fix `Exp` on qubit arrays larger than 2 with single `PauliI` by swernli in https://github.com/microsoft/qsharp/pull/2086
* Mutable variables in dynamic branches prevent full constant folding in partial evaluation by swernli in https://github.com/microsoft/qsharp/pull/2089
* Add `TestMatrix` functionality to qtest by sezna in https://github.com/microsoft/qsharp/pull/2037
* Added simple VQE sample by DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2073
* Fix global phase for controlled-T, R1 by swernli in https://github.com/microsoft/qsharp/pull/2112
* Fix widgets sometimes rendering in light theme when VS Code is in a dark theme by billti in https://github.com/microsoft/qsharp/pull/2120
* LookAheadDKRSAddLE now accepts carry-in by DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2119
* Add lint for double (in)equality by orpuente-MS in https://github.com/microsoft/qsharp/pull/2104
* Replaced custom ApplyAndAssuming0Target with AND from std by DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2123
* Fix language service panic when file isn't listed in the `files` field of `qsharp.json` by minestarks in https://github.com/microsoft/qsharp/pull/2109
* Long gate in ASCII art circuits - lengthen column width when necessary by Morcifer in https://github.com/microsoft/qsharp/pull/2126
* Fix UDT re-exports by sezna in https://github.com/microsoft/qsharp/pull/2137
New Contributors
* Morcifer made their first contribution in https://github.com/microsoft/qsharp/pull/2088
**Full Changelog**: https://github.com/microsoft/qsharp/compare/v1.12...v1.13