Quantum Development Kit (QDK) and Azure Quantum release notes

This article outlines updates to the Quantum Development Kit (QDK) and the Azure Quantum service.

For 'getting started' instructions, see Set up Azure Quantum. For instructions on how to update your QDK to the latest version, see Update the Quantum Development Kit (QDK) to the latest version.

2023-09-15

QDK version 0.28.302812

  • You can now generate resource estimation profiles to learn how operations in your quantum program contribute to the overall cost; learn how to use in the Azure Quantum documentation.
  • You can now call result.json to get the JSON representation of a resource estimation result.
  • Updated IonQ cost estimation function for aria-1 to use minimum job pricing of $97.50 (this assumes that error mitigation is enabled by default). Learn more about IonQ pricing or how to enable/disable error mitigation.
  • Removed deprecated Quantinuum target names. See full list of Quantinuum supported targets.

2023-07-31

QDK version 0.28.291394

  • Added a support of custom distillation units. Resource Estimator now accepts your custom definitions of distillation algorithms that can be applied to physical or logical qubits.
  • Added more granularity of physical qubit error definitions: idle error rates for all types of qubits and 'readout' and 'process' error rates for Majorana qubit measurements.
  • You can now use the result.diagram endpoint to visualize your algorithm's estimated runtime and space requirements.
  • Added rQOPS to the resource estimation results summary.
  • Breaking change: Removed the ability to submit jobs to Microsoft QIO targets or 1QBit targets, as these have now been deprecated.

2023-06-05

QDK version 0.28.277227

  • Added support for sessions to improve experience for interactive hybrid algorithms.
  • You can now use a unified and convenient resource estimation client API to submit jobs from Q#, Qiskit, and QIR.
  • In Q# Jupyter notebooks, fixed an issue microsoft/iqsharp#776 where Q# exceptions would cause the notebook kernel to run out of memory.
  • Removed references to previously deprecated Rigetti Aspen M-2 target.
  • Added a warning that Microsoft QIO solvers will be deprecated and no longer available in Azure Quantum after June 30, 2023.

2023-03-29

QDK version 0.28.263081

2023-03-01

QDK version 0.27.258160

  • In Q# Jupyter notebooks, fixed an issue where %azure.connect would take several minutes before succeeding in certain environments. For more information, see microsoft/Quantum#762.
  • Removed support for Rigetti Aspen-11 Quantum Processor due to deprecation. For other targets available, see the Rigetti provider documentation.
  • Added a warning that the local Resources Estimator will be removed in March 2023. The Azure Quantum Resource Estimator is now available through Azure Quantum.

2023-01-31

QDK version 0.27.253010

  • Added support for Rigetti Aspen-M-3 Quantum Processor.
  • Compiler errors related to hardware capabilities are now warnings by default. Programs with these warnings may or may not run on a specific target, but they are validated by the Azure Quantum service before execution and users are not to be charged if the program does not pass validation.
  • The Q# compiler now uses LLVM 14 to generate QIR.
  • In the iqsharp-base image, removed support for .NET Core 3.1, since it is end-of-life. Upgraded various packages in the image and made small improvements to decrease container size. Fixes microsoft/iqsharp#757.
  • In the azure-quantum package, fixed cost_estimate() pricing for IonQ Aria from \$0.00022 per one qgs to \$0.0002205 per one qgs.

2022-12-07

QDK version 0.27.244707

  • Azure Quantum now supports CCX native gates, this fixes GitHub issue microsoft/qiskit-qir#19.
  • Submitting a job to Azure Quantum now supports passing arrays from Python to Q#.

2022-10-27

QDK version 0.27.238334

  • Minor fixes.

2022-10-24

QDK version 0.27.236950

  • Made the DumpMachine consistent between the full-state simulator and sparse simulator by fixing a GitHub issue microsoft/qsharp-runtime#1081 in Q# runtime.
  • Honeywell provider and targets are no longer supported. Customers should use the Quantinuum provider and targets.

2022-10-04

QDK version 0.26.233415

2022-09-28

QDK version 0.26.232864

Azure Quantum service update

  • Optimizations to reduce job submission time

2022-09-01

