VOOZH about

URL: https://pypi.org/project/qdk/

โ‡ฑ qdk ยท PyPI


Skip to main content

qdk 1.29.1

pip install qdk

Latest release

Released:

Quantum Development Kit Python Package

Navigation

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for microsoft from gravatar.com
microsoft

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License
  • Author: Microsoft
  • Requires: Python >=3.10

Project description

qdk

The Quantum Development Kit (QDK) provides a single, cohesive Python entry point for compiling, simulating, and estimating resources for quantum programs (Q# and OpenQASM), with optional extras for visualization, cloud workflows, and interoperability with Qiskit and Cirq.

Install

To install the core functionality, which include Q# & OpenQASM simulation, compilation, and resource estimation support:

pipinstallqdk

To include the Jupyter extra, which adds visualizations using Jupyter Widgets in the qdk.widgets submodule and syntax highlighting for Jupyter notebooks in the browser:

pipinstall"qdk[jupyter]"

To add the Azure Quantum extra, which includes functionality for working with the Azure Quantum service in the qdk.azure submodule:

pipinstall"qdk[azure]"

For Qiskit integration, which exposes Qiskit interop utilities in the qdk.qiskit submodule:

pipinstall"qdk[qiskit]"

For Cirq integration, which exposes Cirq interop utilities in the qdk.cirq submodule:

pipinstall"qdk[cirq]"

To easily install all the above extras:

pipinstall"qdk[all]"

Quick Start

fromqdkimport qsharp

result = qsharp.run("{ use q = Qubit(); H(q); return MResetZ(q); }", shots=100)
print(result)

To use widgets (installed via qdk[jupyter] extra):

fromqdk.qsharpimport eval, run
fromqdk.widgetsimport Histogram

eval("""
operation BellPair() : Result[] {
 use qs = Qubit[2];
 H(qs[0]);CX(qs[0], qs[1]);
 MResetEachZ(qs)
}
""")
results = run("BellPair()", shots=1000, noise=(0.005, 0.0, 0.0))
Histogram(results)

Public API Surface

Submodules:

  • qdk.qsharp โ€“ Q# interpreter functions: init, eval, run, compile, circuit, estimate, dump_machine, dump_circuit, dump_operation, and related types.
  • qdk.openqasm โ€“ OpenQASM compilation and execution.
  • qdk.estimator โ€“ resource estimation utilities.
  • qdk.simulation โ€“ noise-aware simulation utilities: NeutralAtomDevice, NoiseConfig, run_qir, DensityMatrixSimulator, StateVectorSimulator, and related types.
  • qdk.code โ€“ dynamic namespace populated at runtime with user-defined Q# and OpenQASM callables.
  • qdk.qre โ€“ quantum resource estimation v3: estimate, Application, Architecture, ISA, ISATransform, and related types.
  • qdk.applications โ€“ domain-specific quantum applications (e.g. qdk.applications.magnets).
  • qdk.widgets โ€“ Jupyter widgets for visualization (requires the qdk[jupyter] extra).
  • qdk.azure โ€“ Azure Quantum service integration (requires the qdk[azure] extra).
  • qdk.qiskit โ€“ Qiskit interop: QSharpBackend, NeutralAtomBackend, and related types (requires the qdk[qiskit] extra).
  • qdk.cirq โ€“ Cirq interop: NeutralAtomSampler (requires the qdk[cirq] extra).

Top level exports

For convenience, the following helpers and types are also importable directly from the qdk root (e.g. from qdk import code, Result). Algorithm execution APIs (like run / estimate) remain under qdk.qsharp or qdk.openqasm.

Symbol Type Origin Description
code module qdk.code Exposes operations defined in Q# or OpenQASM
init function qdk.qsharp.init Initialize/configure the QDK interpreter (target profile, options).
set_quantum_seed function qdk.qsharp.set_quantum_seed Deterministic seed for quantum randomness (simulators).
set_classical_seed function qdk.qsharp.set_classical_seed Deterministic seed for classical host RNG.
dump_machine function qdk.qsharp.dump_machine Emit a structured dump of full quantum state (simulator dependent).
Result class qdk.qsharp.Result Measurement result token.
TargetProfile class qdk.qsharp.TargetProfile Target capability / profile descriptor.
StateDump class qdk.qsharp.StateDump Structured state dump object.
ShotResult class qdk.qsharp.ShotResult Multi-shot execution results container.
PauliNoise class qdk.qsharp.PauliNoise Pauli channel noise model spec.
DepolarizingNoise class qdk.qsharp.DepolarizingNoise Depolarizing noise model spec.
BitFlipNoise class qdk.qsharp.BitFlipNoise Bit-flip noise model spec.
PhaseFlipNoise class qdk.qsharp.PhaseFlipNoise Phase-flip noise model spec.
Context class qdk.Context Isolated Q# and OpenQASM interpreter context for independent sessions.

Telemetry

This library sends telemetry. Minimal anonymous data is collected to help measure feature usage and performance. All telemetry events can be seen in the source file telemetry_events.py.

To disable sending telemetry from this package, set the environment variable QDK_PYTHON_TELEMETRY=none

Support

For more information about the Microsoft Quantum Development Kit, visit https://aka.ms/qdk.

Contributing

Q# welcomes your contributions! Visit the Q# GitHub repository at [https://github.com/microsoft/qdk] to find out more about the project.

Project details

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for microsoft from gravatar.com
microsoft

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License
  • Author: Microsoft
  • Requires: Python >=3.10

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

Filter files by name, interpreter, ABI, and platform.

If you're not sure about the file name format, learn more about wheel file names.

Copy a direct link to the current filters

qdk-1.29.1-cp310-abi3-win_arm64.whl (6.3 MB view details)

Uploaded CPython 3.10+Windows ARM64

qdk-1.29.1-cp310-abi3-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.10+Windows x86-64

qdk-1.29.1-cp310-abi3-manylinux_2_35_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.35+ x86-64

qdk-1.29.1-cp310-abi3-manylinux_2_35_aarch64.whl (5.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.35+ ARM64

qdk-1.29.1-cp310-abi3-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

qdk-1.29.1-cp310-abi3-macosx_10_12_x86_64.whl (5.6 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file qdk-1.29.1-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: qdk-1.29.1-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.10+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qdk-1.29.1-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 5fe1a791822c0be0d91563b9f20ea8358227ece5954bc2b6a0eff31bf3cfc4f3
MD5 c418ead7a31a9e70df6d3fbf5713993b
BLAKE2b-256 ba89533b089a32a69d9e86c0aba16d317f5ef88275f9ef0d597da0aacaaf34ab

See more details on using hashes here.

File details

Details for the file qdk-1.29.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: qdk-1.29.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qdk-1.29.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 35c9f5327a93e437b9c61593c72862c5e4c1e8bc454db82a7b262d81e5be88d5
MD5 45d8354d88b49048bc5facdf5a1c9535
BLAKE2b-256 98fb12fa1871528cd1254859a12a394098a9884cae08406f1f5493d1f842f811

See more details on using hashes here.

File details

Details for the file qdk-1.29.1-cp310-abi3-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for qdk-1.29.1-cp310-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 54412931898706bfddecd62347fd6eafe8d05c4f4471158b13f3dbe0740aa3b7
MD5 8fc9c9c186df930d9836a11bfba8efeb
BLAKE2b-256 247118c070a2009fa314259398cc40f0af303af2929a63678d36a24e1af2517c

See more details on using hashes here.

File details

Details for the file qdk-1.29.1-cp310-abi3-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for qdk-1.29.1-cp310-abi3-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 fae219be3e8349db62890cc06b0e6a8da5b789dfb248ed6422e76221f60e0817
MD5 a378c3380e2bb792152deea8232d9827
BLAKE2b-256 99cba8a3d6c89c51626d95d1e5c81d38f1f74ff30e30946a8be4efc7b042dfd1

See more details on using hashes here.

File details

Details for the file qdk-1.29.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qdk-1.29.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba9f27516019b7684e8e955bce7b5870a51b44041d0495c3771ec4ea7fba7865
MD5 a6b5141359c9e833efffc6d949b3d05c
BLAKE2b-256 13a723ab46eee6c406bccb4c1070f9221cff79a2b81f9bcc1242b302f5d4f58a

See more details on using hashes here.

File details

Details for the file qdk-1.29.1-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qdk-1.29.1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 55ea113995ce54e512d07a2eb84d2be6ec490f37f9ad9b434f00b2defb6af773
MD5 250703112904878d12827bd17b74260c
BLAKE2b-256 342630072fc3ebad4db0559639dfc8f62b347a18e193d0aa83bb48f6d13c6cff

See more details on using hashes here.

Supported by

๐Ÿ‘ Image
AWS Cloud computing and Security Sponsor ๐Ÿ‘ Image
Datadog Monitoring ๐Ÿ‘ Image
Depot Continuous Integration ๐Ÿ‘ Image
Fastly CDN ๐Ÿ‘ Image
Google Download Analytics ๐Ÿ‘ Image
Pingdom Monitoring ๐Ÿ‘ Image
Sentry Error logging ๐Ÿ‘ Image
StatusPage Status page