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

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.8.3.dev0-cp38-abi3-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.8.3.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (4.4 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.8.3.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.8.3.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 d87d88361821acb2b964b65bd1e14bd519aad10f3434832d3dfc3eaab091c53a
MD5 28b1cb45a49b8ebddc46777a30200d87
BLAKE2b-256 2572e20889914506465ba86b50f31ed5578ff36f1e02192ff9915a69b1ecb286

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.3.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3992add18ac2969c983ae0cf5f0e3bd62b2475ab5330f51fc929a94efb670cd7
MD5 484984921484b0397a5f9509bad10313
BLAKE2b-256 f44b995519b913c058b8c0cf1223ab805e8c90321a05d4101b1e42dab92c8536

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.3.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 37b45d63e7a4fd0e4c849d2defdbda71f8d2eba8180f825135a1106caa20e2fd
MD5 e946ba9855ee24fa7f8047f63ef8a3b3
BLAKE2b-256 16988c70f85be5e28b2af130dc3c93e48a3c624188acb2b159c72da40ae14266

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.8.3.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 7f33b8cf325f95fdbd630aebf53f73e85e9adfe2e24502ad7cc689d7061d634d
MD5 541df594efa24dcdcd1f2ff96d0fe91c
BLAKE2b-256 c8e7b9a067dfc490d27c4471fc6429efc784fc3f2067faacf83ea8275d1487dc

See more details on using hashes here.

File details

Details for the file qsharp-1.8.3.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.8.3.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d67aee9fa934de26fda365d2196f720a2a8b5d674c291667b89edef13cbe34d2
MD5 1e312ff68919b5ee042bb51d03f15766
BLAKE2b-256 095d130afe59a46cb40334f92cde60cf4b2eff34e1b68cdbcb849c865758c5b5

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