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.28.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42520d486e85845b21eaf207cf4c03b59c3f61082662cf34739638ca8210a816 |
|
MD5 | 36ce9b4c7d3b12c0b289db1e88816610 |
|
BLAKE2b-256 | a1ccc5aebb85ea98982a93b70ac86b0a98d966543e140d5728b14b2275e55a7a |
Hashes for qsharp_lang-1.0.28.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5720c171f7aaaf9f899c26f75db914c8644d10cac608b4f7f6b2f0f00747962e |
|
MD5 | 584b5700225470dd8836cd2882d7e753 |
|
BLAKE2b-256 | 9db227f010fc3a5c8e223366c679f3967b54ee6f65f183ebc2a6d8fb4a375f31 |
Hashes for qsharp_lang-1.0.28.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b23f8dcf079a25f55a3d30867a9812bc9da6e55443d98b5286125fc3586e25d |
|
MD5 | c893b1bce3b771c497355594c4207229 |
|
BLAKE2b-256 | a49d0fe1c0b216e93a9f779fe0601d1181fb8c62f59c73fea16955a7c77257a6 |
Hashes for qsharp_lang-1.0.28.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c743903f294d5d9f72b47d858bcd65ad4fd2c68220cc7c35d0cd7e5bb6a9df73 |
|
MD5 | 26f942ab9c00c9816df4c4db7dc8ab27 |
|
BLAKE2b-256 | 0bea199159dfcbc747b03fa7ff07ce5af14d5052eca9215dc26633509780401c |
Hashes for qsharp_lang-1.0.28.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 838911c845f5dcae14f6ce710c4d3bf866e3ba42809b5d0bd4560d4cf20dafc1 |
|
MD5 | d8a1665841a9f5dce4eca39d09e88db9 |
|
BLAKE2b-256 | 68b17c50d55b552474b627f0f896f0981a0251a939cd75e397e92f73b4c0f79d |