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.21.dev0-cp37-abi3-win_arm64.whl (969.0 kB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.21.dev0-cp37-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.21.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.0 MB view details)

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

qsharp_lang-1.0.21.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (984.4 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.21.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.0 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.21.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.21.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 990be8aeb868a8ef49935360c0be69ae810800a45b47cb15bbd4695ccf724fa5
MD5 65d5b1dedf64ec1071a4b4d86e6a4c12
BLAKE2b-256 62a387f9a11965b4520384e56c9bce1aa0be167ee35582ca024dd16e07fc9489

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.21.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 107d0ac11aac37a6ff07b2a44aed1d38abc42fa540ccef3924daa61fd8de6b2a
MD5 a5bd3b5907cc97777c3d9cf22ea18e7e
BLAKE2b-256 99e41eb1735e30201c35d4a3d46c0a428fff8d171f89c3b09b332b5388f4ffcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.21.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 9dfc44eb6042994988fc4ad5660e179245e087ab4a3a53bc1b87eac1d363676d
MD5 205ab0a9a21965af7ab5b3731534f141
BLAKE2b-256 1bb954c77c4f9ac6b8228d634af936670a08c1b0c2f734505b96cb60fd6cfa3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.21.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 be287c5ad084df77249db1f6e7bb655fa48085ff8f86e3b9839c807043b8e156
MD5 9dddace6c90f549d82ec9cf3f1a9d88d
BLAKE2b-256 cff9299898af47fc06c210831baa8b0b26dd07df05b02ade96260f9c61d4476e

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.21.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.21.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d0c00eb95fe779ae4093ea6f554a32f11e361b484b5bfb298d6225794dd03f55
MD5 2d4b6d9be766774564d4067c0a82c85b
BLAKE2b-256 4a3764005e01f5f21816cdfb9c13049cca93c61bada4e66640a4f0ad05194718

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