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

Uploaded Python 3

File details

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

File metadata

  • Download URL: qsharp-1.28.5.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.5.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 3781106d363f8a97fe4d25879bce533116248f3629672ffc248f966e18dcf016
MD5 775ab4eb621eec8011ae24c0f9101656
BLAKE2b-256 3c4359f3be42105fb5254eca16a122b92eff58ea8ee8601b5c77deda7fd42113

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