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

import Std.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.8.5.dev0-cp38-abi3-win_arm64.whl (2.3 MB view details)

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.8.5.dev0-cp38-abi3-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.8.5.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.4 MB view details)

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

qsharp-1.8.5.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.8.5.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (4.5 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.8.5.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.5.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 8407937dd4e88caadb4ea7b28feb1d7bb938258ecd7b39d26e0aac730a3d11b3
MD5 3e599944bc7b88b910482435beb18f11
BLAKE2b-256 9808fc492188f67f7519e9fb6405a8d8e2aa85e1c36c75fd7c14a4de4e74910a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.5.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f13a4b50b369647f868ec10f6419ca7abbdc8924df33fe055820b17b3acd4ae5
MD5 f06c6eed8c36a299fd5745d091ff426f
BLAKE2b-256 26232f2a528f3be5dbfaa9ab68cf0812d42f6147106f45750c231702832928ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.5.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 12cceb964a292a4d390bab897542b4f8fbb444faeb840b6149ca502396fb3472
MD5 56bfe4eae551fae4b79e5723f8b356a5
BLAKE2b-256 cc3f3daf1889b00e627d19379017bf68364bf25b6a6f15b594c5a57f5df7eeeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.5.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 9784887970a5473ac2eacc3ef8d1e3881693c607162114903e0e70b3b0bd3540
MD5 3a2dfdc9dcfa073af1096590013f9205
BLAKE2b-256 a53ec42cadea9f186340b22c20b39d24df4b4a90540eb82af17a09839892ebe0

See more details on using hashes here.

File details

Details for the file qsharp-1.8.5.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.8.5.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 67080aa6f6d06fa2a9a887b7b2be4a3cdd12a6f1e7ba75b72c83c5a7b5b5ed66
MD5 21bcf1cd10735cf86d8f26950a5870ed
BLAKE2b-256 922763fb720092b9598bbdca1bd1a22f044598b07174b99e4e290931a2d340d0

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