Microsoft Quantum Development Kit

Also known as: QDK

On this page 7

The Microsoft Quantum Development Kit (QDK) is Microsoft’s open-source toolset for writing, testing and running quantum programs, built around the Q# programming language, local simulators, a resource estimator and submission paths to quantum hardware through Azure Quantum. In quantum software, it occupies the same role as Qiskit or Cirq: it turns an algorithm idea into an executable program and connects that program to simulators and real devices.

The kit has two generations. The classic QDK, released in 2017, depended on the .NET runtime and Jupyter kernels. The Modern QDK, released as version 1.0 in 2024, was rewritten in Rust, compiles to WebAssembly and Python packages, and runs in Visual Studio Code or directly in a browser. This distinction matters because older tutorials, project files and APIs often do not work with the current release.

How the QDK turns Q# code into executable programs

The QDK works as a compiler pipeline plus a set of execution targets. A developer writes operations in Q#, the compiler parses and type-checks them, and the result is either executed on a local simulator or lowered to the Quantum Intermediate Representation (QIR), an LLVM-based format that hardware providers accept. The same source file can therefore run in simulation during development and on a physical device later.

Q# separates classical control flow from quantum operations while letting them mix in one program. Qubits are allocated with a use statement, manipulated with intrinsic gates such as H and CNOT, and measured into Result values. The compiler checks that qubits are released in a known state and that operations marked Adj or Ctl support automatic adjoint and controlled versions, which saves considerable manual work when building algorithms such as phase estimation.

The following table lists the main components of the Modern QDK and what each contributes.

ComponentFunctionTypical use
Q# compilerParses, type-checks and lowers Q# to QIREvery build and submission
Sparse simulatorSimulates states by storing only nonzero amplitudesDebugging and small algorithm tests
Resource estimatorComputes physical qubits and runtime for fault-tolerant hardwareFeasibility studies of large algorithms
VS Code extensionEditor support, debugger, circuit diagrams, histogramsDaily development
qsharp Python packageRuns Q# from Python and Jupyter notebooksHybrid workflows and data analysis
azure-quantum packageSubmits jobs to cloud hardware providersRunning on physical qubits
Core components of the Modern QDK

Classic and Modern QDK compared

The 2024 rewrite changed the architecture rather than adding features to the old one. The classic kit required the .NET SDK, project files with a special SDK reference and the IQ# Jupyter kernel. The Modern QDK removed the .NET dependency entirely, which made installation a matter of one editor extension or one pip install qsharp command and cut compilation times sharply.

Some capabilities were dropped or redesigned during the transition, so migration is not automatic. The table summarizes the differences that most often affect existing code.

AspectClassic QDKModern QDK
ImplementationC# on .NETRust, compiled to native code and WebAssembly
Installation.NET SDK plus project templatesVS Code extension or Python package
Notebook supportIQ# kernelqsharp package in standard Python kernels
Browser useNot supportedRuns fully in a browser editor
Host languagesC#, PythonPython, with Q# as entry point
Language featuresOlder Q# syntaxSimplified syntax, some legacy features removed
Differences between the two QDK generations

How the QDK relates to other quantum SDKs

The QDK differs from most competitors because it is built around a dedicated quantum language rather than a Python library. Qiskit, Cirq and PennyLane express circuits as Python objects, while Q# treats quantum operations as first-class language constructs with a type system. This design favors large, structured algorithms with reusable subroutines; Python-native kits favor quick circuit experiments and integration with machine learning libraries.

Interoperability has improved over time. Azure Quantum accepts circuits written in Qiskit and Cirq, and the Modern QDK can import and export OpenQASM, so teams rarely need to choose one ecosystem exclusively.

ToolkitProgramming modelDistinctive strength
Microsoft QDKQ# language with Python hostResource estimation for fault-tolerant machines
QiskitPython circuit libraryLarge community and IBM hardware access
CirqPython circuit libraryFine control over gate scheduling on Google devices
PennyLanePython with automatic differentiationVariational and quantum machine learning work
CUDA-QC++ and Python kernelsGPU-accelerated simulation at scale
QDK compared with neighboring SDKs

Resource estimation as the defining feature

The Azure Quantum Resource Estimator answers a question simulators cannot: how large a fault-tolerant computer an algorithm would actually need. It takes a Q# program or a QIR file, counts logical operations, and models error correction overhead for chosen qubit technologies, error rates and codes such as the surface code or Floquet codes.

The output reports physical qubit counts, runtime and T-factory layout. Estimates for cryptographically relevant algorithms typically reach hundreds of thousands to millions of physical qubits, depending strongly on the assumed physical error rate. These numbers are model outputs, not guarantees, and they change significantly when the error budget or code distance assumptions change.

ParameterTypical settingEffect on the estimate
Physical error rate10^-3 to 10^-4Lower rates reduce code distance and qubit count
Qubit technology modelGate-based or MajoranaChanges operation times and error assumptions
Error correction codeSurface code or Floquet codeSets overhead per logical qubit
Error budget0.1 percent to 1 percentTighter budgets increase resources
Key resource estimator parameters

Limitations and common mistakes

The most frequent problem is following outdated documentation. Many tutorials still reference IQ#, .NET project files or removed library namespaces, and they fail silently or with confusing errors on the Modern QDK. Checking the release date of a sample is the fastest way to avoid this.

  • Simulation does not scale: full-state simulation becomes impractical beyond roughly 30 qubits on ordinary machines, although the sparse simulator handles some larger states with few nonzero amplitudes.
  • Hardware profiles restrict programs: current devices support only limited classical logic after measurement, so code that runs in simulation may be rejected for a given target profile.
  • Estimates are assumptions: resource estimates depend entirely on chosen error models and should be reported together with those parameters.
  • Smaller community: Q# has fewer third-party libraries and forum answers than Python-based kits.

Explained without jargon

The Microsoft Quantum Development Kit is a workshop for building quantum programs. It gives programmers a special language called Q#, a practice area where programs run on an ordinary computer that pretends to be a quantum one, and a door to real quantum machines in the cloud.

Its most unusual tool works like an architect’s cost calculator. Before anyone builds a huge quantum computer, it estimates how many parts such a machine would need to run a given program. That helps researchers judge which ideas are realistic and which remain far in the future.

A typical use case

A research team at a chemistry company wants to know whether a quantum algorithm for simulating a catalyst molecule could ever beat classical methods. A developer writes the phase estimation routine in Q#, tests it on the sparse simulator with a toy molecule of 8 qubits, and verifies that the energy results match a classical reference calculation.

The team then runs the full-size program through the resource estimator with a physical error rate of 10^-4 and a surface code. The report shows a requirement of about 1.5 million physical qubits and several days of runtime. The team concludes that the approach is not feasible on near-term hardware and decides to revisit it as hardware roadmaps mature, without spending money on cloud hardware runs.