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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.3.0-cp37-abi3-manylinux_2_31_x86_64.whl (1.5 MB view details)

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

qsharp-1.3.0-cp37-abi3-manylinux_2_31_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.3.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.8 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.3.0-cp37-abi3-win_arm64.whl.

File metadata

  • Download URL: qsharp-1.3.0-cp37-abi3-win_arm64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.7+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.3.0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 345e7c60393f0c0f0dc541dcd59e891e3762f2b0843e88a1b05b7a2083720209
MD5 a0aa046eaf8fb9ed446a9be6856dd707
BLAKE2b-256 4d86a7070f27ad538be66c12c2d7dbaac367333fc2e90a45f6244908990c0010

See more details on using hashes here.

File details

Details for the file qsharp-1.3.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: qsharp-1.3.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.3.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ced02757ee71d731017356880b10dff8842e0e3245f1cdf0865a54ed598ad5d3
MD5 e8dfcbe55655bc3de488b371835c036f
BLAKE2b-256 62ecb80bc9313148dec31aa6140225ec0c39e6b4e0b30ecf1b7b90ba3f1a63ad

See more details on using hashes here.

File details

Details for the file qsharp-1.3.0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.3.0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 54295efb554cb10916d04867be79e5e2c38f8ea3e9fe5333aa5192c52a54a91f
MD5 94ae92c49300e3d6b53f32eecf025fad
BLAKE2b-256 c755a1d966b66be175178a4a6877cf9a39fb47a03e56f4bd679e9b2ff2950325

See more details on using hashes here.

File details

Details for the file qsharp-1.3.0-cp37-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.3.0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 9491158c8da2ec0f47a0dd7e0e1d7bcf94c26b57c838a80f6d0a39d9b46803c9
MD5 0a97ef7c9af62690836067883ff3f6b6
BLAKE2b-256 bbcac7b2589882cddfda2bc0f1e8e885feb68c485b031dc3263a303271caf98d

See more details on using hashes here.

File details

Details for the file qsharp-1.3.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qsharp-1.3.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 a9801f4cf5cd02546ae7836c6398a8c73cccef25159c7f8c112dbd0436e176d9
MD5 4fda24d703f7b8397621589f59451fb4
BLAKE2b-256 86a1c2c2b72d597f138eafec9ba0a5d8690acbeaabdd514e1d755c7420411209

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