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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.1.2.dev0-cp37-abi3-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.1.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

Uploaded CPython 3.7+ macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

File details

Details for the file qsharp-1.1.2.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.1.2.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 da34c919feb49f932b6bc3a422127cf436a495f2bbd98fbe054b101a0d49ac9e
MD5 35ec9ffd1aefc7752b8fb71aebb79e4e
BLAKE2b-256 734b2a0584ab0cdbcb3b0301c7daa0322dc6b603196264776b1edc029e62478f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.2.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a907dd808bc8db3c687ea4665d4b16becb33201d7c8b5bfb8def99a78e63d5de
MD5 ff6c02e7b070220a2b695c5dd6535cef
BLAKE2b-256 9a28c47e9d5ff1d767e9ab36c7e804d64ee2fba9d5ac69073c5f9663f6afb31f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 6737a943aa06b43e977c161667f06f21f2e6d47578197cbea19db1904ec3722f
MD5 6efa36ffe74f3c04252cbb684520829f
BLAKE2b-256 9332eae7278b74e619d4831c9db04e1fa4ed7f90d62d4f092f75c26adf934d9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 de4fdd31783421dd640277972aff0fa14da66d84cb1187ad22dc9a3e85b5d01b
MD5 d343ba4bca97d04f8b478aff799c4333
BLAKE2b-256 d10b7beab64bde94ddda8ae27aefb85eeff5d532495f9b6e88bdc46a533e7ed5

See more details on using hashes here.

File details

Details for the file qsharp-1.1.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.1.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 7b3e43b8f153e70ff98bd58c436c0b4d70dfc962c146f496c416e259d12fdea3
MD5 588840daba0561ac201975c8e4b3be1a
BLAKE2b-256 6a940fcec5435a3c6e54339076ed29e3128ecaa2c867a988c285a414b2eb3552

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