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.4.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a2619d2dd84c2851b182df91c87717a403eec25716cab5f8b0983406d10712 |
|
MD5 | 45e9730c05162744f0460d0315b464e2 |
|
BLAKE2b-256 | 913d1e509f0c41f82e54844a2786ead095434268cbf0e8e09f04977845e443a5 |
Hashes for qsharp-1.5.4.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 640a1890fd626c12f5e198c61f5c20f5d730d938bb6da98978f9fdaf80298bd0 |
|
MD5 | 3221dc17faacbfec61df16a818f8fdff |
|
BLAKE2b-256 | 3f4d5cdb701e1abc44581a3cba058ca773000f0610e12f9f2ba78dcde3e6d31e |
Hashes for qsharp-1.5.4.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7787b61e0f20f5c95e90ec39a2c57209752c81180742cb511f9b407d058e61c4 |
|
MD5 | 7b08c10cd5167479a9367b8f319feef4 |
|
BLAKE2b-256 | f94a67a8fd9d11a115ad0d9e0fda21876eb2dd04c3ff60c53c085a6592e31686 |
Hashes for qsharp-1.5.4.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda883defa89f53e439f478c2447356e8f3f8a99dda60b18639bd1cf9486eb9e |
|
MD5 | 2670f305bfea69cbbe18db9a7cd31de8 |
|
BLAKE2b-256 | b1dfdf2f7e91c6a15b47fb693d0867b047e7fe870f197c00354f3c08ea679088 |
Hashes for qsharp-1.5.4.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be9c25b0f8a5a749023857002b4fba22e98f40aa49c8187d350d39fc9d5db4c2 |
|
MD5 | dbda48c445b80902382cae9be30f40ad |
|
BLAKE2b-256 | c304ea728be4e6adec93be420d942da6457d8a677c02874307c028cbe66a6c8e |