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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.0.34.dev0-cp37-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.0.34.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.0.34.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.0.34.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.0.34.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.34.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 41d1c31d381baf022088f001527b2ba82fdb98886142055498d8eb72a0e18f2b
MD5 bab8054782c6fec9525aba95ac0fd29d
BLAKE2b-256 2d92e6255ca8450969c8ec1e9cb55afeb2e8010ec9c051c83fd854e7393dfc1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.0.34.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 528967f62d06847c658fba1fa6d56618f9aed99c8d3f6c703a05b9508727062b
MD5 a1f7fa4f3e0476be7e9ec1988f117291
BLAKE2b-256 c5d3d2ed9d66ca132d3b938b249d3bc101de74593a854d73bf1069677aa5fec3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.0.34.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 4ad1b1ecb7daaf2ee884b6ef062df53bd00811d3245f913f939569fe76afddf9
MD5 853a269f728e7a25d5aa18a2eb7721fc
BLAKE2b-256 f29cf5b3eaf49bf0f162c19f1d7acf980a00c4bbc4e63c1e639305afa016d50c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.0.34.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 60190696c5d3715a9a2ce44b41bd70a991dbcdd0363ab70d4b23d954a89d7bd1
MD5 0b9f78428872b999b1af9bfd2c83c435
BLAKE2b-256 936df3f16c4c9680208ca0fbcf9f865c938e0c7a7d131ac078e18f7fccd29d2e

See more details on using hashes here.

File details

Details for the file qsharp-1.0.34.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.0.34.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d0f2abafbb6f123989eae893b58bb6b9e86b0ad80467350a1ce0bd9c65f5e0f4
MD5 bb2ccbbed61cedf8d07fe4a14910194c
BLAKE2b-256 58d2efcd7b31d879e934cd7fc0468f68ffaf3c0cba919bb6a5847b1dfd241bca

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