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

Uploaded CPython 3.8+ Windows ARM64

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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.10.0-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.0-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: qsharp-1.10.0-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.10.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 055578831679a49401624563a6683c299811c6e09e591b7c58c8fb45b3b8bc23
MD5 4a2f024a7c07dbab18ebbbed3ad09c8c
BLAKE2b-256 b893e25e6fa5f11b446af37a7181f50e98a9f32750d526836946295cd0b00e0f

See more details on using hashes here.

File details

Details for the file qsharp-1.10.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: qsharp-1.10.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.10.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5a77474231ccfde27c137cf261ecdbf992eefbd2a368e154ba22d33c2dd81208
MD5 e7d249dba955d1ad48be803db2327ae5
BLAKE2b-256 7ab8f5f93d6c84b5a9726463421e926a58ea4453a88038b130e172e022f1f56c

See more details on using hashes here.

File details

Details for the file qsharp-1.10.0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.10.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b1508660b8fbd81096abd290b40bcd10a9dfc55e53ef0301a604188d221f6198
MD5 512771fa9d19577b6154f01fb9972d7a
BLAKE2b-256 e72efd1034b0c1be813d76b8426b550e687eae926110c594534c3e268a4b1635

See more details on using hashes here.

File details

Details for the file qsharp-1.10.0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.10.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 6fe3b42ecdcd31ebd371029a311139ae9b03ea50df54d7415ca09ab44c17bac6
MD5 4a016bdde5412c67ef23a5abd240227b
BLAKE2b-256 9e2081e477e11313c2961910bdcc43757e21e53468664e3304b9d45278165278

See more details on using hashes here.

File details

Details for the file qsharp-1.10.0-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.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 993d31c2b9100b7764a4f2ac8074768068b4ecd132a41dd3817b452b3933d388
MD5 ae38a4802e17b67409c378132f1f7e12
BLAKE2b-256 1cb701d834e976b8a00227ec41a8c9536bfbf29e1657fbbb8223e84ac65edce9

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