Skip to main content

Extension for pytket, providing simulators from 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.6, 3.7 and 3.8, on Linux, MacOS and Windows. To install, run:

pip install pytket-qsharp

In order to use pytket-qsharp you will first need to install the dotnet SDK (3.1) 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.

LICENCE

Copyright 2020-2021 Cambridge Quantum Computing

You may not use this product except in compliance with the Licence. You may view the License here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytket-qsharp-0.8.3.tar.gz (11.1 kB view details)

Uploaded Source

File details

Details for the file pytket-qsharp-0.8.3.tar.gz.

File metadata

  • Download URL: pytket-qsharp-0.8.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for pytket-qsharp-0.8.3.tar.gz
Algorithm Hash digest
SHA256 231e7f5d2a3b170dff7cb6047a32ff6e4cf0d6f3dff68e347f288f17a0c9521b
MD5 27c4bd0b9a94f463917c7d6c0dad524f
BLAKE2b-256 774fdcb6aedce60a85c69f0da1cf41cd3d83d3195fa6bb8e282e5e69d0cbe57f

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