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

import Std.Diagnostics.*;

@EntryPoint()
operation BellState() : Unit {
    use qs = Qubit[2];
    H(qs[0]);
    CNOT(qs[0], qs[1]);
    DumpMachine();
    ResetAll(qs);
}

BellState()

Support

For more information about the Azure Quantum Development Kit, visit https://aka.ms/AQ/Documentation.

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.9.3.dev0-cp38-abi3-win_arm64.whl (2.3 MB view details)

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.9.3.dev0-cp38-abi3-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.9.3.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.5 MB view details)

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

qsharp-1.9.3.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.9.3.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (4.5 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

File details

Details for the file qsharp-1.9.3.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.3.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 e229c3452af0d889c6e70c105d6e67a4ac21cf788c3c910a96ce256add0e436e
MD5 916684a3534223f0adc7a25fb17257ec
BLAKE2b-256 f6759fcbba0bf65b0302992b82d23dae5aee287fcd9e099f42046afa191090b3

See more details on using hashes here.

File details

Details for the file qsharp-1.9.3.dev0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.3.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 115ef0f7743f646a16b7c008e202f8ba070f9704e07c869f786c228c07f5f103
MD5 c284034157942b75d1f6269a9c84edca
BLAKE2b-256 2ad66bfaf787fed595c46b40b3697980f4defe45f5f35a862d640943ed3e8aaf

See more details on using hashes here.

File details

Details for the file qsharp-1.9.3.dev0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.3.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 8c493829d28a11744ee381c8d72b6154bb50f1a86ea474a7dfff5dae004e398d
MD5 6817a04a8aa22c3bfbdf291d34211111
BLAKE2b-256 1a703cafb0d9d75d69c5cca705cb77de7dbe0530f3e5b5bbb67a02b224be4a0f

See more details on using hashes here.

File details

Details for the file qsharp-1.9.3.dev0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.3.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 79516f4d6e68e67c08a4576626f21fce6e933db5123072362860b9132d60d613
MD5 f1e4fa0ad124f19c85a7c7d28a924b17
BLAKE2b-256 659b37fe6d56b1de3dd535caf8ba55d5dd8c156577cda63224ea790e5ad1b0c8

See more details on using hashes here.

File details

Details for the file qsharp-1.9.3.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.9.3.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 9a098e0e16561162ece9787063c4e92ebfa3bfafa3cc4e980df472b33a07284f
MD5 2f6d55115ed8e97b8c20a86317bbe64c
BLAKE2b-256 d4eddfb36ea615376ba4edf9801ac8789d66df579a50e1a151750b26490b1943

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