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

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.29.dev0-cp37-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.29.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_lang-1.0.29.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.29.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.6 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.29.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.29.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 dc66f64a4b000dbd8fcd0cb7b0bfff02544196fcecdf1db990e9879639a1eb0b
MD5 f142f003406983ce7f7de2882ab68b64
BLAKE2b-256 0fe7b484245637d986e011865be4a34914a92efae556c8d4237b01f880aae170

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.29.dev0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.29.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 88dd9493a7579ac225921d2f4cfeff8ce20e6dc058827ab338ac30390e713317
MD5 db56cd44a57a8df101fa858152e51dca
BLAKE2b-256 e435bde56bc9f87db7c00d123f016fa94e047542f394730a69ad2f4aa042f51d

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.29.dev0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.29.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 1795b1cd1ff95513688bd3bf0d79407b3c93843738c5b4adb6fa3dd93b004c63
MD5 8448ef9a3d479b920a2741ec289ddc7b
BLAKE2b-256 c1a38e72a84800e5e05f81e9e6dd107da30205a318b57e9715a55203a74998e0

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.29.dev0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.29.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 8fce61c8b4d807fc2dd6f27f59517c9aec9fd44a2441936e38eaad06e6e7cda4
MD5 4211bfcacc4e255f4b53aca6c51311a7
BLAKE2b-256 ca37d25d6efb5b13736bd9a86a1f891f4537b5738c9a2c52a8ba1bd0e1d80ec0

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.29.dev0-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.29.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ce5115e75046b2af3c4b69f4ca977c6b0bf991f94fbd10487b0efecce0d41563
MD5 e7136e41de964e1bdb51b0a9cd428a7f
BLAKE2b-256 3287b905040c4c084a471174efbda063a3e5fd8eef068b0361df5f6c3bccc3ef

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