Skip to main content

Extension for pytket, providing access to Azure devices and simulators via Microsoft QDK

Project description

pytket-qsharp

Pytket is a Python module for interfacing with CQC tket, a set of quantum programming tools.

Azure Quantum is a portal for accessing quantum computers via Microsoft Azure.

Microsoft's QDK is a language and associated toolkit for quantum programming.

pytket-qsharp is an extension to pytket that allows pytket circuits to be executed on remote devices and simulators via Azure Quantum, as well as local simulators and resource estimators from the Microsoft QDK.

Getting started

pytket-qsharp is available for Python 3.8, 3.9 and 3.10, on Linux, MacOS and Windows (except for Windows with 3.10). To install, run:

pip install pytket-qsharp

In order to use pytket-qsharp you will first need to install the dotnet SDK (6.0) and the iqsharp tool. On some Linux systems it is also necessary to modify your PATH:

  1. See this page for instructions on installing the SDK on your operating system.

  2. On Linux, ensure that the dotnet tools directory is on your path. Typically this will be ~/.dotnet/tools.

  3. Run dotnet tool install -g Microsoft.Quantum.IQSharp.

  4. Run dotnet iqsharp install --user.

Alternatively, you can set up an environment with all the required packages using conda:

conda create -n qsharp-env -c quantum-engineering qsharp notebook

conda activate qsharp-env

Backends provided in this module

This module provides four backends, all deriving from the pytket Backend class:

  • AzureBackend, for executing pytket circuits on targets the user has access to on Azure Quantum;

  • QsharpSimulatorBackend, for simulating a general pure-quantum circuit using the QDK;

  • QsharpToffoliSimulatorBackend, for simulating a Toffoli circuit using the QDK;

  • QsharpEstimatorBackend, for estimating various quantum resources of a circuit using the QDK. This provides a get_resources method, which returns a dictionary.

Project details


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

pytket_qsharp-0.25.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file pytket_qsharp-0.25.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytket_qsharp-0.25.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05af4fed974cef1f91e886264234441addc0f13feb648618fbf8716c28afec0d
MD5 01bcc96a27d4ff928b5f7643a3c9e147
BLAKE2b-256 fb41e127c293cc5a4d7f931a8c9090e7ac408af6411b1f2d1d86e7b756177a61

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