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.23.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a839e770f8ffcb63bdeb92d8ea952a81573e8bc1a03cf9db764c421a7a3b73a |
|
MD5 | 3354849a55c48062e77e4702a523eea0 |
|
BLAKE2b-256 | dfb1f23a04703823ef48eb1b27e439abb764b91fb9ef9d43879c70dd15619ee1 |
Hashes for qsharp_lang-1.0.23.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 065cae477bb5635897328b14228abbb954fc9d41ce515a0f9fe7f77ea3a20a92 |
|
MD5 | 4886f436d5055dabf5e06a5ee2580191 |
|
BLAKE2b-256 | c246f1d1b8b5221ad24f12f913015d4715ab53cca51fccc45fbe872385e45192 |
Hashes for qsharp_lang-1.0.23.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e4dddc04e6ac0f8257e25de54ffe8558bd75e69d05da442c90b25e123997fa |
|
MD5 | f000613c01cc6899ab08e59e6f95f1cc |
|
BLAKE2b-256 | 626cbb26b3b941e51f1e916cb420a698c8d28c23c7d581d1e241d1cc092265f3 |
Hashes for qsharp_lang-1.0.23.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9af6171393efe9814058065826977c5b04b06d7f164b965406c9a12aee18f7b8 |
|
MD5 | 5c150479609c8d3773478c803de62f65 |
|
BLAKE2b-256 | 08782e4aff4212c28a3a751e3182ad9630ef980800d9dbe0b143930b7b55dfff |
Hashes for qsharp_lang-1.0.23.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e374c78726bb68fd2ad34472f8dd566eacc3028f641736e0e23ab3b6b979ce7e |
|
MD5 | 7f8e01f24865d091ca8045029055373d |
|
BLAKE2b-256 | 3bcc3b34af4733c4e6afe1eb5e2d2f861fec986e84f794909558414eafa79501 |