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-lang 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-lang

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 documentation and to browse issues, please visit the Q# project wiki at [https://github.com/microsoft/qsharp/wiki].

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


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_lang-1.0.10rc0-cp37-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.10rc0-cp37-abi3-manylinux_2_31_x86_64.whl (1.4 MB view details)

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

qsharp_lang-1.0.10rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.5 MB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file qsharp_lang-1.0.10rc0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.10rc0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bc26966809b90f5b39ab14010609023b2b932bfc7f6e4a2d5a4836075f53c7f6
MD5 28cf3ccadd57c744adb11f0c0c62599e
BLAKE2b-256 d1d8b2b8888bd16c84c0db4d91dfae83ecfc17a19741fa1905d56fc83ee2a221

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.10rc0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.10rc0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 5b7f61a852030ef15186009a0cc1901cde633bf0aa2521bc3f6f760caa2e0248
MD5 7f54a0c40cd3cb2f654ff8be11b0c263
BLAKE2b-256 8bef1a0d9d47cc15d4364e028c73297fc4f11c1a67a7641b79db51d1bfe2b293

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.10rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.10rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2d2f763b57b1a12d1d9ab364d973bb223cf77d19df3e07ee30425bbb23c42e88
MD5 6a6d7b0adf866792b35058e86112c378
BLAKE2b-256 cbdd320a9f0617dc2220f6196c2ed1749a5c9851f44a65c8f761df09275ad4a4

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