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

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


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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.0.30.dev0-cp37-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.0.30.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-1.0.30.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.0.30.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-1.0.30.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.30.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 d365277ebcb68133fa7b3aff9ee4ca3608ca2e00798a663728f222f133b08091
MD5 bc186d4f880d2732cc4f8e7d6a22e661
BLAKE2b-256 3d3af6079ab8d522299e196a291d37d7fa3ca5bc4522d448ee2ba985ab19449a

See more details on using hashes here.

File details

Details for the file qsharp-1.0.30.dev0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.30.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1b59ffd2a1f5536e1285167b68aacdcfd349d851069db4ba35703036311376a4
MD5 d41c5bc3d2e60b59d0d1cc747aef9b41
BLAKE2b-256 0ad3b332e12441acc17301eaf4c41a83d8533d5ae1e4aed663f101af7303d732

See more details on using hashes here.

File details

Details for the file qsharp-1.0.30.dev0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.30.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 5819fec1a754f229e9806982d9d50cea894a076e2e63c7254db878448627441c
MD5 888b8db3f0213056c33b790809a64276
BLAKE2b-256 e212369a4a2fcd61d584717039143789702ecafc689f950b231c09f8eb8181ca

See more details on using hashes here.

File details

Details for the file qsharp-1.0.30.dev0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.0.30.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 99aac841174fb365d235608c6f4b911e221d14105df3e663aa5320b553f10642
MD5 0cdae398e1d228d7710a72780014f20e
BLAKE2b-256 e381364ef35aed7d612668435db14eb1ead39456659c46e2690f62fe7c9a6e6c

See more details on using hashes here.

File details

Details for the file qsharp-1.0.30.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.0.30.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bb5efaaf55ec20ee8865165b599766a4da388753458e5f2c2c834650a3576656
MD5 9593dfe46a768fb277ca31cfdc0e5e7c
BLAKE2b-256 965d0dfa014194f0abdfcc6b059c686e160b3cd68d7ce3a80f4c14d837831b41

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