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

Uploaded CPython 3.8+ Windows ARM64

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

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.9.1.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.9.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.9.1.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.9.1.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.1.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 4c4a45e52391a57dc44eb60d2ac9b8b7bcb212f7ca2e3d552508b794425246a5
MD5 bf564846179dfdcc12e9d0d1222a1b52
BLAKE2b-256 c3b7f3a81cf141bc5163c09d7b8c7ad5debc8137816accd6286214e54ac0b519

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.9.1.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 abe1f79c5040b83e996ea603bdc4f7b669296e734d6381d1aa75814eddb4b634
MD5 e51bd9df834dbea3f1b2b3ec92286466
BLAKE2b-256 f49e091c48fb229a861ce5ac66e4c197513aa8c141fde247a045982c4b8116b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.9.1.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 c434d40792b000eccf02e7dec00e02af1def69af8a2d15e4b269568c995b58a0
MD5 64c27c4e3dc7e2f32636a1096c8d2b84
BLAKE2b-256 7d8ec214f5631360a7ef1badd94921ae74b7fc7fc6507e4b95c3409d20d7411d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.9.1.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 77056020770d68bc181d8b982b38970d09c3d1e2514e79969a7cc434d50ed543
MD5 6e205fd0ca7a2fdb73a65961e0b1981e
BLAKE2b-256 e925ab83ff0f30d39a748dab0d5dc8ae216e80213c70a5e6556a8ff7f11487bd

See more details on using hashes here.

File details

Details for the file qsharp-1.9.1.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.9.1.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 14ce17311b6fa40f74c9d7ec2f296b1ef16fa674db23ee6ee806db9fad79b22d
MD5 7a42b2fc65b915d225d77ac3eb1a1563
BLAKE2b-256 b156186871c5dea7387d45bd083de3f8bd29394bcb525235562d55ab00d1394d

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