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-lang 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-lang

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 documentation and to browse issues, please visit the Q# project wiki at [https://github.com/microsoft/qsharp/wiki].

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


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_lang-1.0.22rc0-cp37-abi3-win_arm64.whl (968.9 kB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.22rc0-cp37-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.22rc0-cp37-abi3-manylinux_2_31_x86_64.whl (1.0 MB view details)

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

qsharp_lang-1.0.22rc0-cp37-abi3-manylinux_2_31_aarch64.whl (984.4 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.22rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.0 MB view details)

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

File details

Details for the file qsharp_lang-1.0.22rc0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.22rc0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 1ed08223839008ab9ebe5f7b736fc5b7e47953a7fea68a27ff5d27a5749bc33b
MD5 3b2c64013eef0b848a3eb1388d5a1013
BLAKE2b-256 b8e16d12334f2c291559cdb31a04ef14027ca217049eec5f9cd1dc93c8c1e36e

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.22rc0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.22rc0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e2da4ef13d20b86afb2bb8af1525a0acb61e4b15a5a18c06d44973e30ad5eebe
MD5 4e67d5bf9f56927fd0a8666880da75d0
BLAKE2b-256 88fbc01a73801a2405983422e619d69b385caa310576b1cadfcfb6dd168fe951

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.22rc0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.22rc0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 1d4d14fb68ec48373d1a9f369336227e598384ce50562e60e104fe01ad04447b
MD5 9104eb330f2f07a32b4685df8af93201
BLAKE2b-256 69d04942952b4d292af78032325863858b5455276a59ea7c3c4f58c6a824c878

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.22rc0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.22rc0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 0e4439d564bf5d0eb67fdea2556e134ef2346112bfa90fc5ad6da98b27b6e8f4
MD5 830ff27866db6a810d27af5c90f1db69
BLAKE2b-256 25c46126b648e08aadccabe57d3c0493bc281d2cc76e4b3a3e6630d4ebb3ea05

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.22rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.22rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8b8a733d6f646763adae0bca4b2a29c886e82b72cfd7fd75634002fc5c59f045
MD5 122d302693fd25d49e5a8bce60df7930
BLAKE2b-256 ab216e1fa645eacc028788cd1cec208ccf413c16ae9d706aba3f22b91c1ce351

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