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()

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

Uploaded CPython 3.8+ Windows ARM64

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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.9.4.dev0-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.9.4.dev0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.9.4.dev0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 929de81db42317bffadfb68fcf7791e6eec57db6ca1ed85a96416afc81765282
MD5 49e8be6edcfaf6ea64015ec7c763bfad
BLAKE2b-256 c0c8d086c9bede138ee96f29e18c5bd20f45ce3c019e5484c726b773ecaaf10a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.9.4.dev0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3be3795025e9ece400865cc79eb294a1b29b4ca106e7d8753c46bd118e44b96e
MD5 35a5427116416853c4f8932ec37fc925
BLAKE2b-256 8beb95b359172f8f248afca39a18ab810fadbde79cd6ed4ddb63854c4fafb7c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.9.4.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 61d5ceec8ed52427a1e216c87692e33eb8df3faa6b23df2bcb41bc99487ec96d
MD5 efba99da27c78978a6e7224503eb9b8e
BLAKE2b-256 9f8200b575e5b2c932b25f4250769b90a9777834a74da6122737d1dbede34f7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.9.4.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 e22b5a47b02d531df0025c43fa1e67cb5691cdef569bd259f90cb601c2cefa4b
MD5 b9c42d894c3a2f96f0ba5fd2e808aa5e
BLAKE2b-256 a2eb47252e9560a0429d00bd6a91004f1415ebb897cd9ca34801ca2759824655

See more details on using hashes here.

File details

Details for the file qsharp-1.9.4.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.9.4.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 3e62e323278df313f1dc240a0f81f42b2ddd69fcf9a583d568400d4b1590c576
MD5 50938f62654297adc483ea35caa2684d
BLAKE2b-256 5fd7bed00baf20b40229058aff61f31bc268607202891f31f5bd8b8851148dff

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