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

import Std.Diagnostics.*;

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

BellState()

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 QSHARP_PYTHON_TELEMETRY=none

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.10.3.dev0-cp38-abi3-win_arm64.whl (2.4 MB view details)

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.10.3.dev0-cp38-abi3-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.10.3.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.5 MB view details)

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

qsharp-1.10.3.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.10.3.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (4.7 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.10.3.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.10.3.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 7f7a3581d036aeb764ad0239fdc780bb923ba3670468987dce9e6d08d4147c60
MD5 10cae29d7d0bac4a19a36d2c93c65eda
BLAKE2b-256 7165c98fe0ee77866dd229fc287793a0c3b3158f76404de1c9d87de77eb2a514

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.3.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 099debcabf04f42a2fcbfae983db297d45fa834e5be890e462fe2cac0196a780
MD5 217baf550f5a5eb30a1aca43c3a523a9
BLAKE2b-256 4c6f8b2df0b59555e60b6f5127b414d992d45b10761ed4a44f63f3fa624a8f3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.3.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 e51baf37575856b98377992e812f7905a597fbb9ec8b99015082c39c22bcb919
MD5 47e5a77332291756ca468813b718411f
BLAKE2b-256 5b114d391cbe1c9494d638013aeafc6336b81b3b413f51250163457d6fae2ad8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.3.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 2f8b7529d513ed1aef54f7b984907845778430bd794dd8b24e8e5f1ef355ff45
MD5 707ee430062e31f0087b37461cc6e436
BLAKE2b-256 fe179dc621e7a6efc66904af738ff001391a89a5674eff0a22fde5dddd83f53d

See more details on using hashes here.

File details

Details for the file qsharp-1.10.3.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.10.3.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 20fa6b6969d7ec5ced7bb5d7e1fe6019dbf48e7de561389e03ae4d89ab82444a
MD5 07b73a3973e195bca7c3313a270160e2
BLAKE2b-256 e7ee6689b3c4f45bcfbd5e44ce6b936a2557f6b0613b67e056356cc1afafca14

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