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.0.33-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb582e255c2ea89189d389644fdc8ad517316a361363d875469b753e442d33b |
|
MD5 | 82e30cbd33948f5c1f834b6293a20749 |
|
BLAKE2b-256 | 21a49b926f374918ef3b70da73b07df5295274fc4d03fc31ce64ff7fb399fbb9 |
Hashes for qsharp-1.0.33-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 696acec05c7cedc2804c8d4a3f8465eab1df980b445b50b668ab5c31074ec376 |
|
MD5 | 7e49788bc83589edebd121115d9cb23d |
|
BLAKE2b-256 | 380e39bebab454de7aa7d1a525441d81bb27c560fe584b1acf4c5fd5ac08a819 |
Hashes for qsharp-1.0.33-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a2e410acc4cc99895aba9cd021276ed77670ddcdd7d533c4014acdc217ea091 |
|
MD5 | a35be5b214c050b0e5c15b607b58eca3 |
|
BLAKE2b-256 | 8c52d4911524ba820f37e7bbb93b6c12b236a804fe75df936b70127d77a5529d |
Hashes for qsharp-1.0.33-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf80179b979c2e1c47f37c4cafc43dc932fd23f73e0cdb7dc382340cc906c544 |
|
MD5 | 5269cda719228d11fa49f29911124cda |
|
BLAKE2b-256 | f5faef2f22266d655366a350fbea9554a0e74bf2570b2ac2f88d2abef264eaab |
Hashes for qsharp-1.0.33-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a846a854586e32157327f9c14f306040d992d20f43b582323b42c88808fc2dbf |
|
MD5 | 5bb53c6a6d1b7a45f41fae0896f9168b |
|
BLAKE2b-256 | 2f7fb9a21e0118c683ebf216edd5a5ca2151e045fb3595890b7b622a852d1bff |