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.32.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 712fc3fdd9da33ac5ff339bde58bf63cb4a7a1de41e3afd7654e233db2ec5041 |
|
MD5 | 1c1c94129a7dcd848a2f38a4f7851831 |
|
BLAKE2b-256 | 9cf73fbbe6ae23d97b04a6fbdd5014ccc23db26674d6d38bae9cf8fd884f0c7e |
Hashes for qsharp-1.0.32.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b71056838b83b1fc5f6973494fc94cd22ae06c57da2c3acb4de89b1f1b91fa8 |
|
MD5 | 07fe721c27537eb0cb62b4e423fdc28d |
|
BLAKE2b-256 | cfa631736405d262e98221b17719c694f1f1ea5fa12736e40a02185ddff5e794 |
Hashes for qsharp-1.0.32.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92a8b19f2a4bc2dea9dc3e4ca70b977e11ee77f4d60881f85526772628f47dbb |
|
MD5 | 22734f2d365a0430dad3cef3f8f8f474 |
|
BLAKE2b-256 | f273ce4cdd601c4c4e9a7a976d1f2bd38ce7b7c97066defe3d8263c43e6b43c5 |
Hashes for qsharp-1.0.32.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0ef0bb2fbfc61acc016838c3f21d6b64886e7170c1075c64a24580681d20831 |
|
MD5 | 51c065e184a698c4a1e0ca0353339e1e |
|
BLAKE2b-256 | 7c770a5f10987f4bb96e99b786dadad9a62bc012dc59f0a9c8bd02aa199e9bb0 |
Hashes for qsharp-1.0.32.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84bd203a6354be0c8c889c0715a1d2a1961a6df3f634da64b03ef237da3495d8 |
|
MD5 | d9722aa0079cb530759dfdff16441bbb |
|
BLAKE2b-256 | 286e35e7d3d1aec494566728cc7d397300f36f13a06fdc5a322c91c14ff7b4c3 |