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.0.34.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41d1c31d381baf022088f001527b2ba82fdb98886142055498d8eb72a0e18f2b |
|
MD5 | bab8054782c6fec9525aba95ac0fd29d |
|
BLAKE2b-256 | 2d92e6255ca8450969c8ec1e9cb55afeb2e8010ec9c051c83fd854e7393dfc1e |
Hashes for qsharp-1.0.34.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 528967f62d06847c658fba1fa6d56618f9aed99c8d3f6c703a05b9508727062b |
|
MD5 | a1f7fa4f3e0476be7e9ec1988f117291 |
|
BLAKE2b-256 | c5d3d2ed9d66ca132d3b938b249d3bc101de74593a854d73bf1069677aa5fec3 |
Hashes for qsharp-1.0.34.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ad1b1ecb7daaf2ee884b6ef062df53bd00811d3245f913f939569fe76afddf9 |
|
MD5 | 853a269f728e7a25d5aa18a2eb7721fc |
|
BLAKE2b-256 | f29cf5b3eaf49bf0f162c19f1d7acf980a00c4bbc4e63c1e639305afa016d50c |
Hashes for qsharp-1.0.34.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60190696c5d3715a9a2ce44b41bd70a991dbcdd0363ab70d4b23d954a89d7bd1 |
|
MD5 | 0b9f78428872b999b1af9bfd2c83c435 |
|
BLAKE2b-256 | 936df3f16c4c9680208ca0fbcf9f865c938e0c7a7d131ac078e18f7fccd29d2e |
Hashes for qsharp-1.0.34.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0f2abafbb6f123989eae893b58bb6b9e86b0ad80467350a1ce0bd9c65f5e0f4 |
|
MD5 | bb2ccbbed61cedf8d07fe4a14910194c |
|
BLAKE2b-256 | 58d2efcd7b31d879e934cd7fc0468f68ffaf3c0cba919bb6a5847b1dfd241bca |