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.19.dev0-cp37-abi3-win_arm64.whl (966.0 kB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.19.dev0-cp37-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.19.dev0-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.19.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (981.2 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.19.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.9 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.19.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.19.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 73a3b2c520608859cfb6d9ba6d4b5de4c4b5a53e368c9b3835eb98ced2321d2d
MD5 71a5e89fc0c3d3999624225a2e5eb1c7
BLAKE2b-256 d7cf4ac63b0b6161fd316b5f49461bf79f738cc14d03bb09ed06e9763773ce58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.19.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a5d550a76f0eccd6a8e003e01118f33e9bf0c3746048c5ea631b735b541c0398
MD5 818d393b2b6e3d54685bceee237b5b3b
BLAKE2b-256 1ef15b2ad3ba43a8181eca7e38d3f199606d9cba32a176a01839e2faf476d773

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.19.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 fb7c79b859d0946f0b96dde368044f54383f869b4768dc28d5b5c87ae3f45b62
MD5 3349c781202ac906491847ea97544b20
BLAKE2b-256 bab44b44a48e97fde0b803fd20a06b2e4f9ac1a07f8140fde20621a9dffd5d2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.19.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 b0f0da05684984394b97175620b21d09d0990ec98392d55ccb45ee1d70956eb8
MD5 9b0a0f02a494fa44e516ddd4134bef60
BLAKE2b-256 bd29d27522933f189d45716bd73b067e07a6bff8324d1067c31c0a4a5696231c

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.19.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.19.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7ea7f45dc3052581ace2683b6a369761d116cd944ca83375adc989e40337017f
MD5 9abd664ee0007d298b6f45cf53734968
BLAKE2b-256 01810263db0aa539c991d1b47e3d7f46c15710bedc70bc83d45e9d8b8b2cc4f0

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