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.6.1.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38b5274e14a701b6df973fab8660f234cbd0586a956970f2fbd3694369220ee7 |
|
MD5 | 6dc357f1373c3f57777f681fd47cadf5 |
|
BLAKE2b-256 | fc684bfdd35e2de185c6e6f6f915b0bba13ba8ff6c604733b59cce26808ea2a7 |
Hashes for qsharp-1.6.1.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0e7dbca316ce623b573549464afab3258d3e05de38e16804f1ca83bcb6dba20 |
|
MD5 | 8b799d3d0ff04f158f1e8b2680a86e47 |
|
BLAKE2b-256 | 405a1a0996fd2c05563438a1541344be70d3ebf99c9d8112d05377c931d0ea57 |
Hashes for qsharp-1.6.1.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab42d1e92656245b4e38f20747e2a2daad26029548513aec5cd6ef8431da9729 |
|
MD5 | 30424e0718a36f3b01e2a08bfdbefd1d |
|
BLAKE2b-256 | b12f8340263ce38e7ee3cc1704dba14be67e715cc298b09ad19e4bde8aff9413 |
Hashes for qsharp-1.6.1.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60dc799a839c53093965488a8857710f4fba1ab538561babfa0cefeccf84ae87 |
|
MD5 | 7caa889dc5aa88c07051c0eedafcb452 |
|
BLAKE2b-256 | a412b0441f4f544752468c2a8c7e5a2c7118aa0dfdb69b5a723046f3793e7b3e |
Hashes for qsharp-1.6.1.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96b3725673687202fe1317e2e6217e12ecbb2a67f03d71e9de90ab5fcd36f8ce |
|
MD5 | 0c2bc4cf36212fbf8a4a29d94acd2608 |
|
BLAKE2b-256 | f90f4fd94812559eb5b98a03a8e16618b5e3381834fa2e38dc8cc0a8a4c4a453 |