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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.2.3.dev0-cp37-abi3-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.2.3.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.5 MB view details)

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

qsharp-1.2.3.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.2.3.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.8 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.2.3.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.2.3.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 cb00c1573b654c104b58d2da6e26e0dd52238d6da66c5132259c22f7d4d0d932
MD5 3747be397518886899cea2df33446d12
BLAKE2b-256 c0e800a4cfd7e6856ad4c0be4d7c1d38f9568916a5c5efbb8eb74a627f897692

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.2.3.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e46564f2d0c50ff2e7dae1812d3682927b7572a42558f3c9c9802b854ab6e57c
MD5 88ea4fba336383fa5b82d434a80292a6
BLAKE2b-256 1a3baca9420987f40cec0dbb7f808b068df861574ebfe789cbada3bfcd37c70d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.2.3.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 aa8664e9a7ebc6350de8772e1894cbacb8a0ad49394f88bc30a98abd47e883ef
MD5 3a45aaa93f127890bc67cff787b793af
BLAKE2b-256 bad84c5d0c861df635230854b038730975bab5aace75b2ba6da6c11f83796aa3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.2.3.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 ec168bb4fead1eea6afd24b63eb74adf443e886ac65c3323a95133d7e8df25da
MD5 6036e4d9290eaddad0ccef8e868299dc
BLAKE2b-256 7e3492ef18e56120836700705c08aec3be2a2fdfa8d930e05de67f8456cd341d

See more details on using hashes here.

File details

Details for the file qsharp-1.2.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.2.3.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 afe122682503abb8eb621aac5fca99a2826fb6c51b3d8d84b57d4afbfc7c28fb
MD5 a1927ff5391fb322bd60dbd933cf1bc2
BLAKE2b-256 2990dfa442a15e81958b258fc3c13b29ab861ec9983849eb05e6fbe4d631e920

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