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-lang
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-lang
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 documentation and to browse issues, please visit the Q# project wiki at [https://github.com/microsoft/qsharp/wiki].
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_lang-1.0.12.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d41fdb855928f9e91c98db78279b9b67ef8b0cbb35309f442797cfc911ee97d2 |
|
MD5 | 0078bd11b773cbe77728faf3b708de44 |
|
BLAKE2b-256 | 474c2e2ac6ea66fe6db228d19f529f2fe7188b7f855cd4cf8a2d9dacd49b310d |
Hashes for qsharp_lang-1.0.12.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c6d26ea1fa36c1cd85d800b453cd109f17d33d6121bad1a415ce146777d891 |
|
MD5 | 5cc62da6ab00ce98677c7f2b2aa419db |
|
BLAKE2b-256 | 66cd9ade2f15ed57262acf74e0b9b1a3126f513f67ca70876647e4a109638cd8 |
Hashes for qsharp_lang-1.0.12.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f822d16e1a1bec13c16d91f2af249fe2e9f3820258c93b7c6805636a299442c |
|
MD5 | c80044d9ee70913c150e4cbf522488c3 |
|
BLAKE2b-256 | f83f363efb7d395561224d0a6891b4f14d55338a1259dd48443816e4b1a8a2b4 |
Hashes for qsharp_lang-1.0.12.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89a6252eb95bb73d072266c5d8c4136eb2515f0e7c5b310bfa190307696f86db |
|
MD5 | d322b695773a0bbf0903181652574355 |
|
BLAKE2b-256 | 1ec4d842dba7b7c69a86a5233f7c07a24b079414579c431c400234b42d96a821 |
Hashes for qsharp_lang-1.0.12.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3822d305131bc5664292044dc22c53e840940011ec495879263699fb2fcb8a65 |
|
MD5 | 6493da6487f917161d35da0bf3e46f58 |
|
BLAKE2b-256 | 6b724f85f41aaad52abc123d30b101ecb65b4445d2a9c5c31fe244f3ab1cdeaf |