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.3.5.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3672e369e4cffcdf1175e645eb9855c3503b85638c2b39eaeb51fb5aa1ab45c6 |
|
MD5 | 560aa1ab4ac4b02cf96cf2748f800656 |
|
BLAKE2b-256 | 640bef28fbe4593c7c873db1b78d0edeacc781c0e9b923baf9b3e95a87c3b1c3 |
Hashes for qsharp-1.3.5.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcd3e1c3b443d57af17bdb3bbdadc17a4bcc93403590cebc6ec324f2453a214e |
|
MD5 | 66b0acdaa7291ad7913d0f4672ac3f31 |
|
BLAKE2b-256 | 6b3a0154b8b05adc82437d743ccb4336d739febd7a39d32dff073d652df9980c |
Hashes for qsharp-1.3.5.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b316e0b2815e67281c1b8d1047234734035224001d33122b993689aa5b6bb0c9 |
|
MD5 | 9c9b8d810e350c868acdae64714c5979 |
|
BLAKE2b-256 | 35a6300b8c52464f7c90f57f7101108ab17eb8dd6ad18c10298ba4be36a88b33 |
Hashes for qsharp-1.3.5.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 560194f1aae9ffe8fb5cb4f69826607edef501fb2d487442d1a53c9f928458fc |
|
MD5 | 99d54b74f6933db324a3da2de449ce02 |
|
BLAKE2b-256 | 636ce9df4da108010bf8b299aeafae225fc4b949548d312d98c9d1873bdadc97 |
Hashes for qsharp-1.3.5.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f313b93a6acf7a9a3ad7ff8c9a745a09aff3ef59b0ea86fafee676aec5e17880 |
|
MD5 | edaeaea0cf5d6237e3b55b7806aadadb |
|
BLAKE2b-256 | 13c35d078fc7d9f6b9e199479318cbb6da5e9a5a9ad13d3f722bee9e75a89bb9 |