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.1.0.dev0-cp37-abi3-win_arm64.whl (1.3 MB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.1.0.dev0-cp37-abi3-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.1.0.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.4 MB view details)

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

qsharp-1.1.0.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.1.0.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

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

File details

Details for the file qsharp-1.1.0.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.1.0.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c4046622ade10b5a61afce88ce1a27e3aad41820a5ac443500086dacd974d8f5
MD5 8f0db6f3f12aa8a0cd8d4dca3f5c5a11
BLAKE2b-256 f0b07267dfa491ca34ea0a0d109ebff7ecb0e1cf887a5ae5ffc9d71549f289cd

See more details on using hashes here.

File details

Details for the file qsharp-1.1.0.dev0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.1.0.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 327c9234617fde55d7a424b67f3c906a248f396cb2b79e7448713576deca639f
MD5 cecc9461879b3968903062b49e102374
BLAKE2b-256 5c941ea4839b33fd72855c71b73621dc1c98bff57a7aec1a4da0e79e2f5e5de5

See more details on using hashes here.

File details

Details for the file qsharp-1.1.0.dev0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.1.0.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 03a159270534e5b519165c9cada1f2603fef8d5106ff04f6bf51530a8decb9d8
MD5 1c7806ac5bc32e1a5bf5557f62dc1d10
BLAKE2b-256 60e3fa4d02b3d196e5b3a9a0cea43d2c63b8b0e1d87a5cdde5fe2f035ca26b72

See more details on using hashes here.

File details

Details for the file qsharp-1.1.0.dev0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.1.0.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 5ba05db7f83b869ea0bd850fa81ba46994c2c60d072874b767dd4a66896c8659
MD5 f125277e84f89753cf5413d78169b8d0
BLAKE2b-256 c14d7af72b752219c022f50971c48ef0c0f947a8942575eeeda672f5680d8e0f

See more details on using hashes here.

File details

Details for the file qsharp-1.1.0.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.1.0.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 02258130b0c1cfc44a9b50a58b872298f721953b5cc79a2cf6ce6393ad58ade4
MD5 e7ec0d3a91012e23b90f213569932465
BLAKE2b-256 3165ac7610ba89f41c3897d34e58f5b0eaabaa9f5e4623540f1a684c05e0ef99

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