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()

Telemetry

This library sends telemetry. Minimal anonymous data is collected to help measure feature usage and performance. All telemetry events can be seen in the source file telemetry_events.py.

To disable sending telemetry from this package, set the environment variable QSHARP_PYTHON_TELEMETRY=none

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

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.10.1-cp38-abi3-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.10.1-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.10.1-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: qsharp-1.10.1-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 2.4 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.10.1-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 79e0ba95fc68e2b5b3385dc96d31eccc4c90fa8ccd15c69effe4833056d8d262
MD5 140c6d4a7fad1f9d7de69c8f4fdef693
BLAKE2b-256 8864c2b052d14446fa7b3f6ba7967441f851c01516638dd8fb27f061385d55c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qsharp-1.10.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.5 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.10.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 62752b30b7ec2ec9291e8acfaff1fa182b5edaf5c2fe66f0c36aafcd5983ebf7
MD5 8bfd5dc653a981b8cc5495f3f90cb148
BLAKE2b-256 d13b6d3da03ff5c6feb5f9c27c1b6da374400af75ddce2f02b6b89c35e679ec8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.1-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 e4988ae1d41088f3084f339945ea7bf6d77d537791b97016802187963c26bb1c
MD5 cb56c002a840d407d6fa853ae5aa5de1
BLAKE2b-256 6b64b8d5de67af33844f0a753e9bc66efd9ffcef16d1325b40f7932333334eeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.1-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 da69516c5fa94063f9b7381fb41fcda05fc9fd01ea460b607df09f9126237421
MD5 ebc73291b75a881b3bfef8c2155c72e8
BLAKE2b-256 cca222207f871ef6412aadeb957d107329bd2b6e958284734b81b1903fc63aa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 0888e756440b0188428a37d243a786da313bedf8bc20924c9357ff1540bb4a8f
MD5 7c5705076c388cf534d32239c35ce8d7
BLAKE2b-256 9512e5428bba2a58bfffa7056d277484d4ee55f76ea0ef6d69779854a2a42539

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