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.18.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e83770054accbc97eb6d4611fd7ad934a36bd4f2af848524436208fdabd50233 |
|
MD5 | a2239a7285b946107689e4c5cf55db8f |
|
BLAKE2b-256 | eb861554be128d79b7ba4937ceb297a019f7a3343ed9e0f6229628d5ca774b9b |
Hashes for qsharp_lang-1.0.18.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0575f5967bdb6e035c55a9f6158b52d5e9caf58a3448571fa2b1290fe0a6ed6c |
|
MD5 | f8361bf21f2890143321f002bd83ae5a |
|
BLAKE2b-256 | f415137d75b8e3493716bd3e010520ffaec35c8f2ec88e7c17742927e15c93ae |
Hashes for qsharp_lang-1.0.18.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e97b888fbf30978aae30b57ca3bb559be9667f0d6e866ea6438052c29091757 |
|
MD5 | 1b0cf7630195f869c2bd8c5cc420865b |
|
BLAKE2b-256 | b45c3bf599f6df0888f972183104892a7f1d8e2b20e4692eb88f7b3716bc4640 |
Hashes for qsharp_lang-1.0.18.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91a585eca9eb5bf132e7340a6d953eed8240c3d32b17eccc753b8bb212eaa7b3 |
|
MD5 | cc28fd3e4d90d8c1ce3ea5a614ae00b2 |
|
BLAKE2b-256 | 935f73daca8bba9f595fe3599d70e04813e7db7df8206522508a6c41cee0baa1 |
Hashes for qsharp_lang-1.0.18.dev0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 101594d24ee32be0562b236508b2563fa45e70cbb7462479765d9d8bba455f6c |
|
MD5 | 09a4e799b5e78d6aa6c437e56b1eaf9c |
|
BLAKE2b-256 | 9d5b31e4cffc41a57aa133ef64142d131d27f22b0c5a40fc20cd494af8afe045 |