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.9.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c45c4ca52e61d10a97e69c3fa54f99d75856edd8d75338777e054447d9b745 |
|
MD5 | 467fc28bd4b22db1d848ca3f5a73e0df |
|
BLAKE2b-256 | aa3479fc0cc5e566559d8a2503906bbc82dad3074b893eebf3cb9730168456b4 |
Hashes for qsharp_lang-1.0.9.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0590de60295effa1d79ee96b911fff722acb340076e926c0ff8d3d91db7d85be |
|
MD5 | 02c364b21b0106c8c4e45f5d3e56f937 |
|
BLAKE2b-256 | b395cffdb20b09406e5a979ac3019e325566c390ac6c9ae8a746c17a2c035740 |
Hashes for qsharp_lang-1.0.9.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63eb9b5ed58c1323fc32a017e14f1fe69733405a2a825c87c1ecc2ceef55a9ce |
|
MD5 | ec9f2ff13b1109bd8800f01f79208721 |
|
BLAKE2b-256 | b4b57b816a6c2d9f3ec2c0eeab10ea186f10d94a1da697acc322e0bcda6c20b3 |