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.24.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2038f0ec7be5845bfbf470078f672f2f06f525bbe314479dff334c4bbcd82f61 |
|
MD5 | 250e77303612bcd92ab162ae1b0339d6 |
|
BLAKE2b-256 | e2f07e14eadc88e110697f365866de1d037fc55e7012075a85702929d80a8f24 |
Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2feb719fa220e8a8e6f23cfbc4a16b38ccf112170ce1ddb7ab80bb461c6c7ea |
|
MD5 | a55679e975f36932caa16e7b79d6ce7e |
|
BLAKE2b-256 | f8110782c6964553e31c6851e5ca309e28c5f3c55f00948711013c537b84e63e |
Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81493e4c577fae2c16fc04b3d24c8ee6b610543ca828943952c9bfe1839900a7 |
|
MD5 | 530db91a4cc90a334685c8d4c387308d |
|
BLAKE2b-256 | 7c3c0f941ad5c268a78706fec3f5a9687e43a6d3f6e50f076b345ef77b40fae0 |
Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e06292819dafe56ef9d18af25c7bb5200271954b82c8a74920191730c69cab2e |
|
MD5 | c187d96d07c82a7fc1bdc6d9ad7474fe |
|
BLAKE2b-256 | 1c0e68ef72a3a1a0f63c5863f1fa7b7c18d5a41fa65c07dd434ae6deaefc1cf8 |
Hashes for qsharp_lang-1.0.24.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb23c1e3feafa601591918cc5b18dffcd4329f99c99138e6028d3a35e370d0b0 |
|
MD5 | c0a504d266379f50dd265b9712629766 |
|
BLAKE2b-256 | 5e20f1c26da779378f409e0145cb0cad9eadacbef172d08f307f099c750e0384 |