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.7.1.dev0-cp38-abi3-win_arm64.whl (1.9 MB view details)

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.7.1.dev0-cp38-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.7.1.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.0 MB view details)

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

qsharp-1.7.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.7.1.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.8 MB view details)

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

File details

Details for the file qsharp-1.7.1.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.7.1.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 b1b81cc637b2c07cf72604b928bfb5c3b75fe82909decf4c324cffc7a7703593
MD5 ac18a7b43a4b129d9139469eb1759da5
BLAKE2b-256 a6d48b2554e11cdfeb5c2d1304ab512dc04b5c5c2fda913a93003933056ede1b

See more details on using hashes here.

File details

Details for the file qsharp-1.7.1.dev0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.7.1.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b40888a602265f0efb62836ed3ac4d10bbbe26cf19acd0d7bb8347b8b4e727f5
MD5 27e2b6f663cec98baf93278cb9cee126
BLAKE2b-256 12074d934e5e1197d6f9f8e315b948f47c273cd5ba1a97a7ffe24d9d68c5015d

See more details on using hashes here.

File details

Details for the file qsharp-1.7.1.dev0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.7.1.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 1002497933f8fce7539354cfcf60bd56af19066c0856b0fa4a118ec267960285
MD5 bbb7e16f1cc131f55881832aeca984b7
BLAKE2b-256 1a2c87eb2a86d2797999107c4e1ed51c549f309a716e8cc55c95db32535fafe9

See more details on using hashes here.

File details

Details for the file qsharp-1.7.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.7.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 771b35587ca553bece0eedf982dca9cbd87b424d530607d923371467d06ad75d
MD5 604c34779bf8693aa51e27c514be1f10
BLAKE2b-256 f19dc5e92c25d0d4c609e2ecb454fc95c28af9fd401aff9ee00af31188c1d979

See more details on using hashes here.

File details

Details for the file qsharp-1.7.1.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.7.1.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 47321c0facfb55990c87d9f59443b8db383ce2c3b7751e6c25c406abbdd6269f
MD5 dcc827f05f1edcc2722a12912ec303f4
BLAKE2b-256 bef5c29bbba49b192cde21de44e5b2714e3b474e46d44fc863302edd27d480c6

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