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.13.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eb4ce922522ffa3259b5fb62fc39fbde927263c1c09130d50ce98f63d682baa |
|
MD5 | abd113327f6eef836319212c4fd3c538 |
|
BLAKE2b-256 | 99ff9df620fd4aaa5005aaae7fe316e0f350673e943d3ac4ffd055b9c4780657 |
Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74f52bb5eac2beb02d03895ddc0297fa4bb80c1e20b182c8f8a755141d3e2d29 |
|
MD5 | 30b402195f7e54ca5ef09c9f78716a8d |
|
BLAKE2b-256 | 3b2a38de331289a711177ee9c2ad0b693e4b3e5396018493291a1ba0158081bc |
Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cde70e772a84e89e16d883911972f6fb82b261d48992394b0e50d307ae6b5eb |
|
MD5 | c9f9dcb2a5b03270932e15a442aa0f54 |
|
BLAKE2b-256 | 9206489e020b1e83f50a3f9984e93682a1abbb11374258df6b39a29be6985180 |
Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 309cdd7081cf97fc6837443aadb52b064aa007f161501334781036938028ac5c |
|
MD5 | 5cdcfd2f2be5105206044fb55d777d7b |
|
BLAKE2b-256 | ca49095cc980ffbdd47c14b976aa17d1acda88ed0f5c423cc56697faba0e0a02 |
Hashes for qsharp_lang-1.0.13.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f355bb6efc467ed2e9a5081e098eba55b0839a5208d53365446565d18d190d4 |
|
MD5 | f2b98c4ee12066ae21558f46c7159fe6 |
|
BLAKE2b-256 | cf86c3a831000bb7c8620f4a98e926d4e4a024de944fae235a05771c25ab281f |