pytket is a python module for interfacing with CQC tket, a set of quantum programming tools.
This repo contains API documentation and example notebooks to get you started using
pytket. It does not contain source code.
pytket is available for
python3.6 or higher, on Linux, MacOS and Windows.
To install, ensure that you have
pip version 19 or above, and run
pip install pytket
Note: attempting to install from source will not set up the required binaries for the tket compiler, so we recommend the PyPI installation.
See the Getting Started page for a quick introduction to using
Documentation can be found at cqcl.github.io/pytket
To get more in depth on features, see the examples.
We currently support circuits and device architectures from Google Cirq, IBM Qiskit, Pyzx, ProjectQ, Rigetti pyQuil, AQT, Honeywell, Microsoft QDK, Amazon Braket, and Qulacs, allowing the tket tools to be used in conjunction with projects on these platforms.
pytket in conjunction with other platforms you must download an additional separate module for each.
This can be done from
For each subpackage:
pip install pytket-qiskit
pip install pytket-cirq
pip install pytket-pyquil
pip install pytket-projectq
pip install pytket-pyzx
pip install pytket-aqt
pip install pytket-honeywell
pip install pytket-qsharp
pip install pytket-braket
pip install pytket-qulacs
Copyright 2019-2021 Cambridge Quantum Computing
You may not use this product except in compliance with the Licence. You may obtain a copy of the Licence in the LICENCE file accompanying these documents or view them here.
How To Cite
If you wish to cite tket in any academic publications, we generally recommend citing our software overview paper for most cases.
If your work is on the topic of specific compilation tasks, it may be more appropriate to cite one of our other papers:
- "On the qubit routing problem" for qubit placement (aka allocation, mapping) and routing (aka swap network insertion, connectivity solving).
- "Phase Gadget Synthesis for Shallow Circuits" for representing exponentiated Pauli operators in the ZX calculus and their circuit decompositions.
- "A Generic Compilation Strategy for the Unitary Coupled Cluster Ansatz" for sequencing of terms in Trotterisation and Pauli diagonalisation.
We are also keen for others to benchmark their compilation techniques against us. We recommend checking our benchmark repository for examples on how to run basic benchmarks with the latest version of
pytket. Please list the release version of
pytket with any benchmarks you give, and feel free to get in touch for any assistance needed in setting up fair and representative tests.
pytket features a telemetry module which can be used to keep track of
pyktet usage and will provide usage analytics and error reporting at a later date. Telemetry is disabled by default, but may be enabled either through function calls or in the pytket configuration file.
In order to opt in to telemetry a helper function is provided in the
pytket.telemetry module that need only be run once.
from pytket import telemetry telemetry.opt_in()
opt_out function will allow a user to opt out.
Alternatively the config file located either at
$XDG_CONFIG_HOME is set can be edited manually.
Once a user has opted in to telemetry they will be assigned a telemetry ID by making an HTTP request to a CQC server with some information about their system.
Telemetry Data Policy
Our telemetry data policy can be viewed here.