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

Uploaded CPython 3.8+ Windows ARM64

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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.9.5.dev0-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.5.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.5.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 71f25b4b71801052c54a86895d89d1cf8eb2b633a78378bb250ffdf4fed0d9b1
MD5 ba496d3c4f54e0f41c89cfd7dfa304b9
BLAKE2b-256 73181ce4d88acd1dfeeed1f7323639e2206c84c15058fd339e7403d06a021971

See more details on using hashes here.

File details

Details for the file qsharp-1.9.5.dev0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.5.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 15c1a2f4eae71b2b7bec3bc06fe63fbbad03a238ac7983f3ff7ef78e4997512b
MD5 6b24772d667619fbe15a63038e5b6903
BLAKE2b-256 b92c233356c11cf1b556a344929424cb30d2d81e4479437f387071a3a576e120

See more details on using hashes here.

File details

Details for the file qsharp-1.9.5.dev0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.5.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 3cb29b40fbc6d87b70d40a5db4f57ada2440f82f48898881617cb44a3975a206
MD5 07ba88b0f44265266c9a71d94a655831
BLAKE2b-256 7f0bd74b83282bcc8f1ed0fd023755c5fe01e8b35817f1269e79b058ddd86712

See more details on using hashes here.

File details

Details for the file qsharp-1.9.5.dev0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.5.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 1155f468984f1b94c5c8ab607644ae0592d352fe66779bb0754a83b317a74923
MD5 367f7417886a44c66fb068267086e122
BLAKE2b-256 fd52e42c77181efb9259354ca400c8517392a2e6bd0787bd74370fc4a2f9fe03

See more details on using hashes here.

File details

Details for the file qsharp-1.9.5.dev0-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.5.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 5e96186111fc324f9c26e3d5a9115a7c2ba7bfb1b97e07806df9f478ffd2a11a
MD5 fb7f63b84a83ef1e112f936f9a421496
BLAKE2b-256 f362c36e8de8d5edd23bf41d4157b5b17543cb4a3d4514a2742156034f1f0526

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