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
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
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 information about the Azure Quantum Development Kit, visit https://aka.ms/AQ/Documentation.
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-1.5.3.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8002766c11793ca7cf495365e0e0f85e8c702a13a8388b82d06f9924e82363d6 |
|
MD5 | 80754cd7a1de4e87d41a5d2182cf1e91 |
|
BLAKE2b-256 | 965dd2e57364e002478c1cbf2e4f7f997759d91054c2004e51a0af3c061725b2 |
Hashes for qsharp-1.5.3.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a95ef030bc2d694cf7bc82f095ffcbcc24d7fd2d99dcd0c4f534852575cd8caa |
|
MD5 | 84dcdb6cb9c9cb935e31f249a9291442 |
|
BLAKE2b-256 | ab87277216237d0088030e82456b4854ddb4ea9429d4ddff1039fde56da6b1e5 |
Hashes for qsharp-1.5.3.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4ce8f47d31b56625cd96b76eaebbf2096c415c9cff03fc5822664b76eb7234d |
|
MD5 | f7582f33f80570bdc3235f3776146e0f |
|
BLAKE2b-256 | 6061d1653176a85f1fe3c1fc5070463c0af2b9e37ed318433d046fd8d362eb5a |
Hashes for qsharp-1.5.3.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48a549a961a0bc3e29f6043c7029c23cdb68324b269b67317213ebf9245f7fee |
|
MD5 | 690108aa9261834a1d9012e4f404c818 |
|
BLAKE2b-256 | e4ae77ffc54ce78e68a2c102c57a870ac2155b4c9dd100709e3f5dc8d3a38872 |
Hashes for qsharp-1.5.3.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae2261659e5122de4ae8f843f03b5440c86efe88e106f491993b0f729bf4341e |
|
MD5 | 44e6d908007865df7ccf6bdd9751b5f2 |
|
BLAKE2b-256 | 7149b87b7b87471ab86dae54004498ffe53a32d440e57c13d30cb8589fc59d37 |