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

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.8.6.dev0-cp38-abi3-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.8.6.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.4 MB view details)

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

qsharp-1.8.6.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.8.6.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.8.6.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.6.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 6ed92bd0e0963962a2d554feee8005fb21d03df66e65f6971e85c390c1862493
MD5 58185bd71d684f39c2c3ba0fccae002c
BLAKE2b-256 c0f5dd0b93aa8e82c35780cbba12474fd70c58b452691235bf0a7347647135fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.6.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 56716d322b60bdecb4d814a1f08c28f40df57ccae70ead3026b5a80d9b558551
MD5 ed148889df092390475b8b81d1bdeafe
BLAKE2b-256 582e7e65bcd82820ebe2373ae3dfd16639edbe6ec4517d8c678189c0746645bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.6.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 c50e172d4eeafec018f25ecdb9c5589d6a6245edda8c47c84796643715f045f0
MD5 8e3c2e02adbe84e50518eb15d98ab98d
BLAKE2b-256 5fe8269545a197276048c98e05e1dc011c0235b3523636e994fae65080dd30db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.6.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 20e2a7be6c716ef3d15cc416ad3f65a616fe729756ed0cd66ce5d09c30fa299f
MD5 fb8ef66e7fa15bc258deff50445805d2
BLAKE2b-256 b5e9106173daabc2618f5e48c081f7b476888d35f7dab7d93c0540510b263cd8

See more details on using hashes here.

File details

Details for the file qsharp-1.8.6.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.8.6.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 a0836232fc1f89f54becd59a9bcfbefa806183270e9632302cc302315cc81248
MD5 f4b700b46264afb78158583a95e40a97
BLAKE2b-256 4e0e429dd8ea9f0dc9c626b8ff5db16c99916c7c5d65460f0d400a6824479597

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