QDK version 0.25.228311

  • Added support for IonQ Aria QPU in Azure Quantum.
  • The operation ApplyFunctionWithTableLookup (QuantumLibraries#607) has been added to the quantum libraries. This operation allows you to implement classical, real-valued functions up to a given precision using table lookup techniques. Thanks to Rajiv Krishnakumar (@rajkk1) for contributing this new feature to the Q# libraries.
  • The FPGA hardware option for Microsoft QIO solvers has been deprecated.

2022-07-26

QDK version 0.25.222597

  • Added support for IonQ Native Gates when creating a Qiskit job.
  • Added two new operations SmallestFixedPoint and LargestFixedPoint to compute the numerical value for the smallest and largest fixed point given a number of integer and fractional bits.
  • Fixed Q# project loading for users of .NET 6.0.302 or above by addressing issue qsharp-compiler/1470.
  • Allowed the use of array items as steps of a ranged expression without causing a type-checking error by fixing qsharp-compiler/1430.

Azure Quantum service update

  • Improved the Azure Quantum Portal experience so that you can easily check how much Azure Quantum Credits you have used, how much is remaining, and quota status if applicable.
  • Added a new advanced sample that helps you explore the execution of hidden shift problems on a quantum computer.
  • Prevented long waiting times by rejecting job submission if Target is in 'Unavailable' state.

2022-06-28

QDK version 0.25.218240

  • The latest version of the QDK has new magic commands for Q# Jupyter notebooks: %azure.target-capability, %qir. The new commands allow you to target specific diagnostics and show in each notebook cell if the target is set.
  • We've improved the Q# compiler diagnostics in Jupyter notebooks. Upon cell compilation, the compiler now points to lines that cause errors and warnings, and also directs you to Q# documentation for the given error or warning message.
  • This release also adds support for continuous-angle rotations to the open systems simulator (for example, Microsoft.Quantum.Intrinsic.Rx and Microsoft.Quantum.Intrinsic.Exp), enabling the simulation of more Q# programs. For more information, see GitHub feature request microsoft/qsharp-runtime#914.
  • All Microsoft QIO CPU solvers now support squared linear combination terms and protobuf binary format. Additionally, several solvers now benefit from performance improvements, resulting in reduced memory usage and shortened runtimes. These solvers only use input format microsoft.qio.v2, the default format for all problems submitted via the Azure Quantum Python SDK.
  • The latest update also enables calling Parity() with a negative argument, fixing GitHub issue microsoft/qsharp-runtime#993.
  • We've added a new Azure CLI quantum extension, version 0.16.0
    • Lastly, any providers participating in the ‘Credits for All’ program are automatically added when you create a workspace with the CLI. See Azure Quantum Credits FAQ

2022-05-23

QDK version 0.24.210930

  • In the May release, we've added names to access fields in FixedPoint user-defined type (microsoft/QuantumLibraries#549).
  • We've added two new operations SubtractFxP and InvertFxP. These allow you to subtract and invert quantum fixed-point numbers, respectively (microsoft/QuantumLibraries#555).
  • The release has added utility functions to convert between floating-point and fixed-point representation microsoft/QuantumLibraries#559.
  • Lastly, we've fixed issue microsoft/qdk-python#323, addressing an apparent inconsistency in results returned by job.result() on a Qiskit job.

Azure Quantum service update

  • The latest service update streamlines advanced creation flow for Azure Quantum workspaces in the Azure Portal.
  • We've updated the default storage account type to general-purpose v2 (from general-purpose v1) to support modern storage account offerings and features when managing data.

2022-04-29

QDK version 0.24.208024

Azure Quantum service update

2022-03-30

QDK version 0.24.201332

Azure Quantum service update

  • We have streamlined workspace creation and the navigation experience in Azure portal and have added a portal notebook sample for the hidden shift scenario.

2022-03-15

QDK version 0.23.198514-beta (Preview)

2022-03-02

QDK version 0.23.195983

  • This release addresses the following GitHub issues:
    • microsoft/qsharp-compiler#1235, Visual Studio and Visual Studio Code extensions no longer throw an unhandled exception if the .NET SDK isn't found. The Language Server falls back to purely syntactic diagnostics.
    • Q# now supports lambda expressions. See the Q# language documentation for information about how to use them.
    • microsoft/qsharp-compiler#1300 - This fixes the issue where the Q# compiler would log an exception in addition to an error message for operations that return a non-unit type when incorrectly defined as adjointable and/or controllable.
    • microsoft/qsharp-compiler#1346 - Fixes the issue where the Q# Formatter was removing parentheses around for-loop conditions without ensuring spacing around the condition. -microsoft/qsharp-compiler#1289 - Improves the usability of the Q# Formatter by outputting a summary of its changes to console and not overwriting unchanged files.
    • We've improved the error message you get when trying to run a sample before adding a provider to your Azure Quantum workspace (link) on how to add a new provider.
    • Breaking change: microsoft/qdk-python#269 - You can now pass shots to backend.run and backend.estimate_cost for all backends in the azure-quantum Python package.
    • microsoft/qdk-python#248 - This change applies to the Qiskit plugin of the azure-quantum Python package. The total number of counts in the histogram now matches the total number of shots.
    • We've removed the UserWarning when initializing a solver job sent to Toshiba SimulatedBifurcationMachine.
    • Breaking change: The compress flag was removed from problem, solvers and streaming_problem classes. The compress parameter can no longer be set in solvers.problem or streaming_problem objects and methods.
    • microsoft/qsharp-compiler#1046 and microsoft/qsharp-compiler#1352 - These fixes are related to QIR generation. The first fixes an issue when generating big integer literals with more than 64 bits. The second change addresses potential runtime failures caused by using a new array expression to create an array of callables.
    • We've added support for the Quantinuum Provider, which replaces the Honeywell Provider.
    • Breaking change: The QuantumSimulator has been refactored. If you use the StateDumper::Callback() directly, then you need to update that code.

Known Issues

  • Q# lambda functions and operations don't compile properly in Q# Jupyter notebooks or from Q# + Python applications, as tracked by microsoft/iqsharp#606.

2022-02-01

QDK version 0.22.189218-beta (Preview)

  • Adding support for .NET 6.0 to the Quantum Development Kit.
  • Updating the minimum required version for the Quantum Development Kit extensions to .NET 6.0.
  • Q# Compiler uses LLVM 13 binaries for producing QIR.
  • Released Microsoft Quantum Development Kit for Visual Studio Code .NET 6 Preview. (Update: This extension preview has now been retired and its changes have been incorporated into the regular Visual Studio Code extension.)

2022-01-26

QDK version 0.22.187631

  • The :::no-loc text="Full state::: Simulator has been migrated from the platform-specific compiler to Clang to fix GitHub issue #876.
  • When submitting a job to Azure Quantum via the CLI, Python, IQ# and other Azure Quantum SDKs, the job details may include the cost estimate of the job (if supported by the provider). The final cost on your bill might be slightly different due to added taxes and currency conversion rates.
  • You can now estimate the price of your job in azure-quantum package by using estimate_cost for the target that you're using with the Qiskit, Cirq and pass-through feature.
  • The azure-quantum package now supports submitting Qiskit lists of length 1.
  • Fixed GitHub issue microsoft/qdk-python#198 in the azure-quantum package where the Qiskit jobs were causing incorrect results in circuits with helper qubits.
  • In azure-quantum package, the perform_icm parameter of the 1QBit PticmSolver was deprecated, using it now returns a deprecation warning. A seed parameter was added to all other 1QBit solvers that specifies a random seed.
  • Fixed GitHub issue microsoft/qdk-python#178 in the azure-quantum package so errors returned by the Azure Quantum service when using the Qiskit or Cirq feature are now propagated up.
  • Fixed GitHub issue microsoft/qsharp-compiler#1297 where the IntelliSense information wasn't updated when the ExecutionTarget property was modified in the project file.

2021-12-14

QDK version 0.21.2112.180703

  • Released Azure CLI quantum extension version 0.11.0: Job result histograms are left-aligned (not centered) in console output.

2021-11-23

QDK version 0.21.2111.177148

  • Added a Q# formatter to update deprecated Q# syntax and basic formatting for Q# projects with QDK version 0.21.2111.177148 and up:
    • You need to update the QDK version in the <Project> tag of your .csproj file to use the Q# formatter.
    • You can use the Q# formatter via Visual Studio by clicking on the Edit -> Advanced -> Format Document menu item. Via Visual Studio Code, you can format your code by right-clicking on the code you want to format, and clicking on the Format Document menu item.
    • Added a build target, UpdateSyntax, for updating deprecated syntax in a Q# project. This target can be used with dotnet msbuild -t:UpdateSyntax at a command prompt.
    • Added Code Actions to automatically update deprecated syntax.
  • Added support for submitting problems to a subset of Microsoft targets in protobuf binary format. You can use it for encoding larger problems by reducing the payload sizes, and improve upload and processing speeds.
  • Breaking change: The deserialize class method of the Problem class has a parameter name change from problem_as_json to input_problem to support deserialization of protobuf.

2021-10-26

QDK version 0.20.2110.171573

  • IQ# kernel %azure.connect command no longer sets "West US" as the default location. Location parameter is now required.
  • The azure-quantum package now supports asynchronous I/O via the new azure.quantum.aio package.
  • Fixed an issue: Qiskit jobs fetched with AzureQuantumProvider.get_job() can now use job.result() without running into a KeyError.
  • Fixed an issue that causes azure.quantum.cirq and azure.quantum.qiskit to not be recognized by Pylance. The azure.quantum.plugins package is deprecated.
  • Fixed an issue in IQ# in which job execution would fail if any operation defined in an external file wasn't supported on the given target.
  • Fixed an issue in the Visual Studio extension that caused incorrect indentation in some cases when a closing bracket was typed.
  • Refactored the Quantum Intermediate Representation (QIR) runtime DLLs to use static VC runtime, removing dependency on msvcrt.dll and Visual Studio installation.
  • Refactored QIR Runtime to use intptr_t for Qubit ID types consistently.
  • Updated Azure CLI Extensions to version 0.9.0.

2021-09-28

QDK version 0.19.2109.165653

  • Added support for submitting Cirq and Qiskit circuits to IonQ and Quantinuum.
  • Conda packages have been moved from the quantum-engineering channel to the microsoft channel. When using conda to install the Quantum Development Kit for Q# notebook or Q# + Python usage, the -c quantum-engineering argument to conda should be changed to -c microsoft, and the channels section of environment.yml files should be updated. See the getting started guide for the full install command using the new packages.
  • You can formulate PUBO and Ising problems using squared linear terms natively on the PA and SSMC solvers.
  • Fixed issue with memory management and improved reliability for QIR generation: 1152 and 1086.
  • Fixed issue related to Workspace.get_targets(). It now returns all available targets in the subscription, even those that don't have client-side support.
  • Fixed issues with Q# compiler's diagnostics appearing in incorrect places: 1133 and 1172.
  • Breaking change: The order of arguments in ApplyIf, ApplyIfA, ApplyIfC, and ApplyIfCA has been changed so it is consistent with related operations such as ApplyIfElseB and Q# API design principles.
  • Problem.serialize() of the azure.quantum.optimization Python package now serializes the name of the Optimization Problem in a new optional metadata field, so you don't have to specify it again when deserializing the problem as detailed in this issue.
  • Released Azure CLI quantum extension version 0.8.0: Users receive recommendations, at most once a day, to update the az quantum extension if the version installed is out-of-date.

2021-09-10

QDK version 0.18.2109.162713

  • Fixes an issue that sometimes resulted in kernel crash in online Quantum Katas. No customer impact since online Katas stayed with the older QDK version.

2021-09-01

QDK version 0.18.2108.160999

2021-08-31

QDK version 0.18.2108.160310

  • Alternative operation in @SubstitutableOnTarget doesn't need to be explicitly referred to anymore in Microsoft.Quantum.AutoSubstitution NuGet package.
  • New Workspace.get_targets() method in azure-quantum package that returns a list of all available targets. Can filter by Provider ID or Target ID.
  • An issue was resolved that prevented using IQ# or the qsharp Python package with Python 3.8 or 3.9 when using conda.
  • Fixed an issue where nested Conditional blocks may be incorrectly lifted.
  • Resolved an issue where some code failed to compile previously for Quantinuum target.
  • Added an option where QIR generation isn't target specific.
  • Fixed a concurrency bug that could cause intermittent crashes if multiple simulator instances are run in the same process.
  • Released Azure CLI quantum extension version 0.7.0:
    • Provide compiler output to users if there was error for easier troubleshooting.
    • Fixed bug in which retrieving output from workspaces in a location different to another set as default failed.
    • Processing jobs that produce no output is allowed.

2021-07-27

QDK version 0.18.2107.153439

  • You can filter by job name, job status, and job creation time when listing jobs in azure-quantum.
  • Fixed regression in Code Actions because of incompatibility with protocol in VS 16.10.x versions.
  • Improved error message on IQ# %azure.* magic commands when no quantum computing targets are available.
  • azure-quantum Python package fixes an issue with MSAL Credentials on Windows and now requires minimum versions for all dependencies to mitigate other potential issues with older dependencies.
  • Fixed a bug in IQ# in which job execution would fail if any operation was defined that wasn't supported on the given target.
  • Fixed a bug in IQ# in which some programs targeting hardware that supports the Basic Measurement Feedback profile were incorrectly being reported as not supported by the Azure Quantum target.
  • Released Azure CLI quantum extension version 0.6.1:
    • Added command to request job cancellation: az quantum job cancel.
    • Fixed a bug in which job submissions in Azure Quantum that emit standard output were reported as failed, even if the job succeeded.
    • Enabled job submissions from a different directory using --project parameter.

Azure Quantum service update

  • Parameter Free Population Annealing solver is now available through the Early Access plan in Azure Quantum. To sign up for early access, see Apply for Azure Quantum Early Access.
  • Terms banner in Review tab in Azure Quantum portal is hidden when only Microsoft provider is being added during workspace creation.

2021-06-25

QDK version 0.18.2106.148911

  • You can now configure how many solutions you want returned from a solver run.
  • A new NuGet package Microsoft.Quantum.AutoSubstitution, which when added to a Q# project, allows you to annotate operations with the SubstitutableOnTarget(AltOp, Sim) attribute. It then calls AltOp instead of the annotated operation, whenever it's executed using Sim.
  • Integration with Azure-Identity provides more mechanisms to authenticate with Azure.
  • The .NET Microsoft.Azure.Management.Quantum now returns the Restricted Access URL so you can know more/apply for a restricted access plan.
  • Preview support for noisy simulation in open systems and stabilizer representations qsharp-runtime#714. See here for documentation on preview simulators.
  • Using quantum-viz.js as the engine to render the output from the jupyter notebook %trace magic.

2021-06-01

QDK version 0.17.2105.144881

  • Reverted a change in the azure-quantum Python client that could create authentication issues for some users (refer to issues #66, #67).

2021-05-26

QDK version 0.17.2105.143879

  • Added a new function to the azure-quantum Python client to support the translation of binary optimization terms from npz to Azure Quantum. See full details in QDK Python.
  • Published QIR oracle generation sample. This program allows turning classical Q# functions on Boolean inputs into quantum implementations of those functions in terms of Q# operations at the level of QIR. This allows, for example, to implement quantum algorithms that are used by many quantum algorithms readily as classical functions.
  • Fixed a bug that prevents QIR generation from being enabled in the iqsharp-base Docker image. See details here.
  • Implemented new special functions, for example, factorial and log-gamma, in Microsoft.Quantum.Math (microsoft/QuantumLibraries#448). Thanks to @TheMagicNacho for the contribution (microsoft/QuantumLibraries#440)!
  • C# Client: Changed input data format type to "v2" for Quantum Computing.
  • Released Azure CLI quantum extension version 0.5.0: Adapted to 'az' tool version 2.23.0, adding user agent information on calls to Azure Quantum Service.

Azure Quantum service update

  • Added PA (population annealing) and SSMC (substochastic Monte Carlo) solvers along with preview access via a specialized plan available to a subset of customers.
  • Added support for new regions: Japan East, Japan West, UK South, UK West
  • Set Provider in Failed state if provisioning fails. Previously it would be stuck in Launching/Updating state.
  • Added help button in portal to direct user to support forum.
  • Rendered provider cost in localized currency from Azure Marketplace.
  • Added feedback button in portal to gather user feedback.
  • Added quickstart guide in portal in overview blade.

2021-05-10

QDK version 0.16.2105.140472

  • Fixed dependency error in IQSharp on System.Text.Json when submitting jobs to Azure Quantum. See full details in issue iqsharp#435.
  • Resolved issue affecting joint measurements of multi-qubit states on some combinations of Pauli basis resulting in incorrect values. For details, refer to issue qsharp-runtime#680.

2021-04-27

QDK version 0.16.2104.138035

  • Improved Q# type inference based on the Hindley-Milner type inference algorithm.
  • Added support for NumPy types in coefficient definitions for problems in QIO azure-quantum Python package.
  • Updated control-plane swagger file to support restricted access plans.
  • Added new StreamingProblem class in QIO azure-quantum Python package. It supports the same interface for adding terms to a problem definition as the Problem class. However, once terms are added to the problem they are queued to be uploaded by a background thread and are not kept in memory for future reference.
  • Restored the packages size of Microsoft.Quantum.Sdk and Microsoft.Quantum.Compiler back to normal. (See related note in 0.15.2103.133969)
  • Improved compiler performance.
  • Released Azure CLI quantum extension version 0.4.0: Exposed URL for restricted access plans. Fixed regression on offerings commands dependent on Azure Marketplace APIs.

2021-03-30

QDK version 0.15.2103.133969

2021-02-25

QDK version 0.15.2102.129448

  • Improved IQ# debug user experience by adding a horizontal scrollbar to scroll both execution path and basis state visualizations.
  • New functions to represent the group product and group inverse on the single-qubit Clifford group, to quickly define common single-qubit Clifford operators, and to apply single-qubit Clifford operators as operations. For more information, see issue #409.
  • Addressing security issue in the Microsoft Quantum Development Kit for Visual Studio Code extension. For details, refer to CVE-2021-27082.
  • Released Az CLI quantum extension version 0.2.0: Added parameter '--provider-sku-list' to 'az quantum workspace create' to allow specification of Quantum providers. Added command group 'az quantum offerings' with 'list', 'accept-terms' and 'show-terms'.

2021-02-12

QDK version 0.15.2102.128318

  • Fix "'npm' is not recognized as an internal or external command" error during creation of Q# projects with Visual Studio Code extension. See issue #848.

2021-01-29

QDK version 0.15.2101.126940

  • Added project templates to Q# compiler for executables targeting IonQ and Quantinuum providers
  • Update IQ# kernel syntax highlighting to include changes to Q# syntax introduced in version 0.15.2101125897
  • Bugfix to support passing arrays as input arguments to Q# programs submitted to Azure Quantum via %azure.execute, see issue #401
  • Fix "Permission denied" error when using az in iqsharp-base Docker images, see issue #404
  • Released Az CLI quantum extension version 0.1.0: Provided command-line tool for workspace management and quantum computing job submission.

2021-01-26

QDK version 0.15.2101125897

  • Simplified qubit allocation, providing more convenient syntax for allocating qubits, see details in Q# language repository.
  • Created QDK-Python repository that includes azure-quantum, the Python client for submitting quantum-inspired optimization jobs to the Azure Quantum service, and qdk, including qdk.chemistry, a Python-based convenience layer for the Q# chemistry library that includes molecular visualization and functionality to generate input files for several chemistry packages such as NWChem, Psi4, and OpenMolcas.
  • Parentheses are now optional for operation and function types and if, elif, while, and until statements. Parentheses for for, use, and borrow statements have been deprecated.
  • Improved width estimates for optimal depth, see details.
  • Apply unitary operation provided as explicit matrix using ApplyUnitary (QuantumLibraries#391, external contribution by Dmytro Fedoriaka)
  • Fixed https://github.com/microsoft/iqsharp/issues/387 by mitigating performance impact on IQ# kernel startup.

2020-11-25

QDK version 0.14.2011120240

  • Improved compiler performance with faster reference loading.
  • Added an ANTLR grammar for Q# to the Q# language specification.
  • Updated the Microsoft.Quantum.Preparation namespace so it is more consistent with style guide and API design principles, and to support purified mixed states with more data (see proposal, review notes, and PRs #212, #322, #375, #376).
  • Parentheses around repeated call expressions are now optional: (Foo(x))(y) may be written as Foo(x)(y).
  • Users of the Visual Studio or Visual Studio Code extensions who have installed .NET 5 or Visual Studio 16.8 may be prompted to install .NET Core 3.1 to continue to work with the extensions.

See the full list of closed PRs for libraries, compiler, runtime, samples, IQ# and Katas.

2020-11-10

QDK version 0.13.20111004

This release disables IntelliSense features for Q# files in Visual Studio and Visual Studio Code when a project file isn't present. This resolves an issue where IntelliSense features may stop working after adding a new Q# file to a project (see qsharp-compiler#720).

2020-10-27

QDK version 0.13.20102604

This release contains the following:

  • Resource estimation now emits simultaneously achievable depth and width estimates also to the qubit count. See here for details.

See the full list of closed PRs for libraries, compiler, runtime, samples, IQ# and Katas.

2020-10-05

QDK version 0.12.20100504

This release fixes a bug affecting the load of Q# notebooks (see iqsharp#331).

2020-09-29

QDK version 0.12.20092803

This release contains the following:

  • Announcement and draft specification of quantum intermediate representation (QIR) intended as a common format across different front- and back-ends. See also our blog post on QIR.
  • Launch of our new Q# language repo containing also the full Q# documentation.
  • Performance improvements for QuantumSimulator for programs involving a large number of qubits: better application of gate fusion decisions; improved parallelization on Linux system; added intelligent scheduling of gate execution; bug fixes.
  • IntelliSense features are now supported for Q# files in Visual Studio and Visual Studio Code even without a project file.
  • Various Q#/Python interoperability improvements and bug fixes, including better support for NumPy data types.
  • Improvements to the Microsoft.Quantum.Arrays namespace (see microsoft/QuantumLibraries#313).
  • Added a new Repeat-Until-Success sample that uses only two qubits.

Since the last release, the default branch in each of our open-source repositories has been renamed to main.

See the full list of closed PRs for libraries, compiler, runtime, samples, IQ# and Katas.

2020-08-25

QDK version 0.12.20082513

This release contains the following:

See the full list of closed PRs for libraries, compiler, runtime, samples, IQ# and Katas.

2020-07-21

QDK version 0.12.20072031

This release contains the following:

  • Opened namespaces in Q# notebooks are now available when running all future cells. This allows, for example, namespaces to be opened once in a cell at the top of the notebook, rather than needing to open relevant namespaces in each code cell. A new %lsopen magic command displays the list of currently opened namespaces.

See the full list of closed PRs for libraries, compiler, runtime, samples, IQ# and Katas.

2020-07-02

QDK version 0.12.20070124

This release contains the following:

  • New qdk-chem tool for converting legacy electronic structure problem serialization formats (for example, FCIDUMP) to Broombridge
  • New functions and operations in the Microsoft.Quantum.Synthesis namespace for coherently applying classical oracles using transformation- and decomposition-based synthesis algorithms.
  • IQ# now allows arguments to the %simulate, %estimate, and other magic commands. For more information, see the %simulate magic command reference.
  • New phase display options in IQ#. For more information, see the %config magic command reference.
  • IQ# and the qsharp Python package are now provided via conda packages (qsharp and iqsharp) to simplify local installation of Q# Jupyter and Python functionality to a conda environment. For more information, see the Q# with Python installation guides.
  • When using the simulator, qubits no longer need to be in the |0⟩ state upon release, but can be automatically reset if they were measured immediately before releasing.
  • Updates to make it easier for IQ# users to consume library packages with different QDK versions, requiring only major & minor version numbers match rather than the exact same version
  • Removed deprecated Microsoft.Quantum.Primitive.* namespace
  • Moved operations:
    • Microsoft.Quantum.Intrinsic.Assert is now Microsoft.Quantum.Diagnostics.AssertMeasurement
    • Microsoft.Quantum.Intrinsic.AssertProb is now Microsoft.Quantum.Diagnostics.AssertMeasurementProbability
  • Bug fixes

See the full list of closed PRs for libraries, compiler, runtime, samples, IQ# and Katas.

2020-06-04

QDK version 0.11.2006.403

This release fixes a bug-affecting compilation of Q# projects.

2020-06-03

QDK version 0.11.2006.207

This release contains the following:

  • Q# notebooks and Python host programs no longer fail when a Q# entry point is present.
  • Updates to Standard library to use access modifiers
  • Compiler now allows plug-in of rewrite steps between built-in rewrite steps
  • Several deprecated functions and operations have been removed following the schedule described in our API principles. Q# programs and libraries that build without warnings in version 0.11.2004.2825 continue to work unmodified.

See the full list of closed PRs for libraries, compiler, runtime, samples, IQ# and Katas.

Note

This version contains a bug that affects the compilation of Q# projects. We recommend upgrading to a newer release.

2020-04-30

QDK version 0.11.2004.2825

This release contains the following:

  • New support for Q# applications, which no longer require a C# or Python host file. For more information on getting started with Q# applications, see here.
  • Updated quantum random number generator quickstart to no longer require a C# or Python host file. See the updated Quickstart
  • Performance improvements to IQ# Docker images

Note

Q# applications using the new @EntryPoint() attribute currently can't be called from Python or .NET host programs. For more information, see the Python and .NET interoperability guides.

2020-03-31

QDK version 0.11.2003.3107

This release contains minor bug fixes for version 0.11.2003.2506.

2020-03-26

QDK version 0.11.2003.2506

This release contains the following:

  • New support for access modifiers in Q#
  • Updated to .NET Core SDK 3.1

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

2020-02-27

QDK version 0.10.2002.2610

This release contains the following:

  • New Quantum Machine Learning library, for more information go to our QML docs page
  • IQ# bug fixes, resulting in up to a 10-20x performance increase when loading NuGet packages

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

2020-01-29

QDK version 0.10.2001.2831

This release contains the following:

  • New Microsoft.Quantum.SDK NuGet package, which replaces the Microsoft.Quantum.Development.Kit NuGet package when creating new projects. Microsoft.Quantum.Development.Kit NuGet package is still supported for existing projects.
  • Support for Q# compiler extensions, enabled by the new Microsoft.Quantum.SDK NuGet package, for more information, see the documentation on GitHub, the compiler extensions sample and the Q# Dev Blog
  • Added support for .NET Core 3.1, it's highly recommended to have version 3.1.100 installed since building with older .NET Core SDK versions may cause issues
  • New compiler transformations available under Microsoft.Quantum.QsCompiler.Experimental
  • New functionality to expose output state vectors as HTML in IQ#
  • Added support for EstimateFrequencyA to Microsoft.Quantum.Characterization for Hadamard and SWAP tests
  • AmplitudeAmplification namespace now uses Q# style guide

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

2019-12-05

QDK version 0.10.1912.0501

This release contains the following:

  • New Test attribute for Q# unit testing, see updated API documentation here and updated testing & debugging guide here
  • Added stack trace if there's a Q# program run error
  • Support for breakpoints in Visual Studio Code because of an update in the OmniSharp C# Visual Studio Code extension

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

2019-11-17

QDK version 0.10.1911.1607

This release contains the following:

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

2019-11-01

QDK version 0.10.1911.307

This release contains the following:

  • Updates to Visual Studio Code & Visual Studio extensions to deploy language server as a self-contained executable file, eliminating the .NET Core SDK version dependency
  • Migration to .NET Core 3.0
  • Breaking change to Microsoft.Quantum.Simulation.Core.IOperationFactory with introduction of new Fail method. It affects only custom simulators that don't extend SimulatorBase. For more details, view the pull request on GitHub.
  • New support for Deprecated attributes

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

2019-09-30

QDK version 0.9.1909.3002

This release contains the following:

  • New support for Q# code completion in Visual Studio 2019 (versions 16.3 & later) & Visual Studio Code
  • New Quantum Kata for quantum adders

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

2019-08-29

QDK version 0.9.1908.2902

This release contains the following:

  • New support for conjugation statements in Q#
  • New code actions in the compiler, such as: "replace with", "add documentation", and simple array item update
  • Added install template and new project commands to Visual Studio Code extension
  • Added new variants of ApplyIf combinator such as Microsoft.Quantum.Canon.ApplyIfOne
  • Additional Quantum Katas converted to Jupyter Notebooks
  • Visual Studio Extension now requires Visual Studio 2019

See the full list of closed PRs for libraries, compiler, runtime, samples and Katas.

The changes are summarized here with instructions for upgrading your existing programs. Read more about these changes on the Q# dev blog.

2019-07-12

QDK version 0.8.1907.1701

This release contains the following:

See the full list of closed PRs for libraries and samples.

2019-05-31

QDK version 0.7.1905.3109

This release contains the following:

  • Additions to the Q# language
  • Updates to the chemistry library
  • New numerics library

See the full list of closed PRs for libraries and samples.

The changes are summarized here as well instructions for upgrading your existing programs. Read more about these changes on the Q# dev blog.

Q# language syntax

This release adds new Q# language syntax:

Library

This release adds a numerics library: Learn more about how to use the new numerics library and try out the new samples. PR #102.
This release reorganizes, extends and updates the chemistry library:

2019-05-03

QDK version 0.6.1905

This release contains the following:

  • Makes changes to the Q# language
  • Restructures the Quantum Development Kit libraries
  • Adds new samples
  • Fixes bugs. Several closed PRs for libraries and samples.

The changes are summarized here and instructions for upgrading your existing programs. You can read more about these changes on devblogs.microsoft.com/qsharp.

Q# language syntax

This release adds new Q# language syntax:

With this release, we no longer allow an array element to specify on the left side of a set statement. This is because that syntax implies that arrays are mutable when in fact, the result of the operation has always been the creation of a new array with the modification. Instead, a compiler error is generated with a suggestion to use the new copy-and-update operator, w/, to accomplish the same result.

Library restructuring

This release reorganizes the libraries to enable their growth in a consistent way:

  • Renames the Microsoft.Quantum.Primitive namespace to Microsoft.Quantum.Intrinsic. These operations are implemented by the target machine. The Microsoft.Quantum.Primitive namespace is deprecated. A runtime warning advises when programs call operations and functions using deprecated names.

  • Renames the Microsoft.Quantum.Canon package to Microsoft.Quantum.Standard. This package contains namespaces that are common to most Q# programs. This includes:

    • Microsoft.Quantum.Canon for common operations
    • Microsoft.Quantum.Arithmetic for general purpose arithmetic operations
    • Microsoft.Quantum.Preparation for operations used to prepare qubit state
    • Microsoft.Quantum.Simulation for simulation functionality

With this change, programs that include a single "open" statement for the namespace Microsoft.Quatum.Canon may find build errors if the program references operations that were moved to the other three new namespaces. Adding the additional open statements for the three new namespaces is a straightforward way to resolve this issue.

  • Several namespaces have been deprecated as the operations within have been reorganized to other namespaces. Programs that use these namespaces continue to work, and a compile-time warning denotes the namespace where the operation is defined.

  • The Microsoft.Quantum.Arithmetic namespace has been normalized to use the LittleEndian user defined type user-defined type. Use the function BigEndianAsLittleEndian when needed to convert to little endian.

  • The names of several callables (functions and operations) have been changed to conform to the Q# Style Guide. The old callable names are deprecated. Programs that use the old callables continue to work with a compile-time warning.

New samples

We added a sample of using Q# with F# driver.

"Thank you!" to the following contributor to our open code base at https://github.com/Microsoft/Quantum. These contributions add to the rich samples of Q# code:

Migrating existing projects to 0.6.1905.

See the install guide to update the QDK.

If you have existing Q# projects from version 0.5 of the Quantum Development Kit, the following are the steps to migrate those projects to the newest version.

  1. Projects need to upgrade in order. If you have a solution with multiple projects, update each project in the order they're referenced.

  2. From a command prompt, Run dotnet clean to remove all existing binaries and intermediate files.

  3. In a text editor, edit the .csproj file to change the version of all the Microsoft.Quantum PackageReference to version 0.6.1904, and change the Microsoft.Quantum.Canon package name to Microsoft.Quantum.Standard, for example:

    <PackageReference Include="Microsoft.Quantum.Standard" Version="0.6.1905.301" />
    <PackageReference Include="Microsoft.Quantum.Development.Kit" Version="0.6.1905.301" />
    
  4. From the command prompt, run this command: dotnet msbuild

  5. After running this, you might still need to manually address errors because of the changes listed above. In many cases, these errors are also reported by IntelliSense in Visual Studio or Visual Studio Code.

    • Open the root folder of the project or the containing solution in Visual Studio 2019 or Visual Studio Code.
    • After opening a .qs file in the editor, you should see the output of the Q# language extension in the output window.
    • After the project has loaded successfully (indicated in the output window), open each file and manually to address all remaining issues.

Note

  • For the 0.6 release, the language server included with the Quantum Development Kit does not support multiple workspaces.
  • In order to work with a project in Visual Studio Code, open the root folder containing the project itself and all referenced projects.
  • In order to work with a solution in Visual Studio, all projects contained in the solution must be in the same folder as the solution or in one of its subfolders.
  • References between projects migrated to 0.6 and higher and projects using older package versions are not supported.

2019-04-15

QDK version 0.5.1904

This release contains bug fixes.

2019-03-27

QDK version 0.5.1903

This release contains the following:

2019-02-27

QDK version 0.5.1902

This release contains the following:

  • Adds support for a cross-platform Python host. The qsharp package for Python makes it easy to simulate Q# operations and functions from within Python. Learn more about Python interoperability.

  • The Visual Studio and Visual Studio Code extensions now support renaming of symbols (for example, functions and operations).

  • The Visual Studio extension can now be installed on Visual Studio 2019.

2019-01-30

QDK version 0.4.1901

This release contains the following:

  • Adds support for a new primitive type, BigInt, which represents a signed integer of arbitrary size. Learn more about BigInt.
  • Adds new Toffoli simulator, a special purpose fast simulator that can simulate X, CNOT and multi-controlled X quantum operations with large numbers of qubits. Learn more about Toffoli simulator.
  • Adds a simple resource estimator that estimates the resources required to run a given instance of a Q# operation on a quantum computer. Learn more about the Resource Estimator.

2018-11-28

QDK version 0.3.1811.2802

Even though our VS Code extension wasn't using it, it was flagged and removed from the marketplace during the extensions purge related to the event-stream npm package. This version removes all runtime dependencies that could make the extension trigger any red flags.

If you had previously installed the extension, you need to install it again by visiting the Microsoft Quantum Development Kit for Visual Studio Code extension on the Visual Studio Marketplace and press Install. We're sorry about the inconvenience.

2018-11-20

QDK version 0.3.1811.1511

This release fixes a bug that prevented some users to successfully load the Visual Studio extension.

2018-11-02

QDK version 0.3.1811.203

This release includes a few bug fixes, including:

  • Invoking DumpMachine could change the state of the simulator under certain situations.
  • Removed compilation warnings when building projects using a version of .NET Core previous to 2.1.403.
  • Clean up of documentation, specially the tooltips shown during mouse hover in VS Code or Visual Studio.

2018-10-29

QDK version 0.3.1810.2508

This release includes new language features and an improved developer experience:

  • This release includes a language server for Q#, and the client integrations for Visual Studio and Visual Studio Code. This enables a new set of IntelliSense features along with live feedback on typing in form of squiggly underlinings of errors and warnings.
  • This update greatly improves diagnostic messages in general, with easy navigation to and precise ranges for diagnostics and additional details in the displayed hover information.
  • The Q# language has been extended in ways that unifies the ways developers can do common operations and new enhancements to the language features to powerfully express quantum computation. There are a handful of breaking changes to the Q# language with this release.

This release also includes a new quantum chemistry library:

  • The chemistry library contains new Hamiltonian simulation features, including:
    • Trotter–Suzuki integrators of arbitrary even order for improved simulation accuracy.
    • Qubitization simulation technique with chemistry-specific optimizations for reducing $T$-gate complexity.
  • A new open-source schema, called Broombridge Schema (in reference to a landmark celebrated as a birthplace of Hamiltonians), is introduced for importing representations of molecules and simulating them.
  • Multiple chemical representations defined using the Broombridge Schema are provided. These models were generated by NWChem, an open source high-performance computational chemistry tool.
  • Tutorials and Samples describe how to use the chemistry library and the Broombridge data models to:
    • Construct simple Hamiltonians using the chemistry library
    • Visualize ground and excited energies of Lithium Hydride using phase estimation.
    • Perform resource estimates of quantum chemistry simulation.
    • Estimate energy levels of molecules represented by the Broombridge schema.
  • Documentation describes how to use NWChem to generate additional chemical models for quantum simulation with Q#.

Learn more about the Quantum Development Kit chemistry library.

With the new chemistry library, we're separating out the libraries into a new GitHub repo, Microsoft/QuantumLibraries. The samples remain in the repo Microsoft/Quantum. We welcome contributions to both!

This release includes bug fixes and features for issues reported by the community.

Community contributions

"Thank you!" to the following contributors to our open code base at https://github.com/Microsoft/Quantum. These contributions add to the rich samples of Q# code:

  • Rolf Huisman (@RolfHuisman): Improved the experience for QASM/Q# developers by creating a QASM to Q# translator. PR #58.

  • Andrew Helwer (@ahelwer): Contributed a sample implementing the CHSH Game, a quantum game related to nonlocality. PR #84.

Thank you also to Rohit Gupta (@guptarohit,PR #90), Tanaka Takayoshi (@tanaka-takayoshi,PR #289), and Lee James O'Riordan (@mlxd,PR #96) for their work improving the content for all of us through documentation, spelling and typo corrections!

2018-09-10

QDK version 0.2.1809.701

This release includes bug fixes for issues reported by the community.

2018-06-30

QDK version 0.2.1806.3001

This release is just a quick fix for issue #48 reported on GitHub (Q# compilation fails if user name contains a blank space). Follow same update instructions as 0.2.1806.1503 with the corresponding new version (0.2.1806.3001-preview).

2018-06-22

QDK version 0.2.1806.1503

This release includes several community contributions and an improved debugging experience and improved performance. Specifically:

  • Performance improvements on both small and large simulations for the QuantumSimulator target machine.
  • Improved debugging functionality.
  • Community contributions in bug fixes, new helper functions, operations and new samples.

Performance improvements

This update includes performance improvements for simulation of large and small numbers of qubits for all the target machines. This improvement is easily visible with the H2 simulation that is a standard sample in the Quantum Development Kit.

Improved debugging functionality

This update adds new debugging functionality:

  • Added two new operations, @"microsoft.quantum.extensions.diagnostics.dumpmachine" and @"microsoft.quantum.extensions.diagnostics.dumpregister" that output wave function information about the target quantum machine at that point in time.
  • In Visual Studio, the probability of measuring a $\ket{1}$ on a single qubit is now automatically shown in the debugging window for the QuantumSimulator target machine.
  • In Visual Studio, improved the display of variable properties in the Autos and Locals debug windows.

Learn more about Testing and Debugging.

Community contributions

The Q# coder community is growing and we're thrilled to see the first user contributed libraries and samples that were submitted to our open code base at https://github.com/Microsoft/quantum. A big "Thank you!" to the following contributors:

  • Mathias Soeken (@msoeken): contributed a sample defining a transformation-based logic synthesis method that constructs Toffoli networks to implement a given permutation. The code is written entirely in Q# functions and operations. PR #41.
  • RolfHuisman (@RolfHuisman): Microsoft MVP Rolf Huisman contributed a sample that generates flat QASM code from Q# code for a restricted class of programs that don't have classical control flow and restricted quantum operations. PR #59
  • Sarah Kasier (@crazy4pi314): helped to improve our code base by submitting a library function for controlled operations. PR #53
  • Jessica Lemieux (@Lemj3111): fixed @"microsoft.quantum.canon.quantumphaseestimation" and created new unit tests. PR #54
  • Tama McGlinn (@TamaMcGlinn): cleaned the Teleportation sample by making sure the QuantumSimulator instance is disposed. PR #20

Additionally, a big "Thank You!" to these Microsoft Software Engineers from the Commercial Engineering Services team contributors who made valuable changes to our documentation during their Hackathon. Their changes vastly improved the clarity and onboarding experience for all of us:

  • Sascha Corti
  • Mihaela Curmei
  • John Donnelly
  • Kirill Logachev
  • Jan Pospisil
  • Anita Ramanan
  • Frances Tibble
  • Alessandro Vozza

Update existing projects

This release is fully backwards compatible. Just update the NuGet packages in your projects to version 0.2.1806.1503-preview and do a full rebuild to make sure all intermediate files are regenerated.

From Visual Studio, follow the normal instructions on how to update a package.

To update project templates for the command line, run the following command:

dotnet new -i "Microsoft.Quantum.ProjectTemplates::0.2.1806.1503-preview"

After running this command, any new projects created using dotnet new <project-type> -lang Q# automatically use this version of the Quantum Development Kit.

To update an existing project to use the newest version, run the following command from within the directory for each project:

dotnet add package Microsoft.Quantum.Development.Kit -v "0.2.1806.1503-preview"
dotnet add package Microsoft.Quantum.Canon -v "0.2.1806.1503-preview"

If an existing project also uses XUnit integration for unit testing, then a similar command can be used to update that package as well:

dotnet add package Microsoft.Quantum.Xunit -v "0.2.1806.1503-preview"

Depending on the version of XUnit that your test project uses, you may also need to update XUnit to 2.3.1:

dotnet add package xunit -v "2.3.1" 

After the update, make sure you remove all temporary files generated by the previous version by doing:

dotnet clean 

Known issues

No other known issues to report.

2018-02-26

QDK version 0.2.1802.2202

This release brings support for development on more platforms, language interoperability, and performance enhancements. Specifically:

  • Support for macOS- and Linux-based development.
  • .NET Core compatibility, including support for Visual Studio Code across platforms.
  • A full Open Source license for the Quantum Development Kit Libraries.
  • Improved simulator performance on projects requiring 20 or more qubits.
  • Interoperability with the Python language (preview release available on Windows).

.NET editions

The .NET platform is available through two different editions, the .NET Framework that is provided with Windows, and the open-source .NET Core that is available on Windows, macOS and Linux. With this release, most parts of the Quantum Development Kit are provided as libraries for .NET Standard, the set of classes common to both Framework and Core. These libraries are then compatible with recent versions of either .NET Framework or .NET Core.

To help ensure that projects written using the Quantum Development Kit are as portable as possible, we recommend that library projects written using the Quantum Development Kit target .NET Standard. Console applications should target .NET Core. Since previous releases of the Quantum Development Kit only supported .NET Framework, you may need to migrate your existing projects. See below for details on how to do this.

Project migration

Projects created using previous versions of Quantum Development Kit still work, as long as you don't update the NuGet packages used in them. To migrate existing code to the new version, do the following steps:

  1. Create a new .NET Core project using the right type of Q# project template (Application, Library or Test Project).
  2. Copy existing .qs and .cs/.fs files from the old project to the new project (using Add > Existing Item). Don't copy the AssemblyInfo.cs file.
  3. Build and run the new project.

Note that the operation RandomWalkPhaseEstimation from the namespace Microsoft.Quantum.Canon was moved into the namespace Microsoft.Research.Quantum.RandomWalkPhaseEstimation in the Microsoft/Quantum-NC repository.

Known issues

  • The --filter option to dotnet test doesn't work correctly for tests written in Q#. As a result, individual unit tests can't be run in Visual Studio Code; we recommend using dotnet test at the command prompt to re-run all tests.

2018-01-18

QDK version 0.1.1801.1707

This release fixes some issues reported by the community. Namely:

  • The simulator now works with early non-AVX-enabled CPUs.
  • Regional decimal settings don't cause the Q# parser to fail.
  • SignD primitive operation now returns Int rather than Double.

2017-12-11

QDK version 0.1.1712.901

Known issues

Hardware and software requirements
  • The simulator included with the Quantum Development Kit requires a 64-bit installation of Microsoft Windows to run.
  • Microsoft's quantum simulator, installed with the Quantum Development Kit, uses Advanced Vector Extensions (AVX), and requires an AVX-enabled CPU. Intel processors shipped in Q1 2011 (Sandy Bridge) or later support AVX. We're evaluating support for earlier CPUs and may announce details at a later time.
Project creation
  • When creating a solution (.sln) that uses Q#, the solution must be one directory higher than each project (.csproj) in the solution. When creating a new solution, this can be accomplished by making sure that the "Create directory for solution" checkbox on the "New Project" dialog box is checked. If this isn't done, the Quantum Development Kit NuGet packages must be installed manually.
Q#
  • Intellisense doesn't display proper errors for Q# code. Make sure that you're displaying Build errors in the Visual Studio Error List to see correct Q# errors. Also note that Q# errors won't show up until after you've done a build.
  • Using a mutable array in a partial application may lead to unexpected behavior.
  • Binding an immutable array to a mutable array (let a = b, where b is a mutable array) may lead to unexpected behavior.
  • Profiling, code coverage and other VS plugins may not always count Q# lines and blocks accurately.
  • The Q# compiler doesn't validate interpolated strings. It's possible to create C# compilation errors by misspelling variable names or using expressions in Q# interpolated strings.
Simulation
  • The Quantum Simulator uses OpenMP to parallelize the linear algebra required. By default OpenMP uses all available hardware threads, which means that programs with small numbers of qubits often run slowly because the coordination required dwarfs the actual work. This can be fixed by setting the environment variable OMP_NUM_THREADS to a small number. As a rough rule of thumb, one thread is good for up to about four qubits, and then an additional thread per qubit is good, although this is highly dependent on your algorithm.
Debugging
  • F11 (step in) doesn't work in Q# code.
  • Code highlighting in Q# code at a breakpoint or single-step pause is sometimes inaccurate. The correct line is highlighted, but sometimes the highlight starts and ends at incorrect columns on the line.
Testing
  • Tests must be run in 64-bit mode. If your tests are failing with a BadImageFormatException, go to the Test menu and select Test Settings > Default Processor Architecture > X64.
  • Some tests take a long time (possibly as much as 5 minutes depending on your computer) to run. This is normal, as some use over 20 qubits; our largest test currently runs on 23 qubits.
Samples
  • On some machines, some small samples may run slowly unless the environment variable OMP_NUM_THREADS is set to "1". See also the release note under "Simulation".
Libraries
  • There's an implicit assumption that the qubits passed to an operation in different arguments are all distinct. For instance, all of the library operations (and all of the simulators) assume that the two qubits passed to a controlled NOT are different qubits. Violating this assumption may lead to unpredictable unexpected. It's possible to test for this using the quantum computer tracer simulator.
  • The Microsoft.Quantum.Bind function may not act as expected in all cases.
  • In the Microsoft.Quantum.Extensions.Math namespace, the SignD function returns a Double rather than an Int, although the underlying System.Math.Sign function always returns an integer. It's safe to compare the result against 1.0, -1.0, and 0.0, since these doubles all have exact binary representations.