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 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


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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.0.31rc0-cp37-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.0.31rc0-cp37-abi3-manylinux_2_31_x86_64.whl (1.4 MB view details)

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

qsharp-1.0.31rc0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.0.31rc0-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-1.0.31rc0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.31rc0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 7b6659f4cfc0ec088d3af0807d4c650d103536293c5fbc43c44456d67d043a72
MD5 4f2752034df93c0efd3e20c102722621
BLAKE2b-256 193704a5576f4c42951ec51dde8991b8b44eaddff41a2abe70bcfe8ae0a82da9

See more details on using hashes here.

File details

Details for the file qsharp-1.0.31rc0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.31rc0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9a2cff65980616788c03589904ec839584ccfb387e1546131f70ec486dc6b85a
MD5 2b818dbe01242c003b976649e335c852
BLAKE2b-256 9a90ac986ecc1909301831cedd02e8a30a4cb502598b7e6df6ad6f333553d1b3

See more details on using hashes here.

File details

Details for the file qsharp-1.0.31rc0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.31rc0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 aaf8d2eb4d1ba5161e003077ba92cdc5acd12a5f6049d4ef25a7f8059db763ca
MD5 195a99e4e490a5684f034aae61e2e227
BLAKE2b-256 c8e9d94f78686b8c7ac7ef8fd0fba22ab05cb7b4adb47e972969b3f3b0ab5f8a

See more details on using hashes here.

File details

Details for the file qsharp-1.0.31rc0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.31rc0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 87bd165f05e07c10c47e4a5de0069bb584b10145fe1b3d3e5b2aceeb8e4bb5e8
MD5 ecdce839c03cc31bd202557125f70260
BLAKE2b-256 180576e14312a1468fe621321b5bc3d0e11fc54d128bcc3c17d06fc9987b08f2

See more details on using hashes here.

File details

Details for the file qsharp-1.0.31rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.0.31rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cc4da6fc8ec8d41d0f3edd02b829434976f9b7ee3b119c0c1f40417171026746
MD5 03f7d67dc10d72611af41177fa4351d2
BLAKE2b-256 287c2f1adf4f982e8fa99ee0b97d7b2cacdab9870cf7866ce72577c0cb6bb3c7

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