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.5.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88f3457d3363210a7d3995f1ceabd7119b39bad9dfd95eea49d2a51fd7bcd5a2 |
|
MD5 | 5840aa82b15325b74d4cd3ca89b08ce4 |
|
BLAKE2b-256 | bb8ae6cd09a2fcafb296d29355d2b7dc03a6613e3c7a1c617eaf045352e12136 |
Hashes for qsharp-1.5.5.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 155da9879728b064c6a556c257297fb3769c47b884d75b22ae0b194629cee0c9 |
|
MD5 | f205259949e414b8cac469778e8acf3b |
|
BLAKE2b-256 | 7716cd8aa3f6ae1d98459d150645914a861d6b5e31b184feef0b59a1ff392f00 |
Hashes for qsharp-1.5.5.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9859a87e32de84179cbe5bea85f60024d19194f84937f4031f7df06bfabc67c1 |
|
MD5 | c803f1590ad540f48471695e293dc799 |
|
BLAKE2b-256 | 2d120a43a4ceb7ba7f04abeb8d2a4baf958be46d0c9b2484d14cc8406a8f3686 |
Hashes for qsharp-1.5.5.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9225bc96f61a6ef77d9d85cc8ab21504e3c2c043bafdfdb3c38ba9abff00e385 |
|
MD5 | 87714b287786f8bb13f58f170910b7f1 |
|
BLAKE2b-256 | f00b99c4a5a52a37c70899bec8101f1983f132586168c0253fc04101cfe0e69b |
Hashes for qsharp-1.5.5.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e5b9e781f201cc3bcf6d75f0858ccf6c7411b45585523510b48eb5cafa36375 |
|
MD5 | 99994508ac8250b1f2fdeefa30d4dbd8 |
|
BLAKE2b-256 | 3dc323d8419d9ef050ea08306447b7ccb0ed4a22aea71be9d7305059a4ee280f |