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.1.1-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dceaa0ac5b9e5a0fe9cfeeffba8070999822cd55fa7173b1f703600d957937b3 |
|
MD5 | 704925e688bb2a5f50bebce4faaa9ee9 |
|
BLAKE2b-256 | 3f4e0ef84487aba529a3da4791fb1eab2fc26e5247c7c5aa38309e3a4e833e51 |
Hashes for qsharp-1.1.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e219c1cfa89b03fe4b9f1182286916e8b8e49888365d4685a5d8155831e3c07 |
|
MD5 | 17b18a613da9ba23b2394980709f38ed |
|
BLAKE2b-256 | 7648683c5db1e33efd21196e72cfb64beb01d3f950d29a5cc7807f4c4580a18d |
Hashes for qsharp-1.1.1-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89e51658515e65dd2aa350874b548840e2a93cb631aa49bdf834d6792128239f |
|
MD5 | 72cc454a1194a0b97e0db67fe27e5e35 |
|
BLAKE2b-256 | 6a613392782b292ea52aefdd5a9e6fdd72b364874350d5d07256776c2ced7f15 |
Hashes for qsharp-1.1.1-cp37-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87a2338fe209f34d13b04ce73d7550b735f0e1279353d44043427e6123ba63da |
|
MD5 | 0d609411f1faf8c7cd2ac97085c5c20b |
|
BLAKE2b-256 | e551623aae5550dd6340114329da65b44492c87f761046026f9118ddf15ac969 |
Hashes for qsharp-1.1.1-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca88a1564ece10b3786a4241c8e4979dae16f0225c3b1ab893579f09f608dd20 |
|
MD5 | c4e809be2446a102b8eb41809b2b9406 |
|
BLAKE2b-256 | 16236943f31aabb81a65cf43f887770f25697a2b36d346aed15918778cb77b75 |