Recent Releases of qsharp

qsharp - v1.20.0

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

QIR target profile selection redesign

In previous releases, the target QIR profile setting for code generation in VS Code was a global setting, and if switching between projects with different target profiles the user would need to remember to change the editor setting each time. This was cumbersome and a common source of confusion.

With this release, the target profile can be set per project. If working on a multi-file project with a qsharp.json manifest file, the target profile can be specified in the manifest file via the "targetProfile" property.

If working in a standalone Q# or OpenQASM file, the target profile can be specified via the @EntryPoint attribute in Q# files, or the qdk.qir.profile pragma in OpenQASM files. For example, to target a Q# file for base profile code generation:

qsharp @EntryPoint(Base) operation Main() : Result[] { // ... }

If submitting a job to the Azure Quantum service, upon submission the target profile will default to the capabilities of the target hardware if not otherwise specified.

See the QDK Profile Selection wiki page for more details and examples.

OpenQASM improvements

  • Arrays and complex numbers can now be passed as input and output.
  • Qubit aliases and array concatenation are now supported.
  • In VS Code, OpenQASM files now support:
    • Rename symbol (F2) for user-defined identifiers, gates, functions, etc; built-ins are not renameable.
    • Go to Definition (F12) and Find All References (Shift+F12).
  • The GitHub Copilot tools for the QDK now support OpenQASM (.qasm) files as well as Q#. You can simulate your program, generate a circuit diagram and generate resource estimates for Q# and OpenQASM programs right from the chat panel.

Python interop improvements

In addition to primitive types, arrays, and tuples, users can now pass Q# structs. For example, the following shows passing a python object to a Q# operation that takes struct:

Complex numbers are also supported, allowing the passing of Python complex literals and variables directly to Q# callables, e.g.

```python import qsharp

qsharp.eval(""" import Std.Math.Complex;

function SwapComponents(c: Complex) : Complex {
    new Complex { Real = c.Imag, Imag = c.Real }
}
""")

from qsharp.code import SwapComponents assert SwapComponents(2 + 3j) == 3 + 2j ```

For more details on Python and Q# interop see our wiki page.

Richer Copilot help for Q# APIs

In this release, we added a new Copilot tool that can access the documentation generated by all the APIs available in the current project (included the standard library and referenced libraries). This lets Copilot see up-to-date information on the Q# libraries available and how to use them, improving Copilot's working knowledge of Q#. From generated Q# snippets to answering questions about available APIs, Copilot can use this to provide more accurate and up-to-date information.

Language service improvements

Numerous improvements to the language service have been made for correctness and completeness, especially around import and export declarations. The language service now also provides better diagnostics for QIR generation errors. Please log issues if you encounter any problems!

Other notable changes

Full Changelog: v1.19.0...v1.20.0

- Rust
Published by billti 4 months ago

qsharp - v1.19.0

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 staticarrayexample(readonly array[int, 3, 4] a) { // The returned value for static arrays is const. const uint dim1 = sizeof(a, 0); const uint dim2 = sizeof(a, 1); }

def dynarrayexample(readonly array[int, #dim = 2] a) { // The 2nd argument is inferred to be 0 if missing. uint dim1 = sizeof(a); uint dim2 = 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

- Rust
Published by billti 5 months ago

qsharp - v1.18.0

What's Changed

  • Fix histogram escape key handling in VS Code extension by @copilot-swe-agent in https://github.com/microsoft/qsharp/pull/2468
  • Log token budget and usage for Copilot tools by @minestarks in https://github.com/microsoft/qsharp/pull/2466
  • Feedback for Kata "Deutsch-Jozsa and Bernstein-Vazirani Algorithms" by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2470
  • Support omitted start and stop in ranges by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2472
  • Added ApplyQPE and ApplyOperationPowerCA to Canon namespace by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2473
  • Properly expose project load errors in VS Code, improve error handling in WASM/JS by @minestarks in https://github.com/microsoft/qsharp/pull/2476
  • Fix bug in Controlled SX with empty controls by @swernli in https://github.com/microsoft/qsharp/pull/2507
  • Support Running Projects from Circuit Files by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2455
  • Simple Quantum Phase estimation sample via ApplyQPE (Base profile) by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2505
  • Display Error Message when Circuit is Unrenderable by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2461
  • Clarified search goal in the Grover sample comments by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2509
  • Add support for builtin functions by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2508
  • Prevent Stepping into Circuit Files during Debug by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2480
  • Add EC trait function to adjust code parameter after selection by @msoeken in https://github.com/microsoft/qsharp/pull/2516
  • Quantum Phase estimation sample via ApplyQPE by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2506
  • Circuit Editor Run Button by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2517
  • Implement error handling for invalid logical depth scaling by @msoeken in https://github.com/microsoft/qsharp/pull/2520
  • Implement builtin functions by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2521
  • Don't show code lenses for code with compilation errors by @copilot-swe-agent in https://github.com/microsoft/qsharp/pull/2511
  • Adding support for QASM 2.0 in the OpenQASM compiler by @idavis in https://github.com/microsoft/qsharp/pull/2527
  • Fix language service to use Unrestricted target profile as default for notebooks by @copilot-swe-agent in https://github.com/microsoft/qsharp/pull/2528
  • Remove implicit modifier handling during OpenQASM lowering by @idavis in https://github.com/microsoft/qsharp/pull/2529
  • Generic resource estimation using Python models by @msoeken in https://github.com/microsoft/qsharp/pull/2555
  • Update to latest sparse simulator by @swernli in https://github.com/microsoft/qsharp/pull/2558
  • Update version to 1.18 by @swernli in https://github.com/microsoft/qsharp/pull/2563

New Contributors

  • @copilot-swe-agent made their first contribution in https://github.com/microsoft/qsharp/pull/2468

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.17.0...v1.18.0

- Rust
Published by swernli 6 months ago

qsharp - v1.17.0

We are excited to announce the v1.17 release of the Azure Quantum Development Kit. Highlights of this release include:

OpenQASM support

We've added extensive support for the OpenQASM language. This provides editor support (syntax highlighting, intellisense, semantic errors), simulation, integration with Q#, and QIR code generation, amongst other features.

image

See the wiki page at https://github.com/microsoft/qsharp/wiki/OpenQASM for more details.

Copilot improvements

We've improved the GitHub Copilot integration with this release. See the details at https://github.com/microsoft/qsharp/wiki/Make-the-most-of-the-QDK-and-VS-Code-agent-mode

Circuit editor improvements

We have further improved the ability to edit circuit diagrams. See the detail at https://github.com/microsoft/qsharp/wiki/Circuit-Editor

What's Changed

  • Support intrinsic SX gate by @swernli in https://github.com/microsoft/qsharp/pull/2338
  • Revert "Revert "Fix out-of-memory in typeck on nested Ty::Arrow" (#2359)" by @swernli in https://github.com/microsoft/qsharp/pull/2362
  • Improved Drag and Drop by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2351
  • Broadcasting and slicing updates by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2326
  • Handle division by zero error in const evaluator by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2333
  • Support return values from custom intrinsics by @swernli in https://github.com/microsoft/qsharp/pull/2350
  • Add copilot-instructions.md for our repo by @minestarks in https://github.com/microsoft/qsharp/pull/2365
  • Fix panic when getting value from FunctorSet by @swernli in https://github.com/microsoft/qsharp/pull/2367
  • Added tuple unpacking samples by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2381
  • Add/Remove Qubit Lines through Drag-and-Drop by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2372
  • Setting up initial language service configuration. by @idavis in https://github.com/microsoft/qsharp/pull/2355
  • Unify std libs by @idavis in https://github.com/microsoft/qsharp/pull/2390
  • Update Known Q# Tests Cases on QIR Profile Change by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2373
  • Fix panic in QIR generation when conditional branches use early return by @swernli in https://github.com/microsoft/qsharp/pull/2388
  • Ignore Dependency Errors when Getting Documentation by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2374
  • Fix bug with Circuit CSS not being applied to notebooks by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2395
  • Bug bashing fixes for qasm support by @idavis in https://github.com/microsoft/qsharp/pull/2393
  • Don't use the start of the target as the provider id by @billti in https://github.com/microsoft/qsharp/pull/2396
  • Copilot tools for run, estimate, circuit by @minestarks in https://github.com/microsoft/qsharp/pull/2380
  • Remove cell language override by @idavis in https://github.com/microsoft/qsharp/pull/2399
  • Sanitize messages by @billti in https://github.com/microsoft/qsharp/pull/2401
  • Break on fail during debugging by @swernli in https://github.com/microsoft/qsharp/pull/2400
  • Added three OpenQASM samples by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2394
  • Add explicit cast support by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2377
  • Remove early return preventing panel from being made for empty circuit by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2402
  • Add reset broadcast by @idavis in https://github.com/microsoft/qsharp/pull/2404
  • Limit inferred type sizes by @swernli in https://github.com/microsoft/qsharp/pull/2382
  • Add measurement broadcast by @idavis in https://github.com/microsoft/qsharp/pull/2405
  • bitstring processing is more efficient by @idavis in https://github.com/microsoft/qsharp/pull/2408
  • Restore fancy error reporting in Python by @swernli in https://github.com/microsoft/qsharp/pull/2410
  • OpenQASM Grover's algorithm sample by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2398
  • OpenQASM Bernstein-Vazirani sample by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2403
  • Users/merlinbot/1es pt auto baselining pr by @idavis in https://github.com/microsoft/qsharp/pull/2371
  • Updates some of the CSS colors for Circuits by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2409
  • Fix miette dev-dependency in qsc_qasm by @swernli in https://github.com/microsoft/qsharp/pull/2415
  • Fewer redundant errors should propagate from a lowering error. by @idavis in https://github.com/microsoft/qsharp/pull/2417
  • Added OpenQASM samples as templates in VSCode by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2416
  • Ty names are now human readable for errors by @idavis in https://github.com/microsoft/qsharp/pull/2418
  • Fix end stmt spans for stop on failure by @idavis in https://github.com/microsoft/qsharp/pull/2420
  • show copilot instructions prompt at startup by @minestarks in https://github.com/microsoft/qsharp/pull/2361
  • Support Array Update Syntax by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2414
  • DumpOperation doesn't need its argument to have an adjoint by @swernli in https://github.com/microsoft/qsharp/pull/2421
  • Needless operation lint should ignore lambdas by @swernli in https://github.com/microsoft/qsharp/pull/2406
  • Drop ms.topic Metadata Field for all Non-Index Doc Files by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2422
  • Only surface Q# errors if there are no OpenQASM compilation errors by @idavis in https://github.com/microsoft/qsharp/pull/2427
  • Add unit tests for OpenQASM samples by @swernli in https://github.com/microsoft/qsharp/pull/2431
  • Remove old unused CLI tools by @swernli in https://github.com/microsoft/qsharp/pull/2428
  • Allow implicit cast to non-const in binary exprs. by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2430
  • Remove warnings and update module name. by @idavis in https://github.com/microsoft/qsharp/pull/2432
  • Add documentType to telemetry events by @minestarks in https://github.com/microsoft/qsharp/pull/2425
  • Added OpenQASM Ising sample by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2435
  • Adding copilot instructions by @idavis in https://github.com/microsoft/qsharp/pull/2436
  • Adds a python integration test for circuits by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2433
  • Fix explicit types in for loops by @swernli in https://github.com/microsoft/qsharp/pull/2440
  • Check that non-void functions always return by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2434
  • Dev settings by @billti in https://github.com/microsoft/qsharp/pull/2439
  • Added OpenQASM simple teleportation sample by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2441
  • Tools telemetry by @minestarks in https://github.com/microsoft/qsharp/pull/2429
  • Fix span for CannotCallNonFunction error by @idavis in https://github.com/microsoft/qsharp/pull/2443
  • Add sample notebooks by @idavis in https://github.com/microsoft/qsharp/pull/2437
  • Fix SSA Pass panic when propagating dynamic values through multiple branches by @swernli in https://github.com/microsoft/qsharp/pull/2447
  • Fix panic when passing wrong literal kind as modifier arg by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2446
  • Fix bit shifts with bit literals on lhs by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2450
  • Fix panic due to missing Unit value from assignment by @swernli in https://github.com/microsoft/qsharp/pull/2452
  • fix shl overflow panic and add lowerer_errors test by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2453
  • Create copilot-setup-steps.yml by @minestarks in https://github.com/microsoft/qsharp/pull/2445
  • Add gate to qasm tmLanguage file by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2459
  • Strengthen check for inference type loops by @swernli in https://github.com/microsoft/qsharp/pull/2448
  • make the lightbulb show up for 'qdk command error' by @minestarks in https://github.com/microsoft/qsharp/pull/2460
  • Generating files should be usable more often by @idavis in https://github.com/microsoft/qsharp/pull/2462
  • Added OpenQASM samples into the VSCode Playground by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2458
  • Allow to catch and propagate errors in all resource estimation models by @msoeken in https://github.com/microsoft/qsharp/pull/2457
  • Update version to 1.17 by @billti in https://github.com/microsoft/qsharp/pull/2464

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.16.0...v1.17.0

- Rust
Published by billti 7 months ago

qsharp - v1.16.0

We are excited to release v1.16 of the Quantum Development Kit. The big features of this release are:

Copilot integration

With VS Code Copilot integration you can now use Copilot to to assist with many tasks such as writing code, generating tests, connecting to an Azure Quantum workspace, submit jobs to run on hardware, and more!

image

See the wiki page at https://github.com/microsoft/qsharp/wiki/Make-the-best-of-Q%23-and-VS-Code-agent-mode for more info, as well as tips and best practices.

Circuit Editor

You can now add .qsc files to your project which provide a drag-and-drop circuit editor user interface to create quantum operations, which can then be called from your Q# code.

image

See the wiki page at https://github.com/microsoft/qsharp/wiki/Circuit-Editor for more details.

What's Changed

Other notable changes are listed below

  • Update chemistry test imports by @swernli in https://github.com/microsoft/qsharp/pull/2264
  • Update to Rust 1.86 by @swernli in https://github.com/microsoft/qsharp/pull/2279
  • Fixed message to display correct normalizing coefficient by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2280
  • Fix Test Explorer issues by @billti in https://github.com/microsoft/qsharp/pull/2291
  • Circuit Editor by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2238
  • Reimplement Parser by @idavis in https://github.com/microsoft/qsharp/pull/2149
  • Add lint groups to Q# by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2103
  • Fix run button disable. Switching to tutorial and back to samples (#1849) by @thecoder93 in https://github.com/microsoft/qsharp/pull/2206
  • Add better fuzzing compilation by @idavis in https://github.com/microsoft/qsharp/pull/2292
  • Added RoundHalfAwayFromZero to standard library by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2321
  • Added BigIntAsInt to Std.Convert by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2325
  • Added ApplyOperationPowerA to Std.Canon by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2324
  • Circuit Code Improvements by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2329
  • Use LaTeX fonts for math symbols in circuit diagrams by @billti in https://github.com/microsoft/qsharp/pull/2327
  • Addressed Kata feedback by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2337
  • Avoid changing layout if the panel is already visible by @billti in https://github.com/microsoft/qsharp/pull/2344
  • Add Python evaluation API by @idavis in https://github.com/microsoft/qsharp/pull/2345
  • Add "Update Copilot instructions" command by @minestarks in https://github.com/microsoft/qsharp/pull/2343
  • Fix paths to be relative and add single file sample by @billti in https://github.com/microsoft/qsharp/pull/2347
  • Add Ising model samples by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2342
  • Add GitHub Copilot tools for Azure Quantum by @minestarks in https://github.com/microsoft/qsharp/pull/2349

New Contributors

  • @absoludity made their first contribution in https://github.com/microsoft/qsharp/pull/2259
  • @thecoder93 made their first contribution in https://github.com/microsoft/qsharp/pull/2244

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.15.0...v1.16.0

- Rust
Published by billti 8 months ago

qsharp - v1.15.0

Notable Changes

New QuantumArithmetic library

This release is the first to add the QuantumArithmetic library by @fedimser to the list of suggested libraries! Check out more about the library at https://github.com/fedimser/quant-arith-re.

Measurement and qubit reuse decompositions handled in QIR generation

This change addresses a long-standing point of confusion regarding how programs compiled for QIR Base profile are displayed in places like the circuit visualizer. By delaying application of decompositions for deferred measurement and avoidance of qubit reuse to the QIR generation step, the stdlib implementation of measurement no longer needs to have a different implementation for Base profile vs other profiles. This should make the displayed circuits match the written code more often. See #2230 for more details.

Other Changes

  • Refactoring of chemistry library by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2208
  • Distance coefficient power parameter in QEC scheme by @msoeken in https://github.com/microsoft/qsharp/pull/2212
  • Fixed coefficients in qubit kata explanation. by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2225
  • Fix name resolution from a project's Main.qs by @swernli in https://github.com/microsoft/qsharp/pull/2217
  • Enums used with Qiskit can now be deep copied by @idavis in https://github.com/microsoft/qsharp/pull/2224
  • Change default font to system-ui by @billti in https://github.com/microsoft/qsharp/pull/2234
  • Removed usage of deprecated set keyword from the samples by @filipw in https://github.com/microsoft/qsharp/pull/2233
  • Update @vscode/extension-telemetry to 0.9.8 by @minestarks in https://github.com/microsoft/qsharp/pull/2235
  • Require ctrl key to zoom histogram by @billti in https://github.com/microsoft/qsharp/pull/2249
  • Use fresh env for qsharp.run with Python interop functions wrapping Q# operations by @swernli in https://github.com/microsoft/qsharp/pull/2255
  • Rework of simple samples by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2240

New Contributors

  • @fedimser made their first contribution in https://github.com/microsoft/qsharp/pull/2210

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.14.0...v1.15.0

- Rust
Published by swernli 9 months ago

qsharp - v1.14.0

Notable Changes

  • fix qsharp.init(project_root='.') by @minestarks in https://github.com/microsoft/qsharp/pull/2147
  • Relabel in adaptive conditional block should be disallowed by @swernli in https://github.com/microsoft/qsharp/pull/2155
  • add UDT to list of terms when processing reexport by @sezna in https://github.com/microsoft/qsharp/pull/2154
  • Chemistry library, SPSA sample, and notebook by @swernli in https://github.com/microsoft/qsharp/pull/2105
  • Update registry for chemistry by @billti in https://github.com/microsoft/qsharp/pull/2161
  • LS: Hide errors from github sources only when they're not associated with a real project by @minestarks in https://github.com/microsoft/qsharp/pull/2139
  • Update devcontainer to Ubuntu noble base image by @swernli in https://github.com/microsoft/qsharp/pull/2159
  • Fixes possible infinite loop in RE by @msoeken in https://github.com/microsoft/qsharp/pull/2128
  • Annotate conditional compilation for fixed_point so it compiles in all profiles by @sezna in https://github.com/microsoft/qsharp/pull/2156
  • Fix bug in Unselect operation when selecting a single bit string by @msoeken in https://github.com/microsoft/qsharp/pull/2181
  • Support code lenses on more callables by @swernli in https://github.com/microsoft/qsharp/pull/2174
  • Fix Circuit codelens by @swernli in https://github.com/microsoft/qsharp/pull/2192
  • Fix RCA panic on lambda with explicit return by @swernli in https://github.com/microsoft/qsharp/pull/2194
  • Fix Run and Debug buttons by @swernli in https://github.com/microsoft/qsharp/pull/2196
  • Uniform superposition preparation moved to std by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2195
  • Multi-target gate circuit art improvement by @Morcifer in https://github.com/microsoft/qsharp/pull/2185
  • Fix typo in code action by @cesarzc in https://github.com/microsoft/qsharp/pull/2197
  • Add Azure credits notification message. by @swernli in https://github.com/microsoft/qsharp/pull/2201
  • Chemistry lib: readablility, lints, syntax, tests by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/2202
  • Bump version for 1.14 by @billti in https://github.com/microsoft/qsharp/pull/2203

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.13...v1.14.0

- Rust
Published by billti 10 months ago

qsharp - v1.13

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:

image 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:

image 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: image image

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 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.

image

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 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

- Rust
Published by swernli 11 months ago

qsharp - v1.12

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: ```python 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: https://github.com/microsoft/qsharp/compare/v1.11.1...v1.12

- Rust
Published by swernli about 1 year ago

qsharp - v1.11.1

We are excited to release v1.11.1 of the Azure Quantum Development Kit! This month's release includes features and bug fixes, such as:

Configure Pauli Noise Dynamically within Q

You can now use the ConfigurePauliNoise function to dynamically update noise settings during simulation, allowing samples, exercises, or test code to directly set noise used in testing (https://github.com/microsoft/qsharp/pull/1997).

Stabilization of the Microsoft.Quantum.Unstable libraries

The Arithmetic, StatePreparation, and TableLookup libraries have been stabilized and are now available under Std. Several samples and libraries have been updated to reflect the new location, while the Microsoft.Quantum.Unstable namespace will be preserved for backward compatibility (https://github.com/microsoft/qsharp/pull/2022, https://github.com/microsoft/qsharp/pull/2043).

Support for Qiskit v1.3.0

Changes made to the Qiskit target class in v1.3.0 that broke interoperability with the qsharp Python package are now handled dynamically allowing use of both v1.2 and v1.3 versions of Qiskit (https://github.com/microsoft/qsharp/pull/2050).

Other Notable Changes

  • Add three qubit repetition sample to playground by @swernli in https://github.com/microsoft/qsharp/pull/2003
  • Add eval and cell events by @idavis in https://github.com/microsoft/qsharp/pull/2004
  • Avoid flooding iPython display by @swernli in https://github.com/microsoft/qsharp/pull/2006
  • Fix to RCA panic when mapping a tuple input pattern to a non-tuple expression by @cesarzc in https://github.com/microsoft/qsharp/pull/2011
  • Fix RCA panic by @orpuente-MS in https://github.com/microsoft/qsharp/pull/2017
  • Add class constraints for built-in classes by @sezna in https://github.com/microsoft/qsharp/pull/2007
  • Track qubit live-ness during simulation by @swernli in https://github.com/microsoft/qsharp/pull/2020
  • Add Qtest library that uses class constraints by @sezna in https://github.com/microsoft/qsharp/pull/2013
  • Include samples in completions when the document is empty by @minestarks in https://github.com/microsoft/qsharp/pull/2009
  • Remove Refs to Microsoft.Quantum in Libraries by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2041
  • Add custom operations sample by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1995
  • VS Code extension throws on launch if Q# notebook cell is open by @minestarks in https://github.com/microsoft/qsharp/pull/2044
  • Library for rotation operations by @msoeken in https://github.com/microsoft/qsharp/pull/2040
  • Remove Refs to Microsoft.Quantum in Samples and Katas by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/2030

New Contributors

  • @prkbuilds made their first contribution in https://github.com/microsoft/qsharp/pull/2024

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.10.1...v1.11.1

- Rust
Published by swernli about 1 year ago

qsharp - v1.10.1

We are excited to release v1.10 of the Azure Quantum Development Kit! This month's release includes several new features and improvements including:

Code editing improvements

Code editing is now greatly improved. A couple of examples of the many improvements:

  • Context aware completions (#1947) show only the relevant completions for the location. For example, only showing types when in a type position:

image

  • Namespace member (#1947) completion lists are now provided when drilling into namespaces:

image

  • User Defined Type (#1954) member completions are now populated

image

And much more! Parser error recovery has also been greatly improved so that editor assistance is available whilst mid-edit in many more scenarios.

Noisy simulation

You can now add Pauli noise to simulations run from Python or VS Code (#1971, #1975, #1980). This can help model the results of running on a real quantum machine for education purposes, and to help develop and test the effectiveness of error correction.

Below shows the results of configuring 5% bit-flip noise in VS Code and running a histogram on the GHZ sample. This would return only $\ket{000}$ and $\ket{111}$ shot results if run in a noise free simulation.

image

To see how to use noisy simulation in Python, check out the sample notebook at https://github.com/microsoft/qsharp/blob/main/samples/notebooks/noise.ipynb

Refreshed API docs interface

The in-editor Q# API documentation has had a UI refresh (#1978). This is accessed via the "Q#: Show API documentation" command in the command palette when editing a Q# file. The new UX allows you to quickly & easily search & navigate the APIs within your project, referenced projects, and the standard library.

image

File icons

The Q# file extension (.qs) now gets a unique icon in VS Code (#1976)

image

Custom measurements and resets

Previously you could define custom gates, but not custom measurement or reset operations. With #1967, #1981, and #1985 this is now possible. This allows for the definition and use of custom operations for quantum simulation and QIR code generation.

Samples for this feature will be added shortly, in the meantime see the test code at https://github.com/microsoft/qsharp/blob/v1.10.1/compiler/qsc/src/codegen/tests.rs#L529 for an example of how this may be used.

Python telemetry

In this release we have added telemetry to our qsharp Python package to collect minimal and anonymous metrics on feature usage and performance. This will allow us to focus our investments going forward on the most valuable areas. Please see the notes in the package readme for details on what is collected and how to disable it.

What's changed

And much more!! See the below list of changes in this release for the full details.

  • Added DoubleAsStringWithPrecision function - Multiple Katas by @devikamehra in https://github.com/microsoft/qsharp/pull/1897
  • bump @vscode/test-web by @minestarks in https://github.com/microsoft/qsharp/pull/1945
  • Refactor physical resource estimation by @msoeken in https://github.com/microsoft/qsharp/pull/1943
  • Update yarn dependencies by @billti in https://github.com/microsoft/qsharp/pull/1948
  • Update filtering for targets by @cesarzc in https://github.com/microsoft/qsharp/pull/1949
  • Add summary lines back into stdlib readmes by @sezna in https://github.com/microsoft/qsharp/pull/1952
  • add Q# package registry document by @sezna in https://github.com/microsoft/qsharp/pull/1932
  • Error budget pruning strategy in resource estimator core by @msoeken in https://github.com/microsoft/qsharp/pull/1951
  • Use all github dependencies in published libraries by @sezna in https://github.com/microsoft/qsharp/pull/1956
  • Set the markdown renderer on load by @billti in https://github.com/microsoft/qsharp/pull/1957
  • Bump pyo3 from 0.22.2 to 0.22.4 by @dependabot in https://github.com/microsoft/qsharp/pull/1964
  • Minor lint fix for Rust 1.81 by @swernli in https://github.com/microsoft/qsharp/pull/1965
  • Fix to partial evaluation generating branch instructions on constant conditions by @cesarzc in https://github.com/microsoft/qsharp/pull/1963
  • Show no quantum state when debugging code with no qubits by @swernli in https://github.com/microsoft/qsharp/pull/1953
  • More precise completions and namespace member completions by @minestarks in https://github.com/microsoft/qsharp/pull/1947
  • allow needless raw string hashes and unnecessary wraps by @sezna in https://github.com/microsoft/qsharp/pull/1969
  • UDT field completions by @minestarks in https://github.com/microsoft/qsharp/pull/1954
  • Rust 1.82 by @idavis in https://github.com/microsoft/qsharp/pull/1970
  • Added Pauli noise support to sparse simulator by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1971
  • Add custom measurement operations to Q# by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1967
  • Expose pauli noise settings in VS Code by @billti in https://github.com/microsoft/qsharp/pull/1975
  • Python clients can now run simulation with Pauli noise by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1974
  • Add .qs file icons by @billti in https://github.com/microsoft/qsharp/pull/1976
  • Fix py38 types by @billti in https://github.com/microsoft/qsharp/pull/1977
  • Python: Result should implement comparison operators by @minestarks in https://github.com/microsoft/qsharp/pull/1979
  • Improve the built-in API docs UX by @billti in https://github.com/microsoft/qsharp/pull/1978
  • Added sample notebook with noise by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1980
  • Add support for custom resets using the @Reset() attribute by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1981
  • Telementry event for noisy simulation by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1982
  • Unify implementations of custom measurements and custom resets by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1985
  • Initial Python telemetry by @billti in https://github.com/microsoft/qsharp/pull/1972
  • Fix Py3.8 type error by @billti in https://github.com/microsoft/qsharp/pull/1988
  • More parser error recovery, unlocking completions in more locations by @minestarks in https://github.com/microsoft/qsharp/pull/1987
  • DumpMachine output in Python and console should be empty with no qubits allocated by @swernli in https://github.com/microsoft/qsharp/pull/1984
  • DumpMachine in playground should display message when no qubits are allocated by @swernli in https://github.com/microsoft/qsharp/pull/1989
  • Disable completions in attribute arguments by @minestarks in https://github.com/microsoft/qsharp/pull/1986
  • Allow Default::default() pattern by @sezna in https://github.com/microsoft/qsharp/pull/1991
  • Add telemetry events for interop by @idavis in https://github.com/microsoft/qsharp/pull/1990
  • Bump version to 1.10 by @billti in https://github.com/microsoft/qsharp/pull/1992
  • Revert "Set min python version to 3.9 and add 3.12 to list" by @idavis in https://github.com/microsoft/qsharp/pull/1996
  • No completions in comments by @minestarks in https://github.com/microsoft/qsharp/pull/1999

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.9.0...v1.10.1

- Rust
Published by billti about 1 year ago

qsharp - v1.9.0

The 1.9.0 release of the QDK includes interoperability with Qiskit circuits built upon the core Q# compiler infrastructure.

The Qiskit interop provided by the QDK includes:

The Qiskit interop wiki page provides a brief overview of the integration while detailed examples, potential errors, and usage with parameterized circuits are demonstrated in the sample Qiskit interop notebook.

In addition to the Qiskit interop feature, the language service for Q# will now auto-suggest the new standard library API instead of the legacy Microsoft.Quantum-prefixed standard library API. For example, when typing DumpMachine, you'll now get a suggested import for Std.Diagnostics.DumpMachine instead of Microsoft.Quantum.Diagnostics.DumpMachine.

What's Changed

  • Remove benchmarking comment bot; Run benches weekly and save results as an artifact by @sezna in https://github.com/microsoft/qsharp/pull/1870
  • Port signed integer math to modern QDK by @sezna in https://github.com/microsoft/qsharp/pull/1841
  • Add samples of testing Q# code that prepares a quantum state by @tcNickolas in https://github.com/microsoft/qsharp/pull/1873
  • Simplify display of evaluation results in VS Code by @swernli in https://github.com/microsoft/qsharp/pull/1882
  • Bump rust dependency versions (except pyo3, rustc_hash, and miette) by @sezna in https://github.com/microsoft/qsharp/pull/1876
  • Update samples to reflect latest 1.7 changes; Update katas and stdlib to use structs by @sezna in https://github.com/microsoft/qsharp/pull/1797
  • Remove profile selection for Katas by @JPark1023 in https://github.com/microsoft/qsharp/pull/1881
  • Include CompareGTSI in the Signed math API by @sezna in https://github.com/microsoft/qsharp/pull/1888
  • Update Placeholder.qs by @HopeAnnihilator in https://github.com/microsoft/qsharp/pull/1890
  • Fix GetLink-Tutorial-Playground-state issue 1558 by @ggridin in https://github.com/microsoft/qsharp/pull/1855
  • update miette to v7.2.0 by @sezna in https://github.com/microsoft/qsharp/pull/1889
  • Update Node packages by @billti in https://github.com/microsoft/qsharp/pull/1894
  • Implements serialization for physical resource estimation by @msoeken in https://github.com/microsoft/qsharp/pull/1892
  • Update pyo3 from v0.20 to v0.22 by @sezna in https://github.com/microsoft/qsharp/pull/1893
  • Added DoubleAsStringWithPrecision function - Complex Arithmetics by @devikamehra in https://github.com/microsoft/qsharp/pull/1883
  • Added DoubleAsStringWithPrecision function - Single Qubit Gate by @devikamehra in https://github.com/microsoft/qsharp/pull/1884
  • Port fixed point library to modern QDK by @sezna in https://github.com/microsoft/qsharp/pull/1838
  • Katas UI review - Preparing states by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1847
  • Fix to RCA panic when original tuple binding is dynamic by @cesarzc in https://github.com/microsoft/qsharp/pull/1900
  • Generic code with code distance and threshold by @msoeken in https://github.com/microsoft/qsharp/pull/1896
  • Basic interop with Qiskit by @idavis in https://github.com/microsoft/qsharp/pull/1899
  • Use T gate time for physical factories by @msoeken in https://github.com/microsoft/qsharp/pull/1906
  • Add more items to RE system API by @msoeken in https://github.com/microsoft/qsharp/pull/1907
  • Configure ESRP@7 by @idavis in https://github.com/microsoft/qsharp/pull/1913
  • Basic samples for RE API by @msoeken in https://github.com/microsoft/qsharp/pull/1915
  • Introduce Relabel API by @swernli in https://github.com/microsoft/qsharp/pull/1905
  • Serialize logical post-layout overhead in resource estimation result by @msoeken in https://github.com/microsoft/qsharp/pull/1914
  • Support Adjoint of Relabel by @swernli in https://github.com/microsoft/qsharp/pull/1920
  • Migrate the standard library to the project system by @sezna in https://github.com/microsoft/qsharp/pull/1912
  • Bug fixes found during bash by @idavis in https://github.com/microsoft/qsharp/pull/1916
  • Fix typo in vscode extension's package.json by @m1c0l in https://github.com/microsoft/qsharp/pull/1917
  • Re-enable simulatable intrinsics for Qiskit/OpenQASM interop by @idavis in https://github.com/microsoft/qsharp/pull/1927
  • Add str value for TargetProfile by @idavis in https://github.com/microsoft/qsharp/pull/1930
  • Completions: existing glob import will prevent an exact import with t… by @minestarks in https://github.com/microsoft/qsharp/pull/1909
  • Playground: Fix error squiggle updates getting dropped by @minestarks in https://github.com/microsoft/qsharp/pull/1908
  • Add ProtocolSpecification to API by @msoeken in https://github.com/microsoft/qsharp/pull/1931
  • Migrate core library to the new Stdlib API/projects system by @sezna in https://github.com/microsoft/qsharp/pull/1919
  • Add from_str to TargetProfile by @idavis in https://github.com/microsoft/qsharp/pull/1937
  • Optimize RIR reindexing, QIR qubit use by @swernli in https://github.com/microsoft/qsharp/pull/1938
  • Update circuits widget sizing behavior by @swernli in https://github.com/microsoft/qsharp/pull/1921
  • Fix bug preventing display of circuits where same qubit measured more than once by @swernli in https://github.com/microsoft/qsharp/pull/1939
  • Fix python version compat signature by @idavis in https://github.com/microsoft/qsharp/pull/1941
  • Add DumpOperation support in Q# by @billti in https://github.com/microsoft/qsharp/pull/1885
  • Control how physical qubits are computed in factories by @msoeken in https://github.com/microsoft/qsharp/pull/1940
  • Update version to 1.9 by @idavis in https://github.com/microsoft/qsharp/pull/1942

New Contributors

  • @HopeAnnihilator made their first contribution in https://github.com/microsoft/qsharp/pull/1890
  • @m1c0l made their first contribution in https://github.com/microsoft/qsharp/pull/1917

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.8.0...v1.9.0

- Rust
Published by idavis over 1 year ago

qsharp - v1.8.0

The 1.8.0 release of the QDK includes a number of improvements and fixes, with a focus on refining the project references and editor completions experience.

The full list of changes is below.

What's Changed

  • Fix bug for maxtfactories constraint by @msoeken in https://github.com/microsoft/qsharp/pull/1792
  • Create Graph Coloring kata, part 1: vertex coloring problem by @tcNickolas in https://github.com/microsoft/qsharp/pull/1789
  • Katas UI string review - QRNG by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1759
  • Katas UI string review - Single-qubit gates by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1758
  • [Samples] Add samples for testing operations in Q# by @Manvi-Agrawal in https://github.com/microsoft/qsharp/pull/1732
  • Fix accumulating perf impact of qsharp.run with may shots in Python by @swernli in https://github.com/microsoft/qsharp/pull/1769
  • Avoid errors in read-only GitHub sources by @swernli in https://github.com/microsoft/qsharp/pull/1787
  • Support themes in kata previews by @billti in https://github.com/microsoft/qsharp/pull/1798
  • Fix unit tests on test_interperter doing startswith(...) != -1 by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1733
  • Migrate Graph Coloring kata, part 2 by @tcNickolas in https://github.com/microsoft/qsharp/pull/1804
  • Katas UI review - Complex arithmetic by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1803
  • Improve ApplyQFT API docs by @tcNickolas in https://github.com/microsoft/qsharp/pull/1810
  • Migrate QFT kata, part 1 by @tcNickolas in https://github.com/microsoft/qsharp/pull/1809
  • Migrate nonlocal games 1596 task1 - quantum by @ggridin in https://github.com/microsoft/qsharp/pull/1745
  • Implicit Namespace Parsing Recovery by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/1808
  • Organize standard library code; add files; add author and license by @sezna in https://github.com/microsoft/qsharp/pull/1801
  • Finish migration of QFT kata and publish it by @tcNickolas in https://github.com/microsoft/qsharp/pull/1814
  • Update rust version to 1.80 by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1805
  • Move Unstable into its own library by @sezna in https://github.com/microsoft/qsharp/pull/1802
  • Update rust version to 1.80 second step by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1806
  • QFT kata: fix formula formatting in square wave prep exercise by @tcNickolas in https://github.com/microsoft/qsharp/pull/1819
  • Migrate nonlocal games: GHZ game classical by @ggridin in https://github.com/microsoft/qsharp/pull/1783
  • Fixed some broken latex in the Measure doc by @ScottCarda-MS in https://github.com/microsoft/qsharp/pull/1825
  • Fix test for multiqubitmeasurements/state_modification by @tcNickolas in https://github.com/microsoft/qsharp/pull/1830
  • Allow the parser to add contextual help text to errors; Add contextual help text for parenthesized for loops by @sezna in https://github.com/microsoft/qsharp/pull/1828
  • Make entry sample more minimal by @Manvi-Agrawal in https://github.com/microsoft/qsharp/pull/1684
  • Enforce globally unique names for callables declared as SimulatableIntrinsic by @swernli in https://github.com/microsoft/qsharp/pull/1831
  • Start migration of Phase Estimation kata by @tcNickolas in https://github.com/microsoft/qsharp/pull/1824
  • Fix noisy_simulator panic when initializing with non-square Kraus matrices by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1826
  • Fix type inference for nested generics by @swernli in https://github.com/microsoft/qsharp/pull/1818
  • Export Stdlib AND by @sezna in https://github.com/microsoft/qsharp/pull/1834
  • Added a sample function with an implicit return by @filipw in https://github.com/microsoft/qsharp/pull/1811
  • Katas UI review - Multiqubit systems by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1813
  • Simplify targets logic and prepare exclusion list for next release by @cesarzc in https://github.com/microsoft/qsharp/pull/1815
  • Fix code example in RFrac doc comment by @swernli in https://github.com/microsoft/qsharp/pull/1839
  • Fix missing docs for diagnostic callables by @swernli in https://github.com/microsoft/qsharp/pull/1833
  • Add API to convert StateDump to a dense array of amplitudes by @swernli in https://github.com/microsoft/qsharp/pull/1836
  • Fix R1Frac doc comments by @swernli in https://github.com/microsoft/qsharp/pull/1851
  • Finish migration of QPE kata and publish it by @tcNickolas in https://github.com/microsoft/qsharp/pull/1837
  • Noisy simulator: return 2d python lists instead of 1d python lists by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1786
  • Fix duplicate imports being generated when using completions by @sezna in https://github.com/microsoft/qsharp/pull/1820
  • Support call tracking within Q# code by @swernli in https://github.com/microsoft/qsharp/pull/1791
  • Support qubit count tracking within Q# by @swernli in https://github.com/microsoft/qsharp/pull/1800
  • Update qsharp.json.schema to include latest lints by @sezna in https://github.com/microsoft/qsharp/pull/1853
  • Fix spans for lifted lambda idents by @swernli in https://github.com/microsoft/qsharp/pull/1854
  • Blocks in while-expr should enforce Unit type by @swernli in https://github.com/microsoft/qsharp/pull/1852
  • Katas UI review - QKD by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1846
  • Include completions for items from the same file; Clean up completions generation for callables by @sezna in https://github.com/microsoft/qsharp/pull/1863
  • Katas UI review - Multiqubit measurements by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1844
  • Added summary section in chemistry.py by @devikamehra in https://github.com/microsoft/qsharp/pull/1700
  • Fix type hints in python wrapper for noisy simulator. by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1857
  • Add samples of testing Q# code with classical return values by @tcNickolas in https://github.com/microsoft/qsharp/pull/1858
  • Add edit/run for kata examples - issue 591 by @ggridin in https://github.com/microsoft/qsharp/pull/1829
  • generate auto imports for core callables by @sezna in https://github.com/microsoft/qsharp/pull/1861
  • VSCode shows documentation by package by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1740
  • Skip errors on files with pr URI scheme by @swernli in https://github.com/microsoft/qsharp/pull/1867
  • Katas UI review - Multiqubit gates by @SoniaLopezBravo in https://github.com/microsoft/qsharp/pull/1845
  • Bump version to 1.8 by @billti in https://github.com/microsoft/qsharp/pull/1868

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.7.0...v1.8.0

- Rust
Published by billti over 1 year ago

qsharp - v1.7.0

QDK 1.7.0 release notes

The team is very excited to ship this release. It has some of the most significant improvements to the Q# language in a long time.

Major language changes

External project references

The biggest feature in this release is the ability to reference other projects and consume their APIs. The projects can be in a separate local directory or published to GitHub. As part of this change, we also introduced import and export syntax, and generate an implicit namespace hierarchy based on file layout, removing the need for the namespace syntax.

For more details see the wiki page at https://github.com/microsoft/qsharp/wiki/Q%23-External-Dependencies-(Libraries). (The official documentation will be updated shortly with more details and examples).

New struct syntax

We're also introducing a new struct syntax, and long term see this as the replacement for the current UDT syntax. The custom types created by either are largely compatible, but the new syntax is simpler, cleaner, and similar to several popular languages. See more details at https://github.com/microsoft/qsharp/wiki/Q%23-Structs until the official docs are updated.

Optional EntryPoint

As well as removing the need to wrap code in a namespace, we're also removing the need to specify the EntryPoint attribute. If you have one callable called Main in your project, this will be the default entry point. (Note: Any specified @EntryPoint will still take precedence).

A new standard library namespace

We've also simplified the namespaces for our standard library. What was previously all under Microsoft.Quantum can now be accessed under the Std namespace. This reduces visual clutter and highlights what APIs are part of the "standard" library included with Q#.

Example

Taken together the above provides for a much cleaner language with a simple code sharing mechanism. For example, if your project references another project named Sparkle which exports an operation named Correct that takes a custom type Input with a Double and a Qubit, your entire Q# code to call this can be as simple as:

```qsharp import Std.Diagnostics.DumpMachine; import Sparkle.Input, Sparkle.Correct;

operation Main() : Unit { use q = Qubit[1]; let x = new Input { A = 3.14, B = q[0] };

Correct(x);

DumpMachine();
MResetZ(q[0]);

} ```

(Note these changes are additional capabilities. There are no breaking changes or requirements to change code to adopt this release).

Other updates and improvements

Many other changes have gone into this release. Some of the main ones include:

  • Unitary Hack contributions
    • Save RE widget to .png (#1604)
    • Lint rule: Use Functions (#1579)
    • Add doc for internal AND (#1580)
  • New DrawRandomBool API (#1645)
  • New DoubleAsStringWithPrecision API (#1664)
  • Fix display of CCX in a circuit (#1685)
  • Completion list improvements (#1682, #1715)
  • New samples (e.g. #1721)
  • Many more Katas additions and updates
  • Various bug fixes and perf improvements
  • Lots of engineering improvements to build times, testing, pipelines, etc.

New Contributors

  • @nirajvenkat made their first contribution in https://github.com/microsoft/qsharp/pull/1604
  • @ggridin made their first contribution in https://github.com/microsoft/qsharp/pull/1674
  • @ausbin made their first contribution in https://github.com/microsoft/qsharp/pull/1685

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.6.0...v1.7.0

We hope you enjoy this release. Please log an issue if you need any assistance or to provide feedback. Thanks!

- Rust
Published by billti over 1 year ago

qsharp - v1.6.0

Welcome to the v1.6.0 release of the Azure Quantum Development Kit!

The big feature in this release is the ability to compile Q# programs to QIR that require "Adaptive Profile" capabilities. This enables programs to take advantage of the latest capabilities of quantum hardware, such as the ability to perform mid-circuit measurement of qubits, branch based on the results, and perform some classical computations at runtime. For more details, see https://aka.ms/qdk.qir.

We've added or updated a number of samples that can leverage Adaptive Profile capabilities, such as the Three Qubit Repetition Code and the Iterative Phase Estimation notebook. Please do try it out and give us your feedback!

As part of the above work, the previous code generation approach was replaced, even in the non-Adaptive ("base profile") case. Please log an issue if you see any unexpected change in behavior.

Other notable new features include Q# linting support in Jupyter Notebooks, CodeActions in VS Code to fix certain Q# errors, Q# library documentation inside VS Code, and more!

Impactful changes and fixes

  • Add linting support to notebooks (Closes #1277) by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1313
  • Use new QIR gen API for Base Profile by @idavis in https://github.com/microsoft/qsharp/pull/1400
  • Allow generating circuits for operations despite no entrypoint error by @minestarks in https://github.com/microsoft/qsharp/pull/1432
  • Fix lint message formatting by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1444
  • Change the default level of the DivisionByZero lint to "error" by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1445
  • Adding Adaptive RI profile by @idavis in https://github.com/microsoft/qsharp/pull/1451
  • Handle impossible factories in RE API by @msoeken in https://github.com/microsoft/qsharp/pull/1463
  • Fix global phase for PauliI rotation and DumpRegister by @swernli in https://github.com/microsoft/qsharp/pull/1461
  • Documentation in the VSCode - core, std, and current project by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1466
  • Three qubit repetition code sample works in Adaptive Profile by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1534
  • GHZ and CAT samples work in Adaptive and Base Profiles by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1532
  • Add messages to samples in /samples/language by @goshua13 in https://github.com/microsoft/qsharp/pull/1509
  • Make SpreadZ utility iterative instead of recursive by @swernli in https://github.com/microsoft/qsharp/pull/1545
  • Support target name in Python, remove Adaptive warnings by @swernli in https://github.com/microsoft/qsharp/pull/1549
  • Avoid panic from DumpRegister in circuit display by @swernli in https://github.com/microsoft/qsharp/pull/1554
  • Respect configured target profile for histogram in VS Code by @swernli in https://github.com/microsoft/qsharp/pull/1565
  • Update to Rust 1.78 by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1570
  • Respect target setting for "Estimate" command by @swernli in https://github.com/microsoft/qsharp/pull/1576
  • Add support for CodeActions in the Language Service by @orpuente-MS in https://github.com/microsoft/qsharp/pull/1495
  • Read correct field in QEC scheme by @msoeken in https://github.com/microsoft/qsharp/pull/1602
  • Fix panic when updating array with dynamic value by @swernli in https://github.com/microsoft/qsharp/pull/1606
  • Added dot product via iterative phase estimation sample by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1562
  • Reset zoom level when circuit window is resized by @minestarks in https://github.com/microsoft/qsharp/pull/1592
  • Fix normalization math in DumpRegister by @swernli in https://github.com/microsoft/qsharp/pull/1608
  • Adaptive quantum computing notebook samples by @cesarzc in https://github.com/microsoft/qsharp/pull/1614

New Contributors

  • @Piwakk made their first contribution in https://github.com/microsoft/qsharp/pull/1440
  • @goshua13 made their first contribution in https://github.com/microsoft/qsharp/pull/1447
  • @moumita-halder made their first contribution in https://github.com/microsoft/qsharp/pull/1489
  • @devikamehra made their first contribution in https://github.com/microsoft/qsharp/pull/1468
  • @viktorveis made their first contribution in https://github.com/microsoft/qsharp/pull/1568
  • @JPark1023 made their first contribution in https://github.com/microsoft/qsharp/pull/1518
  • @SoniaLopezBravo made their first contribution in https://github.com/microsoft/qsharp/pull/1512

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.4.0...v1.6.0

- Rust
Published by billti over 1 year ago

qsharp - v1.4.0

Welcome to the v1.4.0 release of the Azure Quantum Development Kit. The main highlights of this release are:

  • Circuit visualization by @minestarks in #1247, #1267 #1269, #1295, #1318, #1361, and more! See more details on this feature in the official docs, or in the repository wiki
  • Formatting improvements by @ScottCarda-MS in #1289, #1303, #1310, #1329
  • Update language service when manifest is saved by @orpuente-MS in #1366

Other notable fixes and improvements include:

  • Fix DumpMachine() output in VS Code debug console by @minestarks in https://github.com/microsoft/qsharp/pull/1299
  • Fix completion auto-open position in notebook cells by @minestarks in https://github.com/microsoft/qsharp/pull/1398
  • Update doc comments in std library by @DmitryVasilevsky in https://github.com/microsoft/qsharp/pull/1401

And lots of Katas updates! Including:

  • Add state flip task to Single-Qubit Gates kata by @WWhitedogi in https://github.com/microsoft/qsharp/pull/1343
  • Add tasks 1.8, 1.9, 1.10 to Superposition Kata by @jkingdon-ms in https://github.com/microsoft/qsharp/pull/1346
  • Add sign flip, basis change, amplitude change tasks to Single-Qubit Gates kata by @WWhitedogi in https://github.com/microsoft/qsharp/pull/1352
  • Add global phase -1, relative phase i, and complex relative phase tasks to Single-Qubit Gates kata by @WWhitedogi in https://github.com/microsoft/qsharp/pull/1369
  • Add tasks 1.11, 1.12 to Superposition Kata by @jkingdon-ms in https://github.com/microsoft/qsharp/pull/1381
  • Add task 2.1 to Superposition kata by @tcNickolas in https://github.com/microsoft/qsharp/pull/1395
  • Update READMEs to add details on building playground and katas by @Manvi-Agrawal in https://github.com/microsoft/qsharp/pull/1402
  • Add tasks on Bell states changes to Multi-Qubit States kata by @WWhitedogi in https://github.com/microsoft/qsharp/pull/1385
  • Add CZ section and CNOT and CZ tasks to Multi-Qubit Gates kata by @WWhitedogi in https://github.com/microsoft/qsharp/pull/1389
  • Adds task 1.13 to Superposition Kata by @frtibble in https://github.com/microsoft/qsharp/pull/1382

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.3.1...v1.4.0

- Rust
Published by billti over 1 year ago

qsharp - v1.3.1

Includes a fix for an issue rendering DumpMachine calls in VS Code.

See https://github.com/microsoft/qsharp/compare/v1.3.0...v1.3.1 for the change.

- Rust
Published by billti almost 2 years ago

qsharp - v1.3.0

Welcome to the v1.3.0 release of the Azure Quantum Development Kit. The main highlights of this release are:

  • Initial support for linting (#1140)
  • Document and selection formatting (#1172 and #1275)
  • Authenticate to Azure Quantum workspaces via a connection string (#1238)
  • Add a 'Create Q# project' command (#1286)
  • Significant performance improvements from using mimalloc (#1249)
  • More significant performance improvements via CFG usage (#1261)
  • Add Microsoft.Quantum.Measurement to the prelude (#1233)
  • Changes to the data returned by dump_machine and dump_operation (#1227)

And more! See https://github.com/microsoft/qsharp/compare/v1.2.0...v1.3.0 for the full list of changes.

- Rust
Published by billti almost 2 years ago

qsharp - v1.2.0

Welcome to the v1.2.0 release of the Azure Quantum Development Kit. The main highlights of this release are:

  • Added the DumpRegister API (#1173)
  • Added code distance to Resource Estimation tooltips (#1205)
  • Use optimized AND for decomposition (#1202)
  • Remove the "Message:" prefix from Message output by @colommar (#1175)
  • Generate Q# API docs for learn.microsoft.com (#1150)
  • Show codelens on entry point in VS Code to Run, Debug, Histogram, and Estimate (#1142)
  • Support generating QIR with custom intrinsics (#1141)
  • Fix hover info for lambdas passed to generic functions (#1161)
  • Fix panic on in-place update optimization (#1149)
  • Add boolean Xor API (#1100)

And much more! See https://github.com/microsoft/qsharp/compare/v1.1.3...v1.2.0 for the full change log.

- Rust
Published by billti almost 2 years ago

qsharp - v1.1.3

Welcome to the v1.1.3 release of the Azure Quantum Development Kit. This release is largely a bug fixing release of v1.1. Some notable changes include:

  • Use fixed seed for random circuit generation in resource estimation sample in https://github.com/microsoft/qsharp/pull/1097
  • Consolidate samples and run notebooks in build in https://github.com/microsoft/qsharp/pull/1070
  • Fix typos in Q# standard lib documentation by @filipw in https://github.com/microsoft/qsharp/pull/1101
  • Session now exits when there is a runtime failure when running without debugging in https://github.com/microsoft/qsharp/pull/1103
  • Pure state preparation added to unstable standard library in https://github.com/microsoft/qsharp/pull/1068
  • Use relevant icon for locals completion by @filipw in https://github.com/microsoft/qsharp/pull/1111
  • Prefer open file contents to disk contents in https://github.com/microsoft/qsharp/pull/1110
  • Fix BOM handling in Python in https://github.com/microsoft/qsharp/pull/1112
  • Update spans used for some type mismatch errors in https://github.com/microsoft/qsharp/pull/1098
  • Evaluator performance improvements in https://github.com/microsoft/qsharp/pull/1116
  • Fix state ordering in Python in https://github.com/microsoft/qsharp/pull/1122
  • Set notebook cell language back to Python if %%qsharp magic isn't there in https://github.com/microsoft/qsharp/pull/1118
  • Clarify instructions on running the playground in https://github.com/microsoft/qsharp/pull/1134
  • New factoring algorithm sample for resource estimation in https://github.com/microsoft/qsharp/pull/1058

Full Changelog: https://github.com/microsoft/qsharp/compare/v1.1.1...v1.1.3

- Rust
Published by swernli almost 2 years ago

qsharp - v1.1

Welcome to the v1.1 release of the Azure Quantum Development Kit. The main highlights of this release are:

  • Space-time scatter charts for resource estimation via #985
  • Additional samples targeted for use with resource estimation via #1019, #1033, and #1067
  • Changes to the order of bits in the |ket> representation via #1079
  • Highlighting of errors in cells in Jupyter Notebooks via #1071
  • New dump_operation API in Python via #1055
  • Added BoolArrayAsBigInt to the standard library via #1047 (thanks @filipw)
  • Added ability to set random seeds for quantum or classical simulation via #1053
  • Various other minor fixes and improvements

- Rust
Published by billti almost 2 years ago

qsharp - v1.0

Welcome to the v1.0 release of the Azure Quantum Development Kit. Being a version 1.0 release, this release includes all of our initial features, including:

  • VS Code extension for desktop and web
  • Rich Q# language service support
  • A Q# compiler and simulator
  • Vastly improved performance over the prior QDK
  • Q# debugging
  • The qsharp and qsharp-widgets Python packages.
  • Jupyter Notebook integration
  • Quantum Resource Estimation
  • Azure Quantum service integration

And more! See the release blog post for more details at https://devblogs.microsoft.com/qsharp/announcing-v1-0-of-the-azure-quantum-development-kit/

- Rust
Published by billti almost 2 years ago