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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.5.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.5.1.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.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.5.1.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.5.1.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 0aaad6ff2ef7fe26cd9f73e8645e6ecdf2e10379064e470e6701235bf9966c09
MD5 37f1d2989729894d7bd5698e674cab4a
BLAKE2b-256 da4fc829dd6a83988b2ea1ff0dde31ac812f4ab11cfe522b746f92778cadb0d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.1.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a98b29540e557adf4278628156922b8a58dba5d36d90bc2171f06e68598ceacf
MD5 55f5c70c9bd6f554abdedf4f627a5716
BLAKE2b-256 dbbecb5719085c79a66e5f9a2a042dab7e0693c5286734b5cea4a1e1307b3369

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.1.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 81637e4570328df5b5c1873562c900e8266aa485f02097240dbdce760c45413e
MD5 1500d3d95f67fcdb8b0dbdb83409a23d
BLAKE2b-256 477a8e55953498f1fe8392b74c3baddef33dd6fc96bac9ad6d9766d01691a5cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.5.1.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 8ebbeb0e06841139ff63eeb9f044777bdc2d9ef029a6bb4d8998f14a0efb74ba
MD5 8adcb3df852e12f2f5d95d1651a9ef44
BLAKE2b-256 4dfa9422217388cd3ffe39e635f35f69b325cae224051eabc465cc8207ec2f76

See more details on using hashes here.

File details

Details for the file qsharp-1.5.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.5.1.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 18022261cfe884458785513b8cd559d8a43ec379d3dbc59ba3652189e8ebcd7e
MD5 451c17ea815ee9562050f648f5b66a58
BLAKE2b-256 6383f9474932873910e5ff3ea6a8f3b3e64007bdd4e03a2925907ec3ea703cac

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