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

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.6.5.dev0-cp38-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.6.5.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.0 MB view details)

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

qsharp-1.6.5.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.6.5.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.7 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.6.5.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.6.5.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 d728ae4af83efbf5288d09bff4de6f878f5377e050ce733d26c93846267cce6a
MD5 d83bb3d5a96e8b2d683211c894d6c569
BLAKE2b-256 8c2996e945a61c2828976af6163ae4d2438f65444ed66f59d614ec26edb62093

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.5.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4cfebbd071022b3b6911f5715c9b8eb4c7c5ff48483f5d802678028fdb4ac744
MD5 971f7239d03081338408e3a5815b7719
BLAKE2b-256 7dccb0e60839403b9a9e57ca9d7f0413023bea708d90840be47b1febe49b841d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.5.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 32dd08fd99bafa8ee6fc3ad561071d4cf2dce8315c15c11b28a019cdc9f97028
MD5 0c706f4a57d939f4cc582931180b1c0b
BLAKE2b-256 19d966585ee28bb014cb78344cc78ec1570a61743610e40d7866f208fd84bd0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.5.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 ad657895c6b6a553e83d814b1884d22388f253b116f2b28b7f85d584e623aeef
MD5 898d153a69c8d45b474b37e1e506e72e
BLAKE2b-256 10bff5ec265aa05101e86ab2ddb47c6918b99f08d81798f0b91fddf84c239b50

See more details on using hashes here.

File details

Details for the file qsharp-1.6.5.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.6.5.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 b1b0b54214a412b34ab17e22971cdb02d7cdcf25104d34476a94857899385e36
MD5 bb79aa2216453814c204423e1a512801
BLAKE2b-256 06a8808681fbb4d538b180c1facd179836eae837f36fb1d7a87695b4c641389c

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