Package: pytket-aqt
pytket-aqtPytketis a python module for interfacing
with tket, a quantum computing toolkit and optimising compiler developed by Quantinuum.pytket-aqtis an extension topytketthat allowspytketcircuits to be
executed on AQT's (Alpine Quantum Technologies') quantum devices and simulators.Seeextension documentationfor more.Getting startedpytket-aqtis available for Python 3.10, 3.11 and 3.12, on Linux, MacOS
and Windows. To install, run:pipinstallpytket-aqtThis will installpytketif it isn't already installed, and add new classes
and methods into thepytket.extensionsnamespace.Bugs, support and feature requestsPlease file bugs and feature requests on the Githubissue tracker.There is also a Slack channel for discussion and support. Clickhereto join.DevelopmentThis project usesPoetryfor packaging and dependency management andNoxfor task automation.Recommended development setupInstall development tools:pipinstall-rdev-tool-requirements.txtLocal development with Nox (recommended)Noxcan be used to automate various development tasks running in isolated python environments.
The following Nox sessions are provided:pre-commit: run the configured pre-commit hooks within.pre-commit-config.yaml, this includes linting with black and pylintmypy: run type checks using mypytests: run the unit testsdocs-build: build the documentationTo run a session use:nox-s<session_name>To save time, reuse the session virtual environment using the-roption, i.e.nox -rs <session_name>(may cause errors after a dependency update).Pre-commitcan be used to run the pre-commit hooks before each commit. This is recommended.
To set up the pre-commit hooks to run automatically on each commit run:nox-spre-commit--installAfterward, thepre-configured hookswill run on all changed files in a commit and the commit will be
rejected if the hooks find errors. Some hooks will correct formatting issues automatically (but will still reject the commit, so that
thegit commitcommand will need to be repeated).Local development without NoxTo install the local package, its dependencies and various development dependencies run:poetryinstall--withtests,docs,mypy,pre-commitThis will install the dependencies within an isolated virtual environment managed by Poetry. To activate that environment run:poetryshellWithin this environment, the following commands can be used:# run testspytesttests# run mypymypy--explicit-package-basespytkettestsdocs/conf.pydocs/build-docs# run pre-commit checkspre-commitrun--all-files--show-diff-on-failure# build documentation./docs/build-docsTo exit the Poetry environment, run:exitContributingPull requests are welcome. To make a PR, first fork the repo, make your proposed
changes on thedevelopbranch, and open a PR from your fork. If it passes
tests and is accepted after review, it will be merged in.Code styleFormatting and LintingAll code will be checked on the CI withblackandpylintas configured within thepre-commitchecks. These checks should be
run locally before any pull request submission using the correspondingnoxsession orpre-commitdirectly (see above).
The used versions of the formatting ad linting tools is specified in thepyproject.toml.Type annotationOn the CI,mypyis used as a static
type checker and all submissions must pass its checks. You should therefore runmypylocally on any changed files before submitting a PR. This should be done using the method
described under Local developmentwith Noxorwithout Nox.Adding TestsWhen adding a new feature, please add appropriate tests for it within thetestsdirectory. When fixing a bug, please
add a test that demonstrates the fix.