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.6.dev0-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfcb0b28f1f3c5321700dbc9c3135a052a919bf9c0428bdba6c39b88999bc3e2 |
|
MD5 | f995b2d28b867034d1c709fbc07027f4 |
|
BLAKE2b-256 | c6d6d1e46fab5f8a162dd8a2be125d0044b29fe26cb9af12d330dfa52ada1be4 |
Hashes for qsharp-1.3.6.dev0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59a511b65640be4730be62a1722ec847cecb0a7b38dafb8c162bcc2402926cc3 |
|
MD5 | b344ac9215565b467e03c5c25d5cf6cb |
|
BLAKE2b-256 | b34dfd85d6c75d0904d51b42967e8a4104b61c2e976065588c6d1557d72c4c6f |
Hashes for qsharp-1.3.6.dev0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a3cea98e56180621d4de82cd5098c823c3cfb0ccc75318642f49452490c5faf |
|
MD5 | 678b479c3608af6fd86ce046c574d59e |
|
BLAKE2b-256 | a01d66f255e4ebdb1093a8d8500283185f01a797535413c36e6a46dc31c6e1f4 |
Hashes for qsharp-1.3.6.dev0-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75675adc489113b6869de89ec9cee5bc01eb33e449202ca91614427d6d66b930 |
|
MD5 | 0d7081e077a5d6456e17033cc18f6e67 |
|
BLAKE2b-256 | 8fd4ade5fa4dc6c4b9cc50159fc029a2be8573638fa43f6d452aea45699b6d4d |
Hashes for qsharp-1.3.6.dev0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dde17faabc99a03918103dc5bedb7f483e21346729604de90b971b0977bf657 |
|
MD5 | f4523ef948291b522b0b91333c61b425 |
|
BLAKE2b-256 | c97fce0f2b9e031f879ada9edf13627a194c35650c5410a0d3cdcfaf20dbff62 |