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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.1.4.dev0-cp37-abi3-manylinux_2_31_x86_64.whl (1.4 MB view details)

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

qsharp-1.1.4.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.1.4.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 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.1.4.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.1.4.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a68dc78273abd3c8051aee249171fa5bd59c307c26467daebbf7f6ad6f48af3c
MD5 cec76750bf7677a4bc75ba18194e4162
BLAKE2b-256 56911d51bc02ee36c8d25c0a33ec7162f548eb2aa67ba809d648066442202a63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.4.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6c13d049434dbf1bee5111cd97b3e4aced6f08aa854c8301eece485d1cbb5633
MD5 0b9243f1b0147e731b2d6c34c192ef63
BLAKE2b-256 a79e6374971a047a2d00afd478542e3574837719fb8447381e63364481ba25b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.4.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 414e7bdede83e815c6c0383f7b223eaed942964e65f541a4c522acaa269712f7
MD5 51ebce2338c4c129103d959fc8fb9d8f
BLAKE2b-256 ee120d8d4176233c0df63e40627cae40c79b74a45f1185dfedd8b1e951bd2d12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.1.4.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 ca396c9c4764c0d14a7868efde06206508154aba10b04cd2df000e96f672dc3b
MD5 2ada5d2042642cf74f777b85281bc463
BLAKE2b-256 f87cda8f4f8f15b644d2cf81f14912d4f524d3f125801b79eb0fbc6813eac17f

See more details on using hashes here.

File details

Details for the file qsharp-1.1.4.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.1.4.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 c3584d7065ccf90cea7e143aa75360674cc639b1b4677b0a7d26c4c68ac06e71
MD5 3724cec1cf76a7be1e583dc06c0bb159
BLAKE2b-256 7915360cc5d692d6d341704521d1db2fd85057367cbad07fc8c4f4d9bdea79a6

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