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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.4.3.dev0-cp37-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.4.3.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.8 MB view details)

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

qsharp-1.4.3.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.4.3.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.3 MB view details)

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

File details

Details for the file qsharp-1.4.3.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.3.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 720544f3fc4a1c7dbf926d4df8861aaab1b885202087a0a85a1b6006ba6b0cad
MD5 9efa12606b1afe821db0a5b9dcbb64c1
BLAKE2b-256 d12003adb91db64c134229140169554767e0956f313b52932873129886de4282

See more details on using hashes here.

File details

Details for the file qsharp-1.4.3.dev0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.3.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fc9bb46aa99c6f1c736aa6e76d4b2a36c071766775dfae9059d1485a16518b53
MD5 b3534a7a6c947f3bafbff4536d6da6b1
BLAKE2b-256 46998f429196d092c4d70525e7b91cfec2d4f6183ace51b485dee2b3518d4e0c

See more details on using hashes here.

File details

Details for the file qsharp-1.4.3.dev0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.3.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9484154490eddbef6c50ecfe78acc9744f8f7bebd730dc7c266ae0ce8c211edd
MD5 91254f7bf44dcb2f712610c80a0ff0dd
BLAKE2b-256 8a5bb7e5110151c6e928ee498d080309e2ba659e939b3e75e2f7e0bc955568ef

See more details on using hashes here.

File details

Details for the file qsharp-1.4.3.dev0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.3.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 cd9dfd078c143939f3e650d87672324e5c86c69c84b9f6c0068916dc95e7f404
MD5 a0ade8888c1c9a906fd8821ff4386b17
BLAKE2b-256 d18ed4b499b5ae46b0e24c39fded1dd368047d30a8a8df08e32565d8d49f102a

See more details on using hashes here.

File details

Details for the file qsharp-1.4.3.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.4.3.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 354a6e696ca69078c4dc961f9595a99a6c11c40f23709d48beed1019a750fa84
MD5 1c12bc004fa14578281f8294c401b030
BLAKE2b-256 bcf22cbc9183df097cfeacb1f85d54b699cf117bfb151ce5bcce8ed08474f172

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