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

Uploaded CPython 3.7+ Windows ARM64

qsharp_lang-1.0.27.dev0-cp37-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp_lang-1.0.27.dev0-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.27.dev0-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.27.dev0-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.27.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp_lang-1.0.27.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 f466c19544852db975d8b2a124888550bdd999900f21e700c8a8c8c6a3f05a02
MD5 d2497f1ddd56b029a414be0a45565244
BLAKE2b-256 d8081d1f8870fe9fa7fc697356c6269df0f2bca11b4df64513caea2437a93f64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.27.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4151e0bdfa8c4722f21714eb1e97c8792ab4dfd44968c9b3059d7fe45e5fd1ef
MD5 1ea5bb3de057561b52dddbc6ba56a444
BLAKE2b-256 5ce28a8575a23a9e3ffd42a05929f5300e79b24358a2673fe050d0e626f955d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.27.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 01c4579a126f7c55243545a521f05b14a643a02475ef9d2c7080cbe3b2c6cd84
MD5 8b0d1112f5e0417ee4938a92efc0a887
BLAKE2b-256 a0972a0a1b245f93a565318e1328f20c66d8c242c512d236e580f2f1321c0b5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp_lang-1.0.27.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 e5b183f96b9fb963951863d8a7969d2f50d5017f3db8b232c4a87bf2e971c8a2
MD5 5f8d538bb4252a8ebde172a79a2824a1
BLAKE2b-256 1f169df770545ea29b636018b9c44e26fee429432e54b7e5e2977b7108064f82

See more details on using hashes here.

File details

Details for the file qsharp_lang-1.0.27.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.27.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7a2f317faa904166ad5e93e46779742330e5bb3855e76a273fc57f9c2a180890
MD5 e88cd011f30ac203cf5c8d2b71937d81
BLAKE2b-256 1358b8eee15f458a4a5605a33a019dc3147e32958473b03b283c5c482e0f8c0c

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