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.20rc0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75ceac86de7b17bfec0ab88f9f13666cbd94fd5b4cd571ee9c98f68ca58132b2 |
|
MD5 | 48b027e8c71c78de3cde1f8d24c504db |
|
BLAKE2b-256 | f5ab5ad783cd1b500fc161d9a24972a5fea768644ae4356928a1bfe5cfe86c5d |
Hashes for qsharp_lang-1.0.20rc0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7562bee6cf3cf7a569e7c6f9021f66476c2dac6d91bae7fc37abd37fb9722f54 |
|
MD5 | e383ea3699b98578cde993464c4bd1b4 |
|
BLAKE2b-256 | b2e5715d717437b0f0dffa296c6432f7aa245f3105b3030effc3c022c4823a24 |
Hashes for qsharp_lang-1.0.20rc0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84ce6b7c2c3db359ccc72eef21a364168e665a49b7ab13bf2b812519556b0847 |
|
MD5 | bd8a40aba9c3309c0980de3c4d3fa5b5 |
|
BLAKE2b-256 | 66cf566ea022dbd7034dcb379b4ce5948ae754ae456f8fdaa2a7c049b27e47e1 |
Hashes for qsharp_lang-1.0.20rc0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22392d250ab012959618cda1cae8b545508296f7ffe9c02b83d47b1d9927a929 |
|
MD5 | 51731bb9d002f1e72021754983a50e33 |
|
BLAKE2b-256 | cc233a32e411c801f2b7de66fd4957cd2f7e5d19eafd16ff80a196512e8cd7b0 |
Hashes for qsharp_lang-1.0.20rc0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f2ac581517f2b8c64cdce1c18d11aa41389df6995ed4fdcaec14b1324bf6d9e |
|
MD5 | b154677e4d4d596b03a2a366b07cc0ec |
|
BLAKE2b-256 | 8507bbc2a824f8b1edff44cb9092bf868777743ec05bdb0cb7cc2ee7daeba68d |