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

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 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.4.1.dev0-cp37-abi3-win_arm64.whl (1.6 MB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.4.1.dev0-cp37-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.4.1.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.8 MB view details)

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

qsharp-1.4.1.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.4.1.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.3 MB view details)

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

File details

Details for the file qsharp-1.4.1.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.1.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 1c466f04a29f494c53bcb587a4ba70744b7b4d0c0b1139fe02fcc1e05438ee9d
MD5 c131eda9a8b080f46280368b3e928467
BLAKE2b-256 ffaebecf51d80e6878a7f7484a375b68e762eac7aba33cc5548bfa1b6a1cf09f

See more details on using hashes here.

File details

Details for the file qsharp-1.4.1.dev0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.1.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 433f228e1924df6ab0e0b28ae2780bdc8934d5daea64b47041c6e1972b44dee4
MD5 08ea4c29828da628fbf2e808690073e7
BLAKE2b-256 6c7849f4f197b81ccf4c9d94cafcaa242df2ee9f8f155ee10d7c4eb294d0ba8e

See more details on using hashes here.

File details

Details for the file qsharp-1.4.1.dev0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.1.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 f37106e968d31a5f3e2b48cb0c775e2148ce7804ffefb5efb21859f3ef22d2fc
MD5 83400a8df4ef9f6df81740e3f36a3fbc
BLAKE2b-256 f0be24c7ad259a040491608ae1480fe13283b9780660fec71b5aff1c342289c0

See more details on using hashes here.

File details

Details for the file qsharp-1.4.1.dev0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.4.1.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 b627c3b82ce0e05bbf89fb104b5333bf6c24f0af8e516ca1518aadc2a4c27413
MD5 a1f6a2737eaf03d30db3a31b5f965bb4
BLAKE2b-256 e697b64c68c529222dc4d9349f8a6b9084e7a1de10ce6b845ac03a93f6cf4e3f

See more details on using hashes here.

File details

Details for the file qsharp-1.4.1.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.4.1.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e2d49eeba74602e61169d01c3814b2ad060e30f8529a69d893da49d1f05a7113
MD5 9447d51976db233b128e2fc96f0b8a41
BLAKE2b-256 7640e0418e7a16520e9d6a8609a38f6ce269ddca4133a0570101b05dc55e0302

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