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.0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad086dfac0bb88251678bfaef0e03431eccf03b891bf0d7b4d1e0957de342ac |
|
MD5 | 5d0b8be503ed32604448d3c18d582f68 |
|
BLAKE2b-256 | 066605dd3c7d2e77efea99b26bc08f72abbab2fb5a465704ec3cfa01b2bffc00 |
Hashes for qsharp-1.5.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82495250b5454df5fd0ac0b4faa847be7e41fe7b66fd7c7b5431a0bab14606ae |
|
MD5 | e8eb4e70205c3062fc6a4529bbb02a84 |
|
BLAKE2b-256 | c35323f21057cb99fc1e72f55fef8fee090ecd3792b83cc3a3eb29fa127faf4a |
Hashes for qsharp-1.5.0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d419df94ccf19b2bac3fc7fdba7acb2a58116521daba024bac1b70adc9c0518 |
|
MD5 | ab15f0eca7bcdf8235dd7704826700d6 |
|
BLAKE2b-256 | fefda32e1adb6e5d0e4f482b16cb90ef851290b9357d781a63d10f81fe49f585 |
Hashes for qsharp-1.5.0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30d640712f50e2098dba0ca699da4f28dc745058f38f0e7c12f863ceb3799e5 |
|
MD5 | 1fd373e233fd68d785d2fd8b9b14337e |
|
BLAKE2b-256 | bae8c56939558583d506630fa1e3ef597bbc2f56714531fa717d1a6e13395bdc |
Hashes for qsharp-1.5.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 673b524fbc0cae8839f255d722b194ab2b00511502afc45a14c56e1cdd277cac |
|
MD5 | d9f8f733e60906f53f223663be6ef03d |
|
BLAKE2b-256 | 9b494175e9575b74f3ee8489ef8f5bb98265ba6b6e55abda71cbaef74d3022f5 |