pytket
Quantum computing toolkit and interface to the TKET compiler
Decision gist · record as of 2026-08-14
Yes, if you are working with quantum circuits and need a robust, actively maintained compiler and circuit manipulation framework. Pytket is well-suited for quantum algorithm development, hardware integration, and interoperability with other quantum software tools. The permissive Apache 2 license and broad platform support (Linux, macOS, Windows) lower barriers to adoption. Install friction is moderate due to multiple dependencies, but precompiled wheels are available. Avoid on macOS with conda; use an official Python distribution instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- On macOS with conda, versions more recent than 1.11.0 may fail to install; using an official Python distribution is recommended as a workaround.
- Medium install friction: precompiled wheels available for Python 3.10–3.14 on Linux, macOS (arm64 and x86_64), and Windows, but the package carries 9 runtime dependencies including numpy, scipy, and networkx.
License · maintenance · safety
Apache 2 (permissive) — Licensed under Apache 2 (permissive), which allows commercial and private use with minimal restrictions—suitable for most development and research contexts.
last release 2026-07-06 (39 days) · last repo commit 2026-08-13 · 315 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 156,510 downloads/mo, #10,782 on PyPI
Alternatives
Verify before relying
pip install pytket
import pytket
from pytket import Circuit
# Create a simple quantum circuit
circ = Circuit(2)
circ.H(0)
circ.CX(0, 1)- Whether pytket's circuit optimization capabilities are suitable for your specific quantum hardware targets or simulation needs.
- Performance characteristics and scalability limits for large circuits or complex optimization passes.
- Availability and maturity of pytket extension modules for your target quantum hardware or simulator.
What it is and what it does
Pytket is a Python module that wraps TKET, Quantinuum's quantum computing toolkit and compiler. It provides a high-level interface for constructing quantum circuits, applying optimizations, and preparing them for execution on quantum hardware or classical simulators. The package integrates with several popular quantum software frameworks—including Qiskit, Cirq, and PennyLane—allowing circuit conversion between tools.
The core use case is circuit design and optimization: you build a quantum circuit using pytket's API, apply compiler passes to reduce gate count or improve fidelity, and then export or execute the result. Pytket's runtime dependencies (numpy, scipy, networkx, sympy, lark, graphviz, jinja2, typing-extensions, and qwasm) support numerical computation, graph algorithms, and circuit serialization. Extension modules provide access to specific quantum hardware providers and simulators.
Use it for
- Design and optimize quantum circuits for execution on Quantinuum quantum processors or other supported hardware.
- Convert quantum circuits between Qiskit, Cirq, and PennyLane representations for interoperability.
- Apply automated compilation passes (qubit routing, gate decomposition, phase gadget synthesis) to reduce circuit depth.
- Prototype quantum algorithms and test them on classical simulators before hardware deployment.
- Integrate quantum circuit compilation into larger quantum software pipelines or research workflows.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are working with quantum circuits and need a robust, actively maintained compiler and circuit manipulation framework.
Pytket is well-suited for quantum algorithm development, hardware integration, and interoperability with other quantum software tools. The permissive Apache 2 license and broad platform support (Linux, macOS, Windows) lower barriers to adoption. Install friction is moderate due to multiple dependencies, but precompiled wheels are available. Avoid on macOS with conda; use an official Python distribution instead.
Install
pytket on PyPI
Before you install
Medium install friction: precompiled wheels available for Python 3.10–3.14 on Linux, macOS (arm64 and x86_64), and Windows, but the package carries 9 runtime dependencies including numpy, scipy, and networkx. Maintenance is active with recent releases; however, a known conda environment issue on macOS may prevent installation of recent versions.
Requires Python 3.10 or later. On macOS with conda, versions more recent than 1.11.0 may fail to install; using an official Python distribution is recommended as a workaround.
License in practice
Licensed under Apache 2 (permissive), which allows commercial and private use with minimal restrictions—suitable for most development and research contexts.
Quickstart
pip install pytket
import pytket
from pytket import Circuit
# Create a simple quantum circuit
circ = Circuit(2)
circ.H(0)
circ.CX(0, 1)
Verify before relying
- Whether pytket's circuit optimization capabilities are suitable for your specific quantum hardware targets or simulation needs.
- Performance characteristics and scalability limits for large circuits or complex optimization passes.
- Availability and maturity of pytket extension modules for your target quantum hardware or simulator.
Package facts
| License | Apache 2 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 9 packagessympynumpylarkscipynetworkxgraphvizjinja2typing-extensionsqwasm |
| Maintenance | Actively maintained 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 156,510 / month, #10,782 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering |
Evidence: pytket-2.18.1-cp310-cp310-macosx_14_0_arm64.whl; pytket-2.18.1-cp310-cp310-macosx_15_0_x86_64.whl; pytket-2.18.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pytket-2.18.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pytket-2.18.1-cp310-cp310-win_amd64.whl; pytket-2.18.1-cp311-cp311-macosx_14_0_arm64.whl; pytket-2.18.1-cp311-cp311-macosx_15_0_x86_64.whl; pytket-2.18.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pytket-2.18.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pytket-2.18.1-cp311-cp311-win_amd64.whl; pytket-2.18.1-cp312-abi3-macosx_14_0_arm64.whl; pytket-2.18.1-cp312-abi3-macosx_15_0_x86_64.whl; pytket-2.18.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pytket-2.18.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pytket-2.18.1-cp312-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “quantum circuit compiler”
- pytketPytket is a Python interface to TKET, a quantum computing toolkit and…
- openqasm3Provides a reference abstract syntax tree (AST) for OpenQASM 3…
- mqt.qcecVerifies whether two quantum circuits are functionally equivalent…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also cirq-core · qiskit · cirq · PyMatching · qiskit-terra · pennylane · cirq-aqt · qiskit-ibm-runtime · qiskit-experiments · pyqir