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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.3.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.5 MB view details)

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

qsharp-1.3.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.3.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.9 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.3.2.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.3.2.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 4f0fc3a6bbbe50c4616f2b9665d14762bc35a9d58b692ae6580e2cf3eb99d5e5
MD5 773123ded9c0a69e407fae1e03b1c9a8
BLAKE2b-256 3bf386348d52558e9e30bebf05d2eeb7ac87b112278f4d25a3ab4aa790e6dbaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.2.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8797c8f6030d01e302641b22f31a932b91d578a147939cb45f2eb833596d903d
MD5 ca69ece826dc0085d70db455da0013f1
BLAKE2b-256 ecb0b33ff75eddaf9caf29f1ac4b87c5c7a5357ccd6da203847847532cb96616

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 02e1273a0727477d15ad1f44a5a8e93d2f5d72dd784bfb1f3236bdea5f3977c0
MD5 961ddd8799b97f090de07d1493efd528
BLAKE2b-256 8517b5f07d3d5bd2fdfa07f752d224239bac1483241cded417513b7d5b3921cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 b49cc09c8e8e7b198c01428dcee34cd34039f14f68dc5d382d8915c782d1845f
MD5 ab48dad633b78befb73d38a048b67aa3
BLAKE2b-256 32c509733e7cfbd5ae007665bf005c4dc2a6596694523e19c776a0767e8674d5

See more details on using hashes here.

File details

Details for the file qsharp-1.3.2.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.3.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 45cf0cb4feffbc594bf9190e4ce2f56ddbd9fb6fcd2f25fdf7a8c789dcf9a007
MD5 6008dece8204e784ad51ebc0a296fdc0
BLAKE2b-256 88b7deda54eef73a1b8c0f6cefcd58cf43528d25b439b60ad6e293f03b51e0a0

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