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.7.0-cp38-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58ec2cccbdcbb364903486517f1beb91d5dcc6922dc544646b6d4a433dd9e67f |
|
MD5 | 6f457157bbe0e21e79ff0d0869890437 |
|
BLAKE2b-256 | 52d1c9fd6c983ce7b20d2cbd1fa67ac0db27d6c46d6d04c5a005c48cfa9aac05 |
Hashes for qsharp-1.7.0-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f8f022da58eff40b2ccbb9cf95a88dfd897e093c8a218f9c65806d521df41cd |
|
MD5 | 341080d7aab1b750f9c5e4b4e9d1e650 |
|
BLAKE2b-256 | 22bb4c5d3ce3bc9c5fe30614db0e7c9190396b40193b43da744f839393f1cc7d |
Hashes for qsharp-1.7.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 027bf12ccd95fa3dc0f706b0f5f49a1afe601fccc1586d1d35fb56704d53732f |
|
MD5 | 6c94e02929d0899e9cc2533c0b8452c1 |
|
BLAKE2b-256 | 4d52c748fc769083b1399eb0b70164e31bf0bef76716b32fee6789546e1fb250 |
Hashes for qsharp-1.7.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd94ec08351291f0e9fc5f85e9fdbb51b44f8c3e114986a1aa95639721ded36c |
|
MD5 | 35dd67ac4dadbd32a724f3a19a0d5b18 |
|
BLAKE2b-256 | e5c039bba95ea2c617c5fb9dc5bc2a401e1b27c915a421115cfb6200c59b134a |
Hashes for qsharp-1.7.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f70032fcab17c1db0512cbaf9ea48b93942b92d18720eac5c161fee13aefef3b |
|
MD5 | 2c8e20d5b5c0233513a5ee625f50ac06 |
|
BLAKE2b-256 | bcad2994f538484c9b013659569cd68be79f2dff0ed6ed002316c1edbcdebb1c |