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.6.dev0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for qsharp-1.28.6.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 6160dac154eba2b1a6be6b48c7158a2277849e94c376d754578184e54fa3b10d
MD5 4ae52f0aa27cc61519115b3fa767d434
BLAKE2b-256 ae11216f647da6f68e7c8250f3993adb8d74589b2a05a32fd39a859f1f6ddf5f

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