Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

qsharp-1.7.0-cp38-abi3-win_arm64.whl (1.9 MB view details)

Uploaded CPython 3.8+ Windows ARM64

qsharp-1.7.0-cp38-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.8+ Windows x86-64

qsharp-1.7.0-cp38-abi3-manylinux_2_31_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ x86-64

qsharp-1.7.0-cp38-abi3-manylinux_2_31_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ ARM64

qsharp-1.7.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.8 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

File details

Details for the file qsharp-1.7.0-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: qsharp-1.7.0-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.7.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 58ec2cccbdcbb364903486517f1beb91d5dcc6922dc544646b6d4a433dd9e67f
MD5 6f457157bbe0e21e79ff0d0869890437
BLAKE2b-256 52d1c9fd6c983ce7b20d2cbd1fa67ac0db27d6c46d6d04c5a005c48cfa9aac05

See more details on using hashes here.

File details

Details for the file qsharp-1.7.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: qsharp-1.7.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.7.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1f8f022da58eff40b2ccbb9cf95a88dfd897e093c8a218f9c65806d521df41cd
MD5 341080d7aab1b750f9c5e4b4e9d1e650
BLAKE2b-256 22bb4c5d3ce3bc9c5fe30614db0e7c9190396b40193b43da744f839393f1cc7d

See more details on using hashes here.

File details

Details for the file qsharp-1.7.0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for qsharp-1.7.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 027bf12ccd95fa3dc0f706b0f5f49a1afe601fccc1586d1d35fb56704d53732f
MD5 6c94e02929d0899e9cc2533c0b8452c1
BLAKE2b-256 4d52c748fc769083b1399eb0b70164e31bf0bef76716b32fee6789546e1fb250

See more details on using hashes here.

File details

Details for the file qsharp-1.7.0-cp38-abi3-manylinux_2_31_aarch64.whl.

File metadata

File hashes

Hashes for qsharp-1.7.0-cp38-abi3-manylinux_2_31_aarch64.whl
Algorithm Hash digest
SHA256 bd94ec08351291f0e9fc5f85e9fdbb51b44f8c3e114986a1aa95639721ded36c
MD5 35dd67ac4dadbd32a724f3a19a0d5b18
BLAKE2b-256 e5c039bba95ea2c617c5fb9dc5bc2a401e1b27c915a421115cfb6200c59b134a

See more details on using hashes here.

File details

Details for the file qsharp-1.7.0-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

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

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page