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-lang 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-lang

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 documentation and to browse issues, please visit the Q# project wiki at [https://github.com/microsoft/qsharp/wiki].

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


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_lang-1.0.25.dev0-cp37-abi3-win_arm64.whl (1.3 MB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.25.dev0-cp37-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.25.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.4 MB view details)

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

qsharp_lang-1.0.25.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.25.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.6 MB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file qsharp_lang-1.0.25.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.25.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 754467b0eced0f9fe96160bd04a8f7f9a12fae16f4b6d52e5977ddbf4c28040a
MD5 2e03abd01237cdd74c04df4939cb6f6c
BLAKE2b-256 d3202f63ee4fe4c0e37f60e022b46e6c4ad829d0d9287e71195bc98d015e2a8d

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.25.dev0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.25.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b4b3ab25eb593e1e85baa25c2bb2908ab0776094c68325e554a14cf9017fc0b2
MD5 5fce7bec100819979e894de2da58cdfd
BLAKE2b-256 84b4191f19b96d0b26c86548dcfc3bf50587445eb90ae1c62fac012d3234922a

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.25.dev0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.25.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 a7a695db810705556009c978b6550bf42174cbb88a99364442eaa56493b79657
MD5 29266bc7563c2f44855003ee70396cb0
BLAKE2b-256 2ca7f9293d74f82c3b8bf48809069c8917e05182790eb55310b607fde116e40f

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.25.dev0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.25.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 50c8502b21a4ffa08721fccdb4fcba756b0c13a00da7740c04ed68fb0ec0ea8d
MD5 4bf76e172725ebb09b72ed57d3abd900
BLAKE2b-256 b289e45d7e0a6d07199be329e6762eb8dd023b705f39d9617710ace30862bb48

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.25.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.25.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2191675a820b1e24200e0e9b0505be9aefda9a3854022d6a61efa4dc00cc444a
MD5 68dc546428e9679253643bfc47ffc2a6
BLAKE2b-256 ec23afe8feede8b9b94140be025a25d12828919077e1121656391f364d1a51db

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