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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.24.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.24.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.24.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.5 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.24.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 2038f0ec7be5845bfbf470078f672f2f06f525bbe314479dff334c4bbcd82f61
MD5 250e77303612bcd92ab162ae1b0339d6
BLAKE2b-256 e2f07e14eadc88e110697f365866de1d037fc55e7012075a85702929d80a8f24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a2feb719fa220e8a8e6f23cfbc4a16b38ccf112170ce1ddb7ab80bb461c6c7ea
MD5 a55679e975f36932caa16e7b79d6ce7e
BLAKE2b-256 f8110782c6964553e31c6851e5ca309e28c5f3c55f00948711013c537b84e63e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 81493e4c577fae2c16fc04b3d24c8ee6b610543ca828943952c9bfe1839900a7
MD5 530db91a4cc90a334685c8d4c387308d
BLAKE2b-256 7c3c0f941ad5c268a78706fec3f5a9687e43a6d3f6e50f076b345ef77b40fae0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 e06292819dafe56ef9d18af25c7bb5200271954b82c8a74920191730c69cab2e
MD5 c187d96d07c82a7fc1bdc6d9ad7474fe
BLAKE2b-256 1c0e68ef72a3a1a0f63c5863f1fa7b7c18d5a41fa65c07dd434ae6deaefc1cf8

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.24.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.24.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cb23c1e3feafa601591918cc5b18dffcd4329f99c99138e6028d3a35e370d0b0
MD5 c0a504d266379f50dd265b9712629766
BLAKE2b-256 5e20f1c26da779378f409e0145cb0cad9eadacbef172d08f307f099c750e0384

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