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.8.dev0-cp38-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85a8c04fc0381f3f4559f6d9736fbeffbca1cd38630b23b226258d3f7042f613 |
|
MD5 | 35b1c02118973ff832b42958a58a8dc3 |
|
BLAKE2b-256 | bc9d342fb263b9ebfa5eb0182de2339bcd0bd7d575cfebaf291e24bc8737edd4 |
Hashes for qsharp-1.6.8.dev0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d50d61c33ed715cb811dd9695bc3f33e0af69f234c05ef28d4e7ae89079e1ee3 |
|
MD5 | 8dfcc24654ca59e1d5a1b0f3c79e9875 |
|
BLAKE2b-256 | b00d800b5bbd8f01d54e2eeb1890b3c9df8a78c52ca3873f7a7f7a66c04a5dbb |
Hashes for qsharp-1.6.8.dev0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c970b96cb42abceb677d86cc4576aa621bdc41a8935c455825594a584db3f3ed |
|
MD5 | 050fe177e367f8277962986c37cd53d5 |
|
BLAKE2b-256 | 650f7bbe648d3ef4883aaf6ec42750a22319bff166b85cfaebd9473816390d51 |
Hashes for qsharp-1.6.8.dev0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9a7d9a11552a7f2d42ed75288fd78a682d1f39c07a3e376d9fae240a1e3bd74 |
|
MD5 | e083775f6579598c032d477a11605a36 |
|
BLAKE2b-256 | 17534070e90f5ec7849cb3fbb94122d03c1510bdd9a7fe157866c3e63ceb2a2a |
Hashes for qsharp-1.6.8.dev0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8356ded3c91a74bb5b73d6b046482cd35625d2088e1f764d7168c244e330b829 |
|
MD5 | 788dcda7059702d75e43907567557f03 |
|
BLAKE2b-256 | 2b9334e08051e64e961cdb93c808955ea631edfd34e15f2d42fb292bd17a6bb3 |