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
Built Distributions
Hashes for qsharp-1.1.3-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52e97690bf045920baf6b0c29eaabc167c11129f36ccb380192dd680e275be19 |
|
MD5 | 90abff68abd088526eddb156e36cf143 |
|
BLAKE2b-256 | 0fa113f9d453e704ef638669004f81046dd32dd6234b1dc1072447ddf514b084 |
Hashes for qsharp-1.1.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0144a4801556d26942b49988cd845afc00be249ae668fc18c41d94d36f31f540 |
|
MD5 | 230a2af3792ae8b61e83950c046f4c65 |
|
BLAKE2b-256 | 301b65897e6934066236ae8d2fc7323e77871438daf1f525438bbfb2a6ffb882 |
Hashes for qsharp-1.1.3-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8d17d7e70ff54b3e3c084699ed13011841dcf30c4bdf9e52dfc1d5d4a64571e |
|
MD5 | 6f8a70814fa699458fb1aa3b56d35317 |
|
BLAKE2b-256 | 2bb7fcadf7d23be90083fc421f38d15eac0ee18a04b593d5477f0b1e6284de42 |
Hashes for qsharp-1.1.3-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00f7ee71d9e93008ade47844eb7aabb333243c52886374accb5ec57f4604dc9f |
|
MD5 | 0078c6068c75910189e393993e2b5d1a |
|
BLAKE2b-256 | d790d786e2312fa3b1ceca13989ee687d9576a9616997197c1cf77fd1051407f |
Hashes for qsharp-1.1.3-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fff0b8fd12ac155fefe6fb4e3d56b543a88fda5ced8feb22fa5ea3ce880895c |
|
MD5 | 1fae744e0ddbf4c943a7e4510ff51513 |
|
BLAKE2b-256 | 273a8095a7fca6421d9b428fc08ac8ea8d7cbfc0691eecee1aa5236b2ab91c0e |