Skip to main content

No project description provided

Project description

Q# Language Support for Python

Note: The qsharp package is deprecated. Please use the qdk package instead. This package is a thin compatibility shim that re-exports the qdk public API so that existing code continues to work.

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

pip install qdk

For backward compatibility, pip install qsharp also works and will install qdk as a dependency.

Usage

from qdk import qsharp

Then, use the %%qsharp cell magic to run Q# directly in Jupyter notebook cells:

%%qsharp

import Std.Diagnostics.*;

@EntryPoint()
operation BellState() : Unit {
    use qs = Qubit[2];
    H(qs[0]);
    CNOT(qs[0], qs[1]);
    DumpMachine();
    ResetAll(qs);
}

BellState()

Telemetry

This library sends telemetry. Minimal anonymous data is collected to help measure feature usage and performance. All telemetry events can be seen in the source file telemetry_events.py.

To disable sending telemetry from this package, set the environment variable QDK_PYTHON_TELEMETRY=none

Support

For more information about the Microsoft Quantum Development Kit, visit https://aka.ms/qdk.

Contributing

Q# welcomes your contributions! Visit the Q# GitHub repository at [https://github.com/microsoft/qdk] 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 Distribution

If you're not sure about the file name format, learn more about wheel file names.

qsharp-1.28.7.dev0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file qsharp-1.28.7.dev0-py3-none-any.whl.

File metadata

  • Download URL: qsharp-1.28.7.dev0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for qsharp-1.28.7.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 685e8a6b162ad68cbb7360020af05703f474d9beee9e4c506263a4ce1f70f2c6
MD5 4ee7ff7ec93cc2c94758b1a7dea9a7d8
BLAKE2b-256 2d172f49be7b27ce4d65f00aea4007f562838e630720677c3cee2836a637ecfe

See more details on using hashes here.

Supported by

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