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

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.17rc0-cp37-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.17rc0-cp37-abi3-manylinux_2_31_x86_64.whl (1.3 MB view details)

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

qsharp_lang-1.0.17rc0-cp37-abi3-manylinux_2_31_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp_lang-1.0.17rc0-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.17rc0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.17rc0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 9fb329b38ffeb6dc0199e200c21aabb314f07c9c587b890244f5cc53536380b8
MD5 51a969e7434a84b1c478203e544337d5
BLAKE2b-256 b6599513b1f3a56ee279d268376e24a8584c4f77c5f9727186147ea5203cb609

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.17rc0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fe4e9971d8f2b5bd8a8ec6da49522941dc46a14f1e43ddc9439bcbdcaec27125
MD5 316e2a3ede34f3c1035015019e587bda
BLAKE2b-256 db90f23c7f200ce6f85d3781e1518dbe979f7d6b7ba613ec1482592baf898cf4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.17rc0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 3333a069214a5bb03f63f5aa028f9410a0ba1b5aeddeec0fb764929baabbc471
MD5 7920f7486293d4622f5c4106c1ada22c
BLAKE2b-256 2ec72f96802deb4233e79912abd221ff267acf9285937deb309538c9c6211b11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.17rc0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 d64cae307acf9cc9af01345257d03bff15e66c9de115d372f24e5222112ca4ee
MD5 bfd56304bc7a96f8363e21c9b9b91eb5
BLAKE2b-256 89b2f1d606e53bfb531217bc0e1a22c718e9de4e570bc8843f4723db3dfe3348

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.17rc0-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.17rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e5195a71dc60083863b3217552bd2e74101b701bf232084854fa7d0e0effc166
MD5 a55e2f040d5d277293c09359d2f2827b
BLAKE2b-256 7626bd321c7de7c50ce4e3038aaaf76ae2ed5b649242bfa79892b84f801a8f34

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