Releases: microsoft/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 max_t_factories constraint by @msoeken in #1792
- Create Graph Coloring kata, part 1: vertex coloring problem by @tcNickolas in #1789
- Katas UI string review - QRNG by @SoniaLopezBravo in #1759
- Katas UI string review - Single-qubit gates by @SoniaLopezBravo in #1758
- [Samples] Add samples for testing operations in Q# by @Manvi-Agrawal in #1732
- Fix accumulating perf impact of
qsharp.run
with may shots in Python by @swernli in #1769 - Avoid errors in read-only GitHub sources by @swernli in #1787
- Support themes in kata previews by @billti in #1798
- Fix unit tests on test_interperter doing
startswith(...) != -1
by @orpuente-MS in #1733 - Migrate Graph Coloring kata, part 2 by @tcNickolas in #1804
- Katas UI review - Complex arithmetic by @SoniaLopezBravo in #1803
- Improve ApplyQFT API docs by @tcNickolas in #1810
- Migrate QFT kata, part 1 by @tcNickolas in #1809
- Migrate nonlocal games 1596 task1 - quantum by @ggridin in #1745
- Implicit Namespace Parsing Recovery by @ScottCarda-MS in #1808
- Organize standard library code; add
files
; add author and license by @sezna in #1801 - Finish migration of QFT kata and publish it by @tcNickolas in #1814
- Update rust version to 1.80 by @orpuente-MS in #1805
- Move
Unstable
into its own library by @sezna in #1802 - Update rust version to 1.80 second step by @orpuente-MS in #1806
- QFT kata: fix formula formatting in square wave prep exercise by @tcNickolas in #1819
- Migrate nonlocal games: GHZ game classical by @ggridin in #1783
- Fixed some broken latex in the Measure doc by @ScottCarda-MS in #1825
- Fix test for multi_qubit_measurements/state_modification by @tcNickolas in #1830
- Allow the parser to add contextual help text to errors; Add contextual help text for parenthesized for loops by @sezna in #1828
- Make entry sample more minimal by @Manvi-Agrawal in #1684
- Enforce globally unique names for callables declared as
SimulatableIntrinsic
by @swernli in #1831 - Start migration of Phase Estimation kata by @tcNickolas in #1824
- Fix
noisy_simulator
panic when initializing with non-square Kraus matrices by @orpuente-MS in #1826 - Fix type inference for nested generics by @swernli in #1818
- Export Stdlib AND by @sezna in #1834
- Added a sample function with an implicit return by @filipw in #1811
- Katas UI review - Multiqubit systems by @SoniaLopezBravo in #1813
- Simplify targets logic and prepare exclusion list for next release by @cesarzc in #1815
- Fix code example in
RFrac
doc comment by @swernli in #1839 - Fix missing docs for diagnostic callables by @swernli in #1833
- Add API to convert StateDump to a dense array of amplitudes by @swernli in #1836
- Fix R1Frac doc comments by @swernli in #1851
- Finish migration of QPE kata and publish it by @tcNickolas in #1837
- Noisy simulator: return 2d python lists instead of 1d python lists by @orpuente-MS in #1786
- Fix duplicate imports being generated when using completions by @sezna in #1820
- Support call tracking within Q# code by @swernli in #1791
- Support qubit count tracking within Q# by @swernli in #1800
- Update
qsharp.json.schema
to include latest lints by @sezna in #1853 - Fix spans for lifted lambda idents by @swernli in #1854
- Blocks in while-expr should enforce
Unit
type by @swernli in #1852 - Katas UI review - QKD by @SoniaLopezBravo in #1846
- Include completions for items from the same file; Clean up completions generation for callables by @sezna in #1863
- Katas UI review - Multiqubit measurements by @SoniaLopezBravo in #1844
- Added summary section in chemistry.py by @devikamehra in #1700
- Fix type hints in python wrapper for noisy simulator. by @orpuente-MS in #1857
- Add samples of testing Q# code with classical return values by @tcNickolas in #1858
- Add edit/run for kata examples - issue 591 by @ggridin in #1829
- generate auto imports for core callables by @sezna in #1861
- VSCode shows documentation by package by @DmitryVasilevsky in #1740
- Skip errors on files with
pr
URI scheme by @swernli in #1867 - Katas UI review - Multiqubit gates by @SoniaLopezBravo in #1845
- Bump version to 1.8 by @billti in #1868
Full Changelog: v1.7.0...v1.8.0
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:
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
- 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 #1604
- @ggridin made their first contribution in #1674
- @ausbin made their first contribution in #1685
Full Changelog: 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!
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 #1313
- Use new QIR gen API for Base Profile by @idavis in #1400
- Allow generating circuits for operations despite no entrypoint error by @minestarks in #1432
- Fix lint message formatting by @orpuente-MS in #1444
- Change the default level of the DivisionByZero lint to "error" by @orpuente-MS in #1445
- Adding Adaptive RI profile by @idavis in #1451
- Handle impossible factories in RE API by @msoeken in #1463
- Fix global phase for
PauliI
rotation andDumpRegister
by @swernli in #1461 - Documentation in the VSCode - core, std, and current project by @DmitryVasilevsky in #1466
- Three qubit repetition code sample works in Adaptive Profile by @DmitryVasilevsky in #1534
- GHZ and CAT samples work in Adaptive and Base Profiles by @DmitryVasilevsky in #1532
- Add messages to samples in /samples/language by @goshua13 in #1509
- Make
SpreadZ
utility iterative instead of recursive by @swernli in #1545 - Support target name in Python, remove Adaptive warnings by @swernli in #1549
- Avoid panic from
DumpRegister
in circuit display by @swernli in #1554 - Respect configured target profile for histogram in VS Code by @swernli in #1565
- Update to Rust 1.78 by @orpuente-MS in #1570
- Respect target setting for "Estimate" command by @swernli in #1576
- Add support for CodeActions in the Language Service by @orpuente-MS in #1495
- Read correct field in QEC scheme by @msoeken in #1602
- Fix panic when updating array with dynamic value by @swernli in #1606
- Added dot product via iterative phase estimation sample by @DmitryVasilevsky in #1562
- Reset zoom level when circuit window is resized by @minestarks in #1592
- Fix normalization math in
DumpRegister
by @swernli in #1608 - Adaptive quantum computing notebook samples by @cesarzc in #1614
New Contributors
- @Piwakk made their first contribution in #1440
- @goshua13 made their first contribution in #1447
- @moumita-halder made their first contribution in #1489
- @devikamehra made their first contribution in #1468
- @viktorveis made their first contribution in #1568
- @JPark1023 made their first contribution in #1518
- @SoniaLopezBravo made their first contribution in #1512
Full Changelog: v1.4.0...v1.6.0
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 #1299
- Fix completion auto-open position in notebook cells by @minestarks in #1398
- Update doc comments in std library by @DmitryVasilevsky in #1401
And lots of Katas updates! Including:
- Add state flip task to Single-Qubit Gates kata by @WWhitedogi in #1343
- Add tasks 1.8, 1.9, 1.10 to Superposition Kata by @jkingdon-ms in #1346
- Add sign flip, basis change, amplitude change tasks to Single-Qubit Gates kata by @WWhitedogi in #1352
- Add global phase -1, relative phase i, and complex relative phase tasks to Single-Qubit Gates kata by @WWhitedogi in #1369
- Add tasks 1.11, 1.12 to Superposition Kata by @jkingdon-ms in #1381
- Add task 2.1 to Superposition kata by @tcNickolas in #1395
- Update READMEs to add details on building playground and katas by @Manvi-Agrawal in #1402
- Add tasks on Bell states changes to Multi-Qubit States kata by @WWhitedogi in #1385
- Add CZ section and CNOT and CZ tasks to Multi-Qubit Gates kata by @WWhitedogi in #1389
- Adds task 1.13 to Superposition Kata by @frtibble in #1382
Full Changelog: v1.3.1...v1.4.0
v1.3.1
Includes a fix for an issue rendering DumpMachine calls in VS Code.
See v1.3.0...v1.3.1 for the change.
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
anddump_operation
(#1227)
And more! See v1.2.0...v1.3.0 for the full list of changes.
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 v1.1.3...v1.2.0 for the full change log.
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 #1097
- Consolidate samples and run notebooks in build in #1070
- Fix typos in Q# standard lib documentation by @filipw in #1101
- Session now exits when there is a runtime failure when running without debugging in #1103
- Pure state preparation added to unstable standard library in #1068
- Use relevant icon for locals completion by @filipw in #1111
- Prefer open file contents to disk contents in #1110
- Fix BOM handling in Python in #1112
- Update spans used for some type mismatch errors in #1098
- Evaluator performance improvements in #1116
- Fix state ordering in Python in #1122
- Set notebook cell language back to Python if
%%qsharp
magic isn't there in #1118 - Clarify instructions on running the playground in #1134
- New factoring algorithm sample for resource estimation in #1058
Full Changelog: v1.1.1...v1.1.3
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
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
andqsharp-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/