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

Uploaded Python 3

File details

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

File metadata

  • Download URL: qsharp-1.28.4.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.4.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b520dfd9c5de0c3e0ea6a2fb2478aaed8f18444405161c09a611a91fc4bd8df
MD5 b0e19c5980e15ebdeb2743345c1f8f9a
BLAKE2b-256 724291cabb988dd299209d0b127cbf993f89fe200f62d3f9424788ddc4cd59af

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