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
import Std.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.9.0-cp38-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6b76ebcc44e14eedf4243ff6e8daacbd6b5e47211628a5a581459bd62ec33dc |
|
MD5 | 15ccafb6c4c3c896d89e03f2c869e093 |
|
BLAKE2b-256 | 1707913b7b5ddc51fbcca274495cc3024a4d7f2ba9837a39876c84175f182875 |
Hashes for qsharp-1.9.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dfd2c462a587665a8f760e461b644149fdebf30f7bbe2bd3a39f2dc3cbf6721 |
|
MD5 | 98f2135c9f99f6338e8fe5bbed689bfc |
|
BLAKE2b-256 | b6f9b1c8812d9916678ef834aac6dc557be5ac5e22693ceef12ad9d2158b481a |
Hashes for qsharp-1.9.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49bcb2f14a44da010db7f36b92e85113f98c3d7669f3420af6236e8bb4c15b3b |
|
MD5 | cfe4e97deb2f9627d4930b3794441dcb |
|
BLAKE2b-256 | 120c6f72fe8da05357e519707f1bb16676ca2356392630791d40eda33a7a06fe |
Hashes for qsharp-1.9.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5f77340c52a70d1a0f712086ce3fa7f88d089253cf72c3ddddd3aed9680e467 |
|
MD5 | 96daa71d9af7340d0bf0df7118a7f6ed |
|
BLAKE2b-256 | fb9dc36a80c882fa2307e9aa12e8d1134448bbea465434e2c0b4d6b9d29d4271 |
Hashes for qsharp-1.9.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa9f4b7dc5aa3ceca64387c411a7d9d80e8cd72f6e269d356374364e8b6ad6a2 |
|
MD5 | 1a6b5fe9a6b3808dc600d20a087cd958 |
|
BLAKE2b-256 | 3edcb119e958f649507fde98dcba2f444669f12c3fcd830e32b7242a4ef0840a |