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.5.2.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c08b6da617c53f38dee5429abb78b916cd4f6114c5103694511b313c5288543d |
|
MD5 | 0a64b4b1ee42786e3dff6e73309afde1 |
|
BLAKE2b-256 | 43dbac87f59647260b5f311ddefd31a90a32d4dc339964bb4939967e409e551f |
Hashes for qsharp-1.5.2.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ced2291d14107d7c44c6be0f662e97cd768f0ae425fc7243c839ea1c773cf55f |
|
MD5 | 244a9c0805902f426968a52b51203a51 |
|
BLAKE2b-256 | d23c416360028c2cde2384fec0456d69e1bcc03882cdc65b55a8f349a51fe1fc |
Hashes for qsharp-1.5.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98728a8f0bef0aa4a131f6dbd9ad6e1df1b10ca98099f8c1336efa354467d3ff |
|
MD5 | 860f132a9f09c9d0bb27ea850dc3c906 |
|
BLAKE2b-256 | 4fab5647994662fe17246f37eff9de3d615ac1558befa1ef389da3211f946d55 |
Hashes for qsharp-1.5.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 300a965cd17b93e15bc02dcd499888552a78b90e05ff25b23bc4abb87e636dd5 |
|
MD5 | d4f674135613e0db6c9c7e02051ece9a |
|
BLAKE2b-256 | 08fca8b3ffe3befd9475ddf95cdb5f6bcb5c0f877ad33eff765b4a7be7ef9466 |
Hashes for qsharp-1.5.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a783474f2951a5d7e6c779eba0513cd330384d3e4c35fa391c8d4842ba571a1 |
|
MD5 | 3d74d1e463f8f53f05672ab9d24a6472 |
|
BLAKE2b-256 | b66e1867f0e331f320ad58cb28ac312e5cd2694f373d48ce13b9866405e4642b |