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

Uploaded CPython 3.8+ Windows ARM64

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

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.9.0-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.9.0-cp38-abi3-manylinux_2_31_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.9.0-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.9.0-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: qsharp-1.9.0-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.9.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 e6b76ebcc44e14eedf4243ff6e8daacbd6b5e47211628a5a581459bd62ec33dc
MD5 15ccafb6c4c3c896d89e03f2c869e093
BLAKE2b-256 1707913b7b5ddc51fbcca274495cc3024a4d7f2ba9837a39876c84175f182875

See more details on using hashes here.

File details

Details for the file qsharp-1.9.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: qsharp-1.9.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.9.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9dfd2c462a587665a8f760e461b644149fdebf30f7bbe2bd3a39f2dc3cbf6721
MD5 98f2135c9f99f6338e8fe5bbed689bfc
BLAKE2b-256 b6f9b1c8812d9916678ef834aac6dc557be5ac5e22693ceef12ad9d2158b481a

See more details on using hashes here.

File details

Details for the file qsharp-1.9.0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 49bcb2f14a44da010db7f36b92e85113f98c3d7669f3420af6236e8bb4c15b3b
MD5 cfe4e97deb2f9627d4930b3794441dcb
BLAKE2b-256 120c6f72fe8da05357e519707f1bb16676ca2356392630791d40eda33a7a06fe

See more details on using hashes here.

File details

Details for the file qsharp-1.9.0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 c5f77340c52a70d1a0f712086ce3fa7f88d089253cf72c3ddddd3aed9680e467
MD5 96daa71d9af7340d0bf0df7118a7f6ed
BLAKE2b-256 fb9dc36a80c882fa2307e9aa12e8d1134448bbea465434e2c0b4d6b9d29d4271

See more details on using hashes here.

File details

Details for the file qsharp-1.9.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.9.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 fa9f4b7dc5aa3ceca64387c411a7d9d80e8cd72f6e269d356374364e8b6ad6a2
MD5 1a6b5fe9a6b3808dc600d20a087cd958
BLAKE2b-256 3edcb119e958f649507fde98dcba2f444669f12c3fcd830e32b7242a4ef0840a

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