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

Uploaded CPython 3.8+ Windows ARM64

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

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.8.2.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.2.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.2.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (4.4 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.2.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.2.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c6b06510fbdb529db30852813ffccfcc03c0e6f0a018083422dee8214a6714b3
MD5 0f375211cf33408b34e97196c8b42a1d
BLAKE2b-256 f0835070846d013da275630ab1580d156ff77d24948d9ac4c19950eb4f61c58d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.2.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 90f34fb5e2e7eb0a4e7768e66ee3368553af86618cbf6e395fad0222816c4c9b
MD5 624a3d1ff5d0728bafce0d760f487d23
BLAKE2b-256 9847f9a1dd953da3fb3321446a18ef5ab18cb8c874474870b06e46c0d1a719c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.2.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 305b99beaed3b42b383e2bcaf9a4923e4a6989ddfdd9325d21dd5473641d6c6a
MD5 c6788f23676b5bf2684736b83427007d
BLAKE2b-256 4d1abf8bbb31930a69a2348911bb51025e9f96d4be0fff240cffeb31b9b964aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.2.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 f5c8b3d721b4814fc3f64e005f47d87d9fa4575dc92dd33fe0152ec947f62049
MD5 d6c9ac8d0e15149de4529ae4b31b7805
BLAKE2b-256 1e88162dded06b3f0893640b2278e040d83fcdd91973f9923d1bc0bd0e0c9bdb

See more details on using hashes here.

File details

Details for the file qsharp-1.8.2.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.2.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 3dfe6521908a0142f4f4d99050b9067a2734b2d18c937a4ffe405cbf92e3f0be
MD5 d26848132381dd4b09bb526f87f1c628
BLAKE2b-256 390605b0fb5729db3f67ba2554c388ce4c2a486b7d1b2211e0fe756582729d95

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