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

Uploaded CPython 3.7+ Windows ARM64

qsharp-1.6.2.dev0-cp37-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.6.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.9 MB view details)

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

qsharp-1.6.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.6.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.5 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.6.2.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.6.2.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 df356e67b443544626bd940340a5377775767aaf5e4b9033d2730e3b66838182
MD5 62e5585ae2f475adcbe0c4941169bbae
BLAKE2b-256 87596d46e1348bcd7363d57e6c1a5320045389747a3c6637a458bc1ee1aa6294

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.2.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fe7f25c9efe605bdd8fbe0763a8a2b5c9ebddb012ec94bc2c0cb8a24d07f8fca
MD5 c9fbb7c7565691bb3fd97960f7106e06
BLAKE2b-256 bbc1ca777345c3265a527bdfe262ad90aeeba6a73a4356ad86aceb71f75be91f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 3c6b047b51cf796d3db6c7918dd46bc3c33aa325aec32fefd7a45bda6a31c97d
MD5 8be644711fe22fb03933e564a1f5ba43
BLAKE2b-256 065303dac1e89d703071b7831e524ba8f0de0c782e3985b79833128395dcc10c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.6.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 7c3d35dba1b88f5469c87be86af4d8d833c36b6ea3e4e82eddaafe746b965422
MD5 762f91d89614e6c69425e1a8ecb575c3
BLAKE2b-256 e479a78bcb17fd3305358c46fb5bc45d7bac46bf7887748580256f1b409141ca

See more details on using hashes here.

File details

Details for the file qsharp-1.6.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.6.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 4b22138122c08b6e35180ddb98e92485e7649544c68979470507c4d3ba4ae03a
MD5 7e44d9a2573fdf9b93c14569a988b816
BLAKE2b-256 09d18e08849e687eedbd7e6de22b005696e987b406d61d9a1541f42371e53c92

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