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.4.2.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa7be857e9fe80bde5b7e8cb0ebed63d08f9dc91b9eee4b6dc16d512458e04ad |
|
MD5 | 88c94d00f365f741065a526aa4e7d647 |
|
BLAKE2b-256 | a4e1b20587374d094d8dab2d151fd9304d7086d8a26bbdf2b6c7c778e9b14f2c |
Hashes for qsharp-1.4.2.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38356bf3ca3e207e694db5aecce2b3401d9ac9efdce3cb53cee49438c57c37a6 |
|
MD5 | 14f63de9fc1d91ba50c8d42e6c2f6d01 |
|
BLAKE2b-256 | 32e6478be63a2ef0e77fa8add2ffc52456f986802d9bc591d66c91a600061613 |
Hashes for qsharp-1.4.2.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff95e7cf3730d0b99e368aa188ad69e0a863596af914e840210dc02d8e971281 |
|
MD5 | d8e1327f7d838a0791482ceef8a19e99 |
|
BLAKE2b-256 | 454105d640a49cd36d7b21306f9e6416f190f8013c94b37d8f813842ab19bb96 |
Hashes for qsharp-1.4.2.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f1b8c311c308bd2fbbfde094fa3262b6d5b6b243dbcd9c3b542fa7721f5bf1 |
|
MD5 | bee73b0b5ced3b382dce5b2dad3bec74 |
|
BLAKE2b-256 | b30fd335361961c245fdbe3bf41c22dbc1ea455d045887a45bfa125435283882 |
Hashes for qsharp-1.4.2.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0576b8ff66100d1929981b8f6379ac42a2a8c67a7ee23a60fba6c1f21696cf61 |
|
MD5 | 7f7ec1fc494a3990710c5a2731ef991d |
|
BLAKE2b-256 | 0779ff4085707ebf6451acdbc7f05e608175413203ba2cb0f77447cba232322f |