Skip to main content

Q# Python Bindings

Project description

Q# Language Support for Python

Q# is an open-source, high-level programming language for developing and running quantum algorithms. The qsharp package for Python provides interoperability with the Q# interpreter, making it easy to simulate Q# programs within Python.

Installation

To install the Q# language package, run:

pip install qsharp

Usage

First, import the qsharp module:

import qsharp

Then, use the %%qsharp cell magic to run Q# directly in Jupyter notebook cells:

%%qsharp

open Microsoft.Quantum.Diagnostics;

@EntryPoint()
operation BellState() : Unit {
    use qs = Qubit[2];
    H(qs[0]);
    CNOT(qs[0], qs[1]);
    DumpMachine();
    ResetAll(qs);
}

BellState()

Support

For more information about the Azure Quantum Development Kit, visit https://aka.ms/AQ/Documentation.

Contributing

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

Project details


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

qsharp-1.8.1.dev0-cp38-abi3-win_arm64.whl (1.9 MB view details)

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.8.1.dev0-cp38-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.8.1.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ x86-64

qsharp-1.8.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.8.1.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.8 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

File details

Details for the file qsharp-1.8.1.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.1.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 66c9b38bf91aa6ab7fa01f984eb8d9e50a0c5c523f22152407d3ed25241a2e53
MD5 80a12689fed2c4657a94bd49110e4abf
BLAKE2b-256 8cc1187c75903e820621834a47e2877003a18b8aaf0ab33ea2be7e9a5cacac67

See more details on using hashes here.

File details

Details for the file qsharp-1.8.1.dev0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.1.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ace465da7f044595a143688c46f40146399aa1f847271d898d0f6583a7e0cafe
MD5 ae2ce3d3518e41530c1d258af01d67be
BLAKE2b-256 3bfe2c14de2c4077cc3249b4c2cc14ac8c8e331bd55a5b2185f0dfe5ec3f387c

See more details on using hashes here.

File details

Details for the file qsharp-1.8.1.dev0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.1.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 bfd584b79631bd9c866c955d0c8cef389901f682c071af4f0acacfc01d82b5a9
MD5 2f4724bfebc7c244a95290bfd4f5210d
BLAKE2b-256 705b7931d77858a68de32c9082a910550c09b409cbfe2e957ffbcd741c1a3a82

See more details on using hashes here.

File details

Details for the file qsharp-1.8.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 0e97f74dcb207a252a6536ed4e450b1a0698cc9f262341b02abbf0a5e28f28ee
MD5 7f87426a8fbe3aa3972fbf2ddc941517
BLAKE2b-256 f3818e97ca9f7f3b116290a15fd3d3872a540fc596cffc0408cd090cd890abde

See more details on using hashes here.

File details

Details for the file qsharp-1.8.1.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.8.1.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 8f1b0781bd8c7d6760b88bb08437950a50220f11c9ee59a7aa8740b0e7b8d203
MD5 fa51ad7f9497a578731a8068440506ed
BLAKE2b-256 18075f9c96e5e682df356002dcc8b16552931f0270c400eaeac277a072e85d99

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page