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

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.6.7.dev0-cp38-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.6.7.dev0-cp38-abi3-manylinux_2_31_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ x86-64

qsharp-1.6.7.dev0-cp38-abi3-manylinux_2_31_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.6.7.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.8 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.6.7.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.6.7.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 cd10646ae1749dcb3604571660f8161699e04f0c781d6a1684a6ec8f0122c02a
MD5 bda09f7960bfd9fd9c8217c419869830
BLAKE2b-256 bb6fcd3f6d3ab570edebbf15159d81345bd1f5ec9d37ef9cba13ae2016110ea8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.7.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a5ecd455f6bc9504ffd3d85f3976a441b095a89bcc73c18a5bd0b8947b759164
MD5 8957404b50fcc80bf23d8dc117683b59
BLAKE2b-256 58bb9bc0239a8e3816cb177958ccf46d666c0cf4b22ae053e3b862cacd3feb81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.7.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 ba86b5693e52ff06cb1a040aa5b1ee6d3d0beb58c7f894ca83e732c6e613a7a7
MD5 b2bfeb29359db203bc461e9e8ced1ca7
BLAKE2b-256 d79521b52fa964f9375f93590358630fab8aa12ab89162a3eb8fb65b12787cba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.7.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 e0858d7465c82f019e17d9727487f7c0ad5d8b4f4df04b01d7049cc3c4405401
MD5 f09a4a55e78b93914150381448022407
BLAKE2b-256 c3b4c8717e12ec33b457c874754de4eb46e6c9ab047c4d60a40a97678462db17

See more details on using hashes here.

File details

Details for the file qsharp-1.6.7.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.6.7.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 314b555f62c4730c41d795f8c395e38252405b3e69baa34ce5adf7beef2f3044
MD5 d73475ab14f6fbdee44137c454490187
BLAKE2b-256 6c86125ee2e1015dde07711da2eedb2aafb3d05cd3f6c786b18258e6969e68aa

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