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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.5.4.dev0-cp37-abi3-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.5.4.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.5.4.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.5.4.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.5.4.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.5.4.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 15a2619d2dd84c2851b182df91c87717a403eec25716cab5f8b0983406d10712
MD5 45e9730c05162744f0460d0315b464e2
BLAKE2b-256 913d1e509f0c41f82e54844a2786ead095434268cbf0e8e09f04977845e443a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.4.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 640a1890fd626c12f5e198c61f5c20f5d730d938bb6da98978f9fdaf80298bd0
MD5 3221dc17faacbfec61df16a818f8fdff
BLAKE2b-256 3f4d5cdb701e1abc44581a3cba058ca773000f0610e12f9f2ba78dcde3e6d31e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.4.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 7787b61e0f20f5c95e90ec39a2c57209752c81180742cb511f9b407d058e61c4
MD5 7b08c10cd5167479a9367b8f319feef4
BLAKE2b-256 f94a67a8fd9d11a115ad0d9e0fda21876eb2dd04c3ff60c53c085a6592e31686

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.4.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 cda883defa89f53e439f478c2447356e8f3f8a99dda60b18639bd1cf9486eb9e
MD5 2670f305bfea69cbbe18db9a7cd31de8
BLAKE2b-256 b1dfdf2f7e91c6a15b47fb693d0867b047e7fe870f197c00354f3c08ea679088

See more details on using hashes here.

File details

Details for the file qsharp-1.5.4.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.5.4.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 be9c25b0f8a5a749023857002b4fba22e98f40aa49c8187d350d39fc9d5db4c2
MD5 dbda48c445b80902382cae9be30f40ad
BLAKE2b-256 c304ea728be4e6adec93be420d942da6457d8a677c02874307c028cbe66a6c8e

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