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.8.0-cp38-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2e37cb398ca7786ee7f36b3b602419dc7ff6626cb218416985908f754f683e6 |
|
MD5 | 502e8bef5335b09483a0c1cc05f03112 |
|
BLAKE2b-256 | 8b82f265a614217bd7bcffd354778d75344b0804d90a5c93e1bf0e3ba4403076 |
Hashes for qsharp-1.8.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb0ef087b70af4cf5100b8f9229378dde1d11bee985b2d1838bf90a72288a794 |
|
MD5 | a6fe9325ec67a1b01f0bf66dde7c768e |
|
BLAKE2b-256 | 030f0bcfc69b3d066245648b5af05a26d4e05aeb9994160670473431886423d0 |
Hashes for qsharp-1.8.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bf65dca61fd0e327c14e7ecbe6f3da81c07ad511a11c0f83104806278187214 |
|
MD5 | f30c9220b822eed5e4a5ec24cbe7cdde |
|
BLAKE2b-256 | bb1ad44d997dba831a29a8da1d94bf1f5f4f656783128388b1e0debb02a40e80 |
Hashes for qsharp-1.8.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e103782f8a5d241e21675e84f7cee842164b4de7010968141b44437899f2336f |
|
MD5 | a50d470570f833000ec9f2f7049ac19b |
|
BLAKE2b-256 | f11dccdbc21059fdceaa1ac71bb6eb84509b8b9c8ca051399ab72e09710fecf3 |
Hashes for qsharp-1.8.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b73a4ae15ee742a3d65f1506847fe5349bbe9ce99310b8041961367a818ae4f |
|
MD5 | 597a1bd72d4f5c0c9735985ad7e75fe3 |
|
BLAKE2b-256 | 3fcc22dbc0f90af29f3f08df751ef3e8f705598773e9425559a1302c01bfb0a9 |