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

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.11.0-cp38-abi3-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.11.0-cp38-abi3-manylinux_2_31_x86_64.whl (2.5 MB view details)

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

qsharp-1.11.0-cp38-abi3-manylinux_2_31_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.11.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (4.7 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.11.0-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: qsharp-1.11.0-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.11.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 b7fa134be1bd5b1becae461234b5db893ca389296ecca0243034a59dd9691157
MD5 e8b13b58bde2d70bfecccd19cf32dddf
BLAKE2b-256 b90b80b819c682943bf7ec88e4b217f1d99e1cf0b83d890d77ae8a19e771a957

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qsharp-1.11.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.6 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.11.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 94c2a4b7c65d544c36f73f774c0e6815fc96cdf13d708d7371d8f2f54fc1d54e
MD5 4a916c2e7e51af6ef438af0431be5dcc
BLAKE2b-256 814cd9a69ec5e12b263e426679269def8cd0d6afe36251e9c7119ec1aaa33284

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.11.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 8d73b90cd7e88923e958ad738be8b60943fdb2232903dc4e762c3c9bd03c9037
MD5 3b8476e217847982fc6643e17adb0e4a
BLAKE2b-256 647f6dcd05157e6b35c11a94a94deabc8a247550077807fa86ae8ed3e63fd790

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.11.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 5756d6f1539768a83d3479ff2056693b920815d245a4dc6dfd691f46fb9a2c8a
MD5 23e3f6b42bd2dbbe42c846a2348ee14b
BLAKE2b-256 99b6d0f2184096ce4080b3a6e2db9d81a6855b56da81dbb875451673416b1edb

See more details on using hashes here.

File details

Details for the file qsharp-1.11.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.11.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 5d2be151293b39bc605386205aad29d0d8983460afb1bfb0d10d5be076a07108
MD5 ebd31fffebb363a36732410aac0266fe
BLAKE2b-256 340046eaa2ad536330cd2ccb451a58b82b56c0211ddf6f8e8d429685431734f9

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