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

Uploaded CPython 3.7+ Windows ARM64

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

Uploaded CPython 3.7+ Windows x86-64

qsharp-1.3.5.dev0-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.5.dev0-cp37-abi3-manylinux_2_31_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.31+ ARM64

qsharp-1.3.5.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.9 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.5.dev0-cp37-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for qsharp-1.3.5.dev0-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 3672e369e4cffcdf1175e645eb9855c3503b85638c2b39eaeb51fb5aa1ab45c6
MD5 560aa1ab4ac4b02cf96cf2748f800656
BLAKE2b-256 640bef28fbe4593c7c873db1b78d0edeacc781c0e9b923baf9b3e95a87c3b1c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.5.dev0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fcd3e1c3b443d57af17bdb3bbdadc17a4bcc93403590cebc6ec324f2453a214e
MD5 66b0acdaa7291ad7913d0f4672ac3f31
BLAKE2b-256 6b3a0154b8b05adc82437d743ccb4336d739febd7a39d32dff073d652df9980c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.5.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 b316e0b2815e67281c1b8d1047234734035224001d33122b993689aa5b6bb0c9
MD5 9c9b8d810e350c868acdae64714c5979
BLAKE2b-256 35a6300b8c52464f7c90f57f7101108ab17eb8dd6ad18c10298ba4be36a88b33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qsharp-1.3.5.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 560194f1aae9ffe8fb5cb4f69826607edef501fb2d487442d1a53c9f928458fc
MD5 99d54b74f6933db324a3da2de449ce02
BLAKE2b-256 636ce9df4da108010bf8b299aeafae225fc4b949548d312d98c9d1873bdadc97

See more details on using hashes here.

File details

Details for the file qsharp-1.3.5.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.3.5.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 f313b93a6acf7a9a3ad7ff8c9a745a09aff3ef59b0ea86fafee676aec5e17880
MD5 edaeaea0cf5d6237e3b55b7806aadadb
BLAKE2b-256 13c35d078fc7d9f6b9e199479318cbb6da5e9a5a9ad13d3f722bee9e75a89bb9

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