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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.3.4.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.3.4.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.3.4.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.9 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.3.4.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.3.4.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 e900e7e3587b63d170b7b4735584d60b0d5aac69f3f6d91bbdbaee1804abdc7d
MD5 107842ed1fee667b5641acf0bc7c8e66
BLAKE2b-256 8c637ef19394394b24feb07cbbf20cd15f449a881204245443e09246c06a6774

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.4.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f3a009233101b479fbdcb078d26d6075d9d6fc87306b37205e2086f3b5945be3
MD5 5a4d636218d0368267470d5ab41f13bc
BLAKE2b-256 829fa213432ae3d0620ebf43d56f78ea97dfc8fe1a58e642fb0003ea7637825d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.4.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 91f080bf29929a043732807060f0b149ea86152403de2f16323407cf06c19684
MD5 dd5e3d79663dae8d5cf1d859d89b4091
BLAKE2b-256 745b0e8ed7790b674673a30e95ff5ef2696afd3dd1ecd09d636d5a89a8caa9fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.4.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 e5e8617a5f0d1bf062e3c6ee09f83703a71d7ad9f194ad873c423b302581a49f
MD5 492cda1b5426faee233f21e8ddc1ddc3
BLAKE2b-256 d034560b19f36a082e48a81ea6c16904baa8ae0eb6126d18f9e3024accc04ead

See more details on using hashes here.

File details

Details for the file qsharp-1.3.4.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.3.4.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 0006b8005904e54c2bdc275a4c17e8524a574a1bc7a39c7d0cb9fbfafd816c6e
MD5 c84aa9f0eff7e4b868f77b4ace8ef0df
BLAKE2b-256 4498f7ff102f7a3b84000c1cc81c4ba6809959629aa28a276b740fa605aa987c

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