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.6.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12397bb89a5f541b2cdb4e79cf29fef02b10f517d5eedfe77fe369d9f8a2a289 |
|
MD5 | 7cd5135a5d5f26116ffc1acce607b042 |
|
BLAKE2b-256 | 7d1cdf894ae6b3d64ecb0c3b83732e131ada34df7e8e247ac076d7b904f4c32b |
Hashes for qsharp-1.5.6.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca5f95e440c3fbdcbb9b8c3cd176e2cf5a32b183a4d4237ed18409bdcbe2165a |
|
MD5 | afb38aee762665eb5548df8052455e82 |
|
BLAKE2b-256 | 24249361c2a1a33b9903c5459407e3f99d0eb9c0315e468e8c083d3e49f1e5cc |
Hashes for qsharp-1.5.6.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ce45abdac38c42460177ed31da036a035be8dd06da8d39c36a23eea7357e23 |
|
MD5 | 4cc5f56e35cb2bc26f0c63ebdf13abe4 |
|
BLAKE2b-256 | 707cc705e505055f79eb5e52350c75ea647534a8d67d5879c5e20a5c4ab8e30c |
Hashes for qsharp-1.5.6.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d34b1d4222106025fec2a511c4a8d81b21f7e483dd01fd17dd2bbb5e3726310e |
|
MD5 | a455a338c03073cb7e6a07c0017e34f2 |
|
BLAKE2b-256 | 6bbb4cb6a6524631a5774d0c77fd82c44ba80ddd99685412e30280f175a4d89c |
Hashes for qsharp-1.5.6.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed6b68302949572799251003110e9e87b010b51439a16f3ce2dd5de1d69ff71d |
|
MD5 | 189937cf9109ebd0f3e83f029cf61d78 |
|
BLAKE2b-256 | 5ae77b90c03e248b5dfdb21862c82cf3b06902877551d74d6f1927fbc664b2e7 |