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

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.16.dev0-cp37-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.16.dev0-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.16.dev0-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.16.dev0-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.16.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.16.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 b0d3a516d093529fd4382ba5976c407e1ff670d787ef07018ef4a8c7342cb382
MD5 88f2a66e6a3b661bfa2f23a07f984778
BLAKE2b-256 1ebc35af3490f1c5501ac156dc72275221225df920a43c3373f54dc1cec4c1f2

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.16.dev0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.16.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 012759a43f39f09ff4ab4dc38b719611a1e456eb10eeb86e31f101be836846e9
MD5 aa412a404e72819d76b11b77254d6475
BLAKE2b-256 5ee491a8b8ace4f43bf3b3a14dce5bf18ab18995abc5678abbbe157678fbe457

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.16.dev0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.16.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 6bf8600f20a1566a441548dd41dc40fcdc63b075b577d4279fd16d31828ab55c
MD5 9df8cfa7ae978383bfa361b9443dbc46
BLAKE2b-256 3af559e7188f07eddda39ff9a944aa799411e459b5a58c245d98eb45a5b169aa

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.16.dev0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.16.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 fa55db5f1a5463e0687045aa1bfb53e1869caef57793256c186677ab00d3b33b
MD5 2fb67a9b8ef30209a78da577cb5755a5
BLAKE2b-256 fe128fd41ece71524036ed5b0a72f724af2b3a418d69b1336acd0a4044385358

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.16.dev0-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.16.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 be865d1d573332051984d66fdfa57a73aa95f10ec9dc2d9f07d1f458b6d849c2
MD5 f3bafccb519a21d5b5b163c5d2e0c5d9
BLAKE2b-256 5b747a03e58a0632e9a3de478402b9c2491fbaec71781aecd19a711f2f405a2e

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