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()

Telemetry

This library sends telemetry. Minimal anonymous data is collected to help measure feature usage and performance. All telemetry events can be seen in the source file telemetry_events.py.

To disable sending telemetry from this package, set the environment variable QSHARP_PYTHON_TELEMETRY=none

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

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.10.2.dev0-cp38-abi3-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.10.2.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.10.2.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.10.2.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 25d6d4170d1f9b27c077961e20aa024464871d5c4d0c9732cdfea17c29eb8913
MD5 2c6e22c84a7b5e5342e4e6c62a4d2e38
BLAKE2b-256 8dadd2df89ddecb4bf66ef76496f07c1b0e29ac704b75d901c50d25409920a60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.2.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 59cb47833a7c0449ff644ecf19ac5499b189defaa99965ec11b6d2786dd33205
MD5 6084899caa229a9d036a0b0e28d0aaaa
BLAKE2b-256 fa5539b2855299b5fb10c699f3456385dee6f68733e05195a4204807a4105747

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.2.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 0d321ff087cb41d9287c74870faebb7f1439b4f365e55869a30e74dc3245dbe3
MD5 bb4b7585fb076447cd88dbecfb379a99
BLAKE2b-256 33451a9d36e36310a521fc2826f361441a932026ddc78295ff1bd97d314a5f93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.10.2.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 bfac821d4e438643a5172cb2cfbde819772aa9ce5191c6c14eb30a2044c0b668
MD5 91a1b263394d843a58206daaa048cefe
BLAKE2b-256 9b276aaa56ed1684b10a57769697e31f98433ebdabf969f6836f1e31756c7714

See more details on using hashes here.

File details

Details for the file qsharp-1.10.2.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.10.2.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 5a7965cbc012c582b28e1428b84199be53d309c70474c260d1efd7da19bf4550
MD5 b1526b86c75c13ae8bd5d3846d54e4b2
BLAKE2b-256 4dae2d3e98f5fdc532bfffea730146bbac1c3a9075c669c7da6ce3034292d0b8

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