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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.1.6.dev0-cp37-abi3-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.1.6.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 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.1.6.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.1.6.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 7e16e603a5b883b9473130912fae758ee78e796c07d7aa6871aaa9e19ac54078
MD5 563fbf9209fa563a34f78e3b934758ca
BLAKE2b-256 cbccce6c142920ac57ce109b9142f36c60dc16e99ada9b6c1d5358762dcea07a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.6.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 65ec09ec7aad4e02e37b5811dfeb37c1c33b9026f9d20fb41604f0544b92075d
MD5 ceb0f63a87062a25d734667b1f9288ab
BLAKE2b-256 06443cf42d68798461dd3147a8f8ad9ab02278f5eafb5f448f6515132aae0f20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.6.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b0de89d96d06039116b3177c11dfc1d909db9adf09889563218d384767f58d9b
MD5 ea8e452238381217c665a8231165536e
BLAKE2b-256 8aa8119ba211635727a9f1c6cd3a7d5ee5111b99d3d67d14b811db20a0ebf0ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.6.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 eab4a66690e3e732f7d52c9f60672b525660972c2847b616dd521a09790bf9f6
MD5 410859adc5fcd69f86b80aba33013d6c
BLAKE2b-256 43e4d8551d5c0bd02dd167d6286b9fc5792a9a5a8e0514d14582158aa44287cb

See more details on using hashes here.

File details

Details for the file qsharp-1.1.6.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.1.6.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 de5fef421a6a75f2f38c61185dd398153eb71a5338f79f8a8a1bcfbc12d061f4
MD5 0058de99fe543f74d789ce9ae792a259
BLAKE2b-256 82a02d987be65a588da031c5992f18113181158f15cef096ac74269782c1ea0a

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