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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.5.7.dev0-cp37-abi3-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.5.7.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.8 MB view details)

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

qsharp-1.5.7.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.5.7.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.4 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.5.7.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.5.7.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a0cac1b76e46af6a4a14cbd740065c9b40293263fc17c82c5240747721cbd0d4
MD5 78f201b2df879392e68076843467bcab
BLAKE2b-256 61297172084064f9ec1dbd0862d629c065f00cfc2142b04379ae743d3f348c4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.7.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1057531ab5156a5d861d09abb478030eb6605fdcc7d31945e599a9a9974eaffd
MD5 5b3697c911d59670e905717f4e28c0ba
BLAKE2b-256 d3f59ddc8f5d0785fabb679d587d64c40cb40b3fa136924ab4745222f4b2366d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.7.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 fff66b23e1396c16ea7d8b9002dfa6ab08320f05a182a067df3fab9a992f0c6d
MD5 b35c6680efb5bfb501fe11cd5a6fec57
BLAKE2b-256 121a143e6dc24753cf6574630ebb3ca04a806d23076d9672165a1a6719beef59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.7.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 8bac0cf5757bae27fdeae804f1007164c9c3df1566589b07cc8433da53cf954f
MD5 3e19685fb5eece13844b7832e28ee5d2
BLAKE2b-256 2f8dcd8bb8bb3b31ae89f4f25fc701a09b74abf3a57bb2eaebf5ea7d35055b99

See more details on using hashes here.

File details

Details for the file qsharp-1.5.7.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.5.7.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 f95262201485d9a838b601b9bb5eebb60d14271f1aad31e1dd72b0ad34f96a58
MD5 015f018d921954b4e3ea6639e906cab1
BLAKE2b-256 7ee0ffc6f18550e57f3ca7d2d4d413cf276d076f54eda47aa74cc5c8e915602d

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