Extension for pytket, providing access to Quantinuum backends
Project description
pytket-quantinuum
Pytket is a python module for interfacing with tket, a quantum computing toolkit and optimising compiler developed by Quantinuum.
pytket-quantinuum was an extension to pytket that allows pytket circuits to
be executed on Quantinuum's quantum devices. As of version 0.56.0 it is now
limited to compilation and local emulation. Please use the qnexus package for
submission of jobs to devices.
Some useful links:
Getting started
pytket-quantinuum is compatible with Python versions 3.10 to 3.13 on Linux, MacOS
and Windows. To install, run:
pip install pytket-quantinuum
This will install pytket if it isn't already installed, and add new classes
and methods into the pytket.extensions namespace.
Bugs, support and feature requests
Please file bugs and feature requests on the Github issue tracker.
Development
To install an extension in editable mode run:
pip install -e .
We have set up the repo to be used with uv. You can use also:
uv sync --python 3.12
to install the package. This will automatically pick up all requirements for the tests as well.
Contributing
Pull requests are welcome. To make a PR, first fork the repo, make your proposed
changes on the main branch, and open a PR from your fork. If it passes
tests and is accepted after review, it will be merged in.
Code style
Formatting
All code should be formatted using ruff, with default options. This is checked on the CI.
Type annotation
On the CI, mypy is used as a static
type checker and all submissions must pass its checks. You should therefore run
mypy locally on any changed files before submitting a PR. You can run them with:
uv run mypy --config-file=mypy.ini --no-incremental --explicit-package-bases pytket tests
Linting
We use ruff on the CI to check compliance with a set of style requirements (listed in ruff.toml).
You should run ruff over any changed files before submitting a PR, to catch any issues.
An easy way to meet all formatting and linting requirements is to issue pre-commit run --all-files.
If you are using uv running uv run pre-commit run --all-files --show-diff-on-failure will install the package and run all the checks.
Tests
To run the tests for this module:
- ensure you have installed
pytest,hypothesis, and any modules listed in thedev-dependenciessection of thepyproject.tomlfile; (If you are using uv this will be picked up automatically.) - run
pytest.
When adding a new feature, please add a test for it. When fixing a bug, please add a test that demonstrates the fix.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytket_quantinuum-0.57.0-py3-none-any.whl.
File metadata
- Download URL: pytket_quantinuum-0.57.0-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75fd8336ee97796b4bcf15f3f0243e38b2055a02fd7975ea50a18eedb885700d
|
|
| MD5 |
01f41445ed3cf38455d047a6aab3761f
|
|
| BLAKE2b-256 |
39c9f3d6210388a2757b0a650f8fee69250cc35322ad1ef17166a469aaec641c
|