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

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.13.dev0-cp37-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.13.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.13.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.13.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.13.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 7eb4ce922522ffa3259b5fb62fc39fbde927263c1c09130d50ce98f63d682baa
MD5 abd113327f6eef836319212c4fd3c538
BLAKE2b-256 99ff9df620fd4aaa5005aaae7fe316e0f350673e943d3ac4ffd055b9c4780657

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 74f52bb5eac2beb02d03895ddc0297fa4bb80c1e20b182c8f8a755141d3e2d29
MD5 30b402195f7e54ca5ef09c9f78716a8d
BLAKE2b-256 3b2a38de331289a711177ee9c2ad0b693e4b3e5396018493291a1ba0158081bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 6cde70e772a84e89e16d883911972f6fb82b261d48992394b0e50d307ae6b5eb
MD5 c9f9dcb2a5b03270932e15a442aa0f54
BLAKE2b-256 9206489e020b1e83f50a3f9984e93682a1abbb11374258df6b39a29be6985180

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 309cdd7081cf97fc6837443aadb52b064aa007f161501334781036938028ac5c
MD5 5cdcfd2f2be5105206044fb55d777d7b
BLAKE2b-256 ca49095cc980ffbdd47c14b976aa17d1acda88ed0f5c423cc56697faba0e0a02

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.13.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.13.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6f355bb6efc467ed2e9a5081e098eba55b0839a5208d53365446565d18d190d4
MD5 f2b98c4ee12066ae21558f46c7159fe6
BLAKE2b-256 cf86c3a831000bb7c8620f4a98e926d4e4a024de944fae235a05771c25ab281f

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