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.2.0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f91c7ff2e976466356accd025414cc2d53f62d1e93f62e623c270a77291504fd |
|
MD5 | 05b51591116f38775a9cbfa2cc9283d8 |
|
BLAKE2b-256 | d8bff7ba745841ac924746bb1f0d3a8c2f3b2712b1afc5c6f51206b9f908a0bb |
Hashes for qsharp-1.2.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb845606fdd96addea6d68dac530ff1adf961ad20ef9ff2521e5b8b6cfb84b18 |
|
MD5 | 2dc2111f3684d92c758937a7e8a69eb9 |
|
BLAKE2b-256 | 4ebf6a1975604800c41da2c4f92bf4e4cfeff3438883c174028e5c14bfc1e0bd |
Hashes for qsharp-1.2.0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fd2c925ca4478d856c0f7cfe0fc455caefec310a6b2a6065172d0463c4bf872 |
|
MD5 | c8e383b20bce22f13a4fc6afd5d2bcdf |
|
BLAKE2b-256 | 61b942ab65bef916e98fe81e27f64d7e102c1391bb7ac08c5bbe70d1d0895d0e |
Hashes for qsharp-1.2.0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1802605fafec6b3c72d6039d8dc740c52df8a77f35f44582e3cf0a062c2b6ef9 |
|
MD5 | a98b9a2f25ec8edc9a7501cc959d88c5 |
|
BLAKE2b-256 | c73401aea63df42c2203e560b6df89bd76d361bcf52b48d7490950fc8ff62dd1 |
Hashes for qsharp-1.2.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 035c76583d92b0fcc9ccf6c3746077b38eddf785554af240c0b0629cabde56b3 |
|
MD5 | f3c9c54ba3d8809cb7c55daade314dae |
|
BLAKE2b-256 | 2fd7673fc42f16b7a2b1c37a6f4153ac978e8b443344b430ebdfe3dbbfb967ca |