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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.2.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.2.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.2.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.7 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.2.2.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.2.2.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a9631308c111623ae2a1c11480d059b1226db1c239d303766171db4a22676a5d
MD5 fbc90123e559d0af1672fb71e89968e5
BLAKE2b-256 af26ed779f02afbbb88d1ebf93fffb0c6d937f486713512f4d0e8b401f7189e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.2.2.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a706a2d3b470345bcd869665fe01c97643ba00796be898dd97dba77045280c07
MD5 52c2069703e82e93726979401f9c14b1
BLAKE2b-256 d95e6049f83ef1e2efade9b36ba1bb93942d08d774f79def64721a07882bc024

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.2.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 852d006102da4a7a7b63fb56f9dc77af617b7233b685552d5482e3b7e23e7234
MD5 aeafeb3a01ecc5bd1e03ba301db36b00
BLAKE2b-256 d82c70460dc88fd59932f399d8202966f02bf50a6d146e6e9d9bf0f87ef58ae1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.2.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 77ac4a1cdd1088ba908ed6363d2d918913c2c517f9aac4ef1b10222b9480b41d
MD5 dbe3c3372c7d77bd6ef06e7a9508fc8d
BLAKE2b-256 04434908096fe8b363ccfff6e0da9ae325a36901d0a1e618c65c643f1129199b

See more details on using hashes here.

File details

Details for the file qsharp-1.2.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.2.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 58e19aeb1f4b85d6f704eb17e709d18b970f44859308c4f462b5bb683e782527
MD5 940e0e69f8a787c584d5bd6c9c113547
BLAKE2b-256 a0ff242cbd46eb511f154ecd3cb9fa8042d6eb0e738959eca39930754ba6104e

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