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.2.1.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 147bbda42d7fb1ab1d2b78a735e3985b811844375434a522be2dffb0182ad63d |
|
MD5 | 6a11dd960a7886c17cb5c47cf94037d7 |
|
BLAKE2b-256 | 6a76ccd9ee627174786849bf7cc0b4684cb981b34e7961f768c91981c8126b19 |
Hashes for qsharp-1.2.1.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aec44fde34769c3bbc299717201f0a0a17306638528a1be839798548e91d55f6 |
|
MD5 | 6999f4c5f6976a14fae9ea8a789df511 |
|
BLAKE2b-256 | 421c4b174f066228fe1eb6fbbfe5665fee4aa96ab6fa3f891b0130c2693b9551 |
Hashes for qsharp-1.2.1.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18fc8c3f02404c24c7761b9fdc7efe9b2af4b09617a5a36d1eff7bf33282ad20 |
|
MD5 | 18afb0c8b2cc197c39da147cd59e5962 |
|
BLAKE2b-256 | 76e2829797ec45d87e95b9722668531c683f2c1ebb4756b5e17a89a0deddb845 |
Hashes for qsharp-1.2.1.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 635e14edcbf2d5f179ce1487e1511378d96fdbb25ca5ec2fcc5d902f2c3881aa |
|
MD5 | 7c23defeab02bec182c0a4f2de3402fe |
|
BLAKE2b-256 | 12428299e1a5f446fa7d206575655627207716380339095a5c7b6fc4a563b17b |
Hashes for qsharp-1.2.1.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ddfc0e8f5a7b9e5004badf2969dc45f1420fd5faae5906e439729763a8cd371 |
|
MD5 | 3dba2ad999fdcc51354946915f60fc77 |
|
BLAKE2b-256 | 3127ce364b581cb2944dcb85dc333c6fb2ad58cb4a4e48c8598c647e99eac695 |