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.26rc0-cp37-abi3-win_arm64.whl (1.3 MB view details)

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.26rc0-cp37-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.26rc0-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.26rc0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.26rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.6 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.26rc0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.26rc0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 ca47dfc7074020c5f4159886c963f799daca36bc419bb4eecbb055aea44de25c
MD5 aa0bbbbb3464a9083714e06f31063f41
BLAKE2b-256 5fffa8506292cb0988dda8884a48de694e93b18b5170aaa32ec33a37e9de5250

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.26rc0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8f0447f9677d2662472cd42af795445c459be94ceb8f638661c0f4255bf98695
MD5 597baf0030990557fac3dc7950093813
BLAKE2b-256 66e200f31b000d1b8a25de4cc06aa3b312ad38f06a8aea76cc2af9232323f6e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.26rc0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 a751ac51c05f90fd0d98c945784b361d45c61fee968eff9a4fcf7b216155c741
MD5 42afc8695c218e58b4d22db488b8bf7b
BLAKE2b-256 a9625f5ae6636304e498f4ba1125f71d47314d1ff0988e22b639751c227b638d

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.26rc0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.26rc0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 194ac2e405fde6848341e9185bd400b683d2447821feaae53319dcfba9210ac6
MD5 b63eba4d2a17d6125a591bcf7be08293
BLAKE2b-256 88a6688d6a73d9ff629e7dcd3b4c6237f212773364d6af7629b2ae2293e74543

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.26rc0-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.26rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6d56663759623c3f4295507dd45d28f9c5faeea366c98bda53530a09828c1823
MD5 95b194c995d639f1297a8d8204c095dd
BLAKE2b-256 379220615113bec6b8db781160ee550c7dc4b950b4de4537ebedd6f95e249354

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