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.4.0-cp37-abi3-win_arm64.whl (1.6 MB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.4.0-cp37-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.4.0-cp37-abi3-manylinux_2_31_x86_64.whl (1.7 MB view details)

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

qsharp-1.4.0-cp37-abi3-manylinux_2_31_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.4.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.2 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.4.0-cp37-abi3-win_arm64.whl.

File metadata

  • Download URL: qsharp-1.4.0-cp37-abi3-win_arm64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.7+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.4.0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 d90a5323764e07f8986523403e852e6af20acbe15f71e0d38d45c34d5f515bef
MD5 4864f49af2f3adfcbcbcfef09f348f1f
BLAKE2b-256 c939bdd2f8b94d0087c77803dd48dcc82e0a4414f86ea00bcb347df48af6776c

See more details on using hashes here.

File details

Details for the file qsharp-1.4.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: qsharp-1.4.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.4.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3a00eba1dce292904c941588026584303364b1043dbd8425e20bf8680ba6a39f
MD5 9eaea55b2650233c5a92c4eb7b83e39b
BLAKE2b-256 b1ed39c392d2c838afa1acd800dbe6091733c85cdc4e6694bc9d892231d2c3c1

See more details on using hashes here.

File details

Details for the file qsharp-1.4.0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 e4cdb3a04db43aa923950cbee343075cbb7a9a52fe38eecc5c9df293d58be5df
MD5 19e8caeab572487793a333cd1150f6da
BLAKE2b-256 76dc205631b463ccac1270c95224732382911889593e94814ad4a1ef823bf8ef

See more details on using hashes here.

File details

Details for the file qsharp-1.4.0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 4d402c707a82b00f4fc222aab5ba3128849cc668d589611b2bb0addbfa098377
MD5 9b9cebf0185b58b36e3eea6e406fdfa0
BLAKE2b-256 081c374bb51085740eb7fb2766dcc9d1ef9fa1a5d0ac268399571bc72315c105

See more details on using hashes here.

File details

Details for the file qsharp-1.4.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.4.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 53adc1dfc83275245a61a1278f31c9992588295e46a96dcbd1d27d827bdcb0f8
MD5 64511bceab5dee05df2a1a5d1a93ca0b
BLAKE2b-256 88012f3cf2b313771ab1942d322dfc553fefaec14445599882aa13d6693b6b05

